/* ===========================================
   RADIO RAMEEM - COMPOSANTS SPÉCIFIQUES
   (vient après style.css et pages.css)
   =========================================== */

/* ---------- Navigation : 7 liens -> burger plus tôt ---------- */
.nav-links { gap: 1.6rem; }
@media (max-width: 1180px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(251, 250, 246, 0.98);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(26, 47, 35, 0.08);
    box-shadow: 0 12px 28px rgba(26, 47, 35, 0.10);
    padding: 0.4rem var(--gutter) 1rem; list-style: none;
  }
  .nav-links.open li { width: 100%; }
  .nav-links.open a {
    display: block; width: 100%; padding: 0.95rem 0.2rem; font-size: 1rem;
    border-bottom: 1px solid rgba(26, 47, 35, 0.06);
  }
  .nav-links.open a.active::after { display: none; }
  body.ar .nav-links.open a { text-align: right; }
  .menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
.nav-logo { white-space: nowrap; }
.nav-cta-live {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rouge-croissant);
  box-shadow: 0 0 0 0 rgba(210, 16, 52, 0.6);
  animation: rm-live 1.8s infinite;
}
@keyframes rm-live {
  0% { box-shadow: 0 0 0 0 rgba(210, 16, 52, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(210, 16, 52, 0); }
  100% { box-shadow: 0 0 0 0 rgba(210, 16, 52, 0); }
}
@media (max-width: 600px) {
  .nav-cta .nav-cta-text { display: none; }
  .nav-cta { padding: 0.7rem; }
  .nav-logo { font-size: 1.15rem; }
}

/* ---------- Hero accueil ---------- */
.rm-hero { min-height: auto; padding-bottom: 5rem; }
.rm-hero .hero-quote { font-style: italic; }

/* ---------- Lecteur ---------- */
.rm-player {
  position: relative;
  background: linear-gradient(150deg, var(--vert-profond) 0%, #0f1f17 100%);
  color: var(--blanc);
  border-radius: var(--radius-large);
  padding: clamp(1.8rem, 4vw, 2.6rem);
  box-shadow: var(--ombre-forte);
  overflow: hidden;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}
.rm-player::after {
  content: ''; position: absolute; inset: auto -20% -45% auto;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 169, 97, 0.22), transparent 65%);
  pointer-events: none;
}
.rm-player-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.rm-onair {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--or-pale);
  border: 1px solid rgba(232, 220, 184, 0.3); border-radius: 100px; padding: 0.35rem 0.8rem;
}
.rm-player-langs { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: rgba(255,255,255,0.55); letter-spacing: 0.1em; }
.rm-player-name { font-family: 'Fraunces', serif; font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.05; letter-spacing: -0.02em; }
.rm-player-name em { color: var(--or-doux); font-style: italic; }
body.ar .rm-player-name { font-family: 'Amiri', serif; font-weight: 700; }
.rm-player-slogan { color: rgba(255,255,255,0.7); margin-top: 0.4rem; font-size: 0.98rem; }
.rm-player-controls { display: flex; align-items: center; gap: 1.2rem; margin-top: 2rem; position: relative; z-index: 1; }
.rm-play {
  flex-shrink: 0; width: 72px; height: 72px; border-radius: 50%;
  background: var(--or-doux); color: var(--vert-profond);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(201, 169, 97, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}
.rm-play:hover { transform: scale(1.06); background: var(--or-pale); }
.rm-play:focus-visible { outline: 3px solid var(--blanc); outline-offset: 3px; }
.rm-play svg { width: 30px; height: 30px; fill: currentColor; }
.rm-play .rm-icon-pause { display: none; }
.is-playing .rm-play .rm-icon-play { display: none; }
.is-playing .rm-play .rm-icon-pause { display: block; }
.rm-player-status { font-size: 0.92rem; color: rgba(255,255,255,0.8); }
.rm-eq { display: flex; align-items: flex-end; gap: 3px; height: 34px; margin-inline-start: auto; }
.rm-eq span { width: 4px; height: 20%; border-radius: 2px; background: rgba(232, 220, 184, 0.45); }
.is-playing .rm-eq span { animation: rm-eq 1s ease-in-out infinite; background: var(--or-doux); }
.rm-eq span:nth-child(2) { animation-delay: .15s; } .rm-eq span:nth-child(3) { animation-delay: .3s; }
.rm-eq span:nth-child(4) { animation-delay: .45s; } .rm-eq span:nth-child(5) { animation-delay: .6s; }
@keyframes rm-eq { 0%, 100% { height: 20%; } 50% { height: 100%; } }
.rm-player-foot { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,0.1); position: relative; z-index: 1; }
.rm-player-foot a { color: var(--or-pale); font-size: 0.86rem; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- En-têtes de pages intérieures ---------- */
.rm-page-hero {
  padding: 9rem var(--gutter) 3.5rem;
  background: linear-gradient(180deg, var(--vert-tendre) 0%, var(--lin) 100%);
  text-align: center;
}
.rm-page-hero h1 {
  font-family: 'Fraunces', serif; font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 400;
  line-height: 1.05; letter-spacing: -0.03em; color: var(--encre);
  margin: 1rem auto 1.4rem; max-width: 820px;
}
.rm-page-hero h1 em { font-style: italic; color: var(--vert-national); }
body.ar .rm-page-hero h1 { font-family: 'Amiri', serif; font-weight: 700; }
.rm-page-hero p { font-size: 1.1rem; color: var(--encre-douce); max-width: 640px; margin: 0 auto; line-height: 1.7; }
.rm-section-head { text-align: center; margin-bottom: 3rem; }
.rm-section-head .section-title, .rm-section-head .section-subtitle { margin-left: auto; margin-right: auto; }
.rm-section-head .section-subtitle { margin-bottom: 0; }
.rm-center { text-align: center; margin-top: 3rem; }
.rm-alt { background: var(--creme); }

/* ---------- Contenus dynamiques ---------- */
[data-render]:not(.rm-loaded) { min-height: 120px; }
.rm-empty {
  text-align: center; padding: 2.5rem 1.5rem; color: var(--encre-douce);
  border: 1.5px dashed rgba(26, 47, 35, 0.15); border-radius: var(--radius-moyen);
  background: var(--blanc); max-width: 640px; margin: 0 auto;
}
.rm-news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1.8rem; }
.rm-news-card {
  background: var(--blanc); border-radius: var(--radius-moyen); overflow: hidden;
  border: 1px solid rgba(26, 47, 35, 0.06); box-shadow: var(--ombre-douce);
  display: flex; flex-direction: column;
}
.rm-news-img { aspect-ratio: 16/10; overflow: hidden; background: var(--vert-tendre); }
.rm-news-img img { width: 100%; height: 100%; object-fit: cover; }
.rm-news-body { padding: 1.6rem; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.rm-news-date { font-family: 'JetBrains Mono', monospace; font-size: 0.74rem; letter-spacing: 0.08em; color: var(--or-fonce); text-transform: uppercase; }
.rm-news-title { font-family: 'Fraunces', serif; font-size: 1.3rem; font-weight: 500; line-height: 1.25; color: var(--encre); }
body.ar .rm-news-title { font-family: 'Amiri', serif; font-weight: 700; font-size: 1.45rem; }
.rm-news-text { color: var(--encre-douce); line-height: 1.65; font-size: 0.97rem; }
.rm-news-body .presse-link { margin-top: auto; }

.rm-video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1.8rem; }
.rm-video-desc { color: var(--encre-douce); font-size: 0.92rem; line-height: 1.55; margin-top: 0.5rem; }
.rm-thumb-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 5px;
  background: linear-gradient(135deg, var(--vert-national) 0%, var(--vert-profond) 100%);
}
.rm-thumb-placeholder span { width: 6px; border-radius: 3px; background: rgba(232, 220, 184, 0.5); height: 30%; }
.rm-thumb-placeholder span:nth-child(2) { height: 55%; } .rm-thumb-placeholder span:nth-child(3) { height: 40%; }
.rm-thumb-placeholder span:nth-child(4) { height: 65%; } .rm-thumb-placeholder span:nth-child(5) { height: 35%; }

.rm-photo { margin: 0; }
.rm-photo figcaption { font-size: 0.85rem; color: var(--encre-douce); padding: 0.5rem 0.2rem 0; }

/* Grille des programmes */
.rm-grille { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.9rem; }
.rm-grille-row {
  display: grid; grid-template-columns: 170px 1fr auto; gap: 1.4rem; align-items: center;
  background: var(--blanc); border-radius: var(--radius-moyen); padding: 1.2rem 1.5rem;
  border: 1px solid rgba(26, 47, 35, 0.06);
}
.rm-grille-when strong { display: block; color: var(--vert-national); }
.rm-grille-when span { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: var(--encre-douce); }
.rm-grille-what h3 { font-size: 1.08rem; color: var(--encre); }
.rm-grille-what p { font-size: 0.92rem; color: var(--encre-douce); margin-top: 0.2rem; }
.rm-grille-lang { font-family: 'JetBrains Mono', monospace; font-size: 0.74rem; background: var(--vert-tendre); color: var(--vert-national); padding: 0.3rem 0.65rem; border-radius: 100px; }
@media (max-width: 600px) {
  .rm-grille-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .rm-grille-lang { justify-self: start; }
}

/* ---------- Actions de l'association ---------- */
.rm-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.6rem; }
.rm-action {
  background: var(--blanc); border-radius: var(--radius-moyen); padding: 1.8rem;
  border-top: 3px solid var(--or-doux); box-shadow: var(--ombre-douce);
}
.rm-action-tag { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--or-fonce); }
.rm-action h3 { font-family: 'Fraunces', serif; font-weight: 500; font-size: 1.3rem; margin: 0.6rem 0; color: var(--encre); }
body.ar .rm-action h3 { font-family: 'Amiri', serif; font-weight: 700; }
.rm-action p { color: var(--encre-douce); line-height: 1.65; font-size: 0.97rem; }

/* ---------- Bloc "Soutenir" ---------- */
.rm-support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1.5rem; margin-top: 2.5rem; }
.rm-support-card {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(232, 220, 184, 0.2);
  border-radius: var(--radius-moyen); padding: 1.8rem; text-align: start;
}
.rm-support-card h3 { font-family: 'Fraunces', serif; font-weight: 500; font-size: 1.35rem; color: var(--or-pale); margin-bottom: 0.6rem; }
body.ar .rm-support-card h3 { font-family: 'Amiri', serif; font-weight: 700; }
.rm-support-card p { color: rgba(255,255,255,0.78); line-height: 1.65; font-size: 0.97rem; margin-bottom: 1.2rem; }
.engagement .rm-support-card .btn { white-space: normal; }

/* ---------- Page "écouter" (fenêtre pop-up) ---------- */
.rm-popup-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.2rem; background: var(--vert-profond); }
.rm-popup-body .rm-player { box-shadow: none; max-width: 420px; }
.rm-popup-lang { position: fixed; top: 0.8rem; inset-inline-end: 0.8rem; }

/* ---------- Mentions / textes longs ---------- */
.rm-legal { max-width: 820px; margin: 0 auto; padding: 0 var(--gutter) 6rem; }
.rm-legal h2 { font-family: 'Fraunces', serif; font-weight: 500; font-size: 1.5rem; color: var(--encre); margin: 2.6rem 0 0.9rem; }
body.ar .rm-legal h2 { font-family: 'Amiri', serif; font-weight: 700; }
.rm-legal p, .rm-legal li { color: var(--encre-douce); line-height: 1.75; }
.rm-legal ul { padding-inline-start: 1.2rem; margin: 0.5rem 0; }
.rm-legal strong { color: var(--encre); }
.rm-legal a { color: var(--vert-national); text-decoration: underline; }
.rm-legal .rm-legal-date { text-align: center; color: var(--gris-discret); font-size: 0.9rem; }

/* Boutons : autoriser le retour à la ligne sur mobile */
@media (max-width: 600px) { .btn { white-space: normal; text-align: center; justify-content: center; } }

/* Lien d'évitement (accessibilité) */
.rm-skip {
  position: absolute; top: 0; left: 0; z-index: 200; background: var(--vert-national); color: #fff; padding: 0.6rem 1rem;
  clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap;
}
.rm-skip:focus { clip-path: none; width: auto; height: auto; top: 1rem; left: 1rem; }

/* Lettrine désactivée en arabe (elle casse la liaison des lettres) */
body.ar .bio-text p:first-child::first-letter {
  float: none; font-size: inherit; line-height: inherit; margin: 0; padding: 0; color: inherit; font-family: inherit;
}
