/* ============================================================================
 * Thème « Magazine » (no1) — Site Radio VestaRadio
 *
 * Feuille d'OVERLAY : chargée uniquement quand radio_sites.theme = 'no1'.
 * Elle ne s'applique que sous body.theme-no1, donc le thème « classic » et
 * tous les sites existants restent strictement inchangés.
 *
 * Réutilise les variables déjà exposées par site-render.php :
 *   --c1 (primaire) · --c2 (secondaire) · --bg · --tx · --player-h
 * ========================================================================== */

body.theme-no1 {
  --player-h: 76px;   /* barre compacte : header + player + ticker restent collés */
  --n1-dark: #14161c;
  --n1-dark-2: #1d2029;
  --n1-line: rgba(0, 0, 0, .08);
  --n1-muted: #7b8092;
  --n1-radius: 10px;
  background: #f4f5f7;
}

/* ── Header : fond clair, logo à gauche, nav à droite, réseaux en haut ────
 * Calqué sur la disposition de référence : une 1re ligne fine avec les icônes
 * sociales alignées à droite, puis logo + menu sur la même ligne.
 * Toutes les règles de disposition sont enfermées dans @media(min-width:769px)
 * pour ne PAS toucher le tiroir mobile (.site-nav en position:fixed).
 * ---------------------------------------------------------------------- */
body.theme-no1 .site-header {
  background: #fff;
  color: var(--tx);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .09);
  flex-wrap: wrap;
  gap: 0;
  padding: 0 24px;
}

body.theme-no1 .site-header .brand { color: var(--tx); }
body.theme-no1 .nav-toggle { color: var(--tx); }

/* Réseaux sociaux : 1re ligne du header, collés à droite */
body.theme-no1 .n1-social {
  order: -1;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  padding: 5px 0 1px;
}

body.theme-no1 .n1-social a {
  color: var(--c1);
  font-size: 1.05rem;
  line-height: 1;
  opacity: .85;
  transition: opacity .15s, transform .15s;
}

body.theme-no1 .n1-social a:hover { opacity: 1; transform: translateY(-1px); }

@media (min-width: 769px) {
  body.theme-no1 .site-header { padding: 0 24px 0 20px; }

  /* Neutralise le débordement du logo propre au thème classique */
  body.theme-no1 .site-logo-link { padding: 0; }
  body.theme-no1 .site-logo {
    height: 54px;
    margin: 4px 22px 6px 0;
    border: 0;
    border-radius: 6px;
    box-shadow: none;
    position: static;
  }

  body.theme-no1 .site-nav {
    margin: 0 auto 0 0;
    gap: 4px;
    background: transparent;
    border: 0;
    width: auto;
    justify-content: flex-start;
  }

  body.theme-no1 .site-nav a {
    color: var(--c1);
    font-weight: 700;
    font-size: .84rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 7px 13px;
    border-bottom: 3px solid transparent;
    border-radius: 0;
  }

  body.theme-no1 .site-nav a:hover { background: rgba(0, 0, 0, .04); color: var(--c1); }
  body.theme-no1 .site-nav a.active { border-bottom-color: var(--c1); }
}

/* Tiroir mobile : on garde le fond sombre du thème classique et on rétablit
   la couleur des liens, que la règle desktop ci-dessus ne touche pas. */
@media (max-width: 768px) {
  body.theme-no1 .site-logo { height: 52px; margin: 6px 0; border: 0; box-shadow: none; position: static; }
  body.theme-no1 .site-nav a { color: rgba(255, 255, 255, .9); }
  body.theme-no1 .n1-social { order: 0; width: auto; padding: 0; margin-left: auto; margin-right: 10px; }
  /* Ordre de la ligne du haut : [réseaux] [sélecteur de radio] [burger].
     Sélecteur plus spécifique que la règle desktop `.universe-switch{order:3}`,
     qui est déclarée plus bas dans ce fichier et gagnerait à égalité. */
  body.theme-no1 .site-header .universe-switch { order: 1; margin: 0 0 0 8px; }
  body.theme-no1 .site-header .nav-toggle { order: 2; margin-left: 8px; }
  body.theme-no1 .n1-ticker-label { padding: 0 10px; font-size: .64rem; }
  body.theme-no1 .n1-grid { padding: 0 14px; margin-top: 18px; }
  body.theme-no1 .hero-slider, body.theme-no1 .hero { width: calc(100% - 28px); }
  /* Le bandeau collant mange trop de hauteur sur mobile : on le laisse défiler. */
  body.theme-no1 .site-header { position: static; }
  body.theme-no1 .n1-aside { top: 0; }

  /* La bande des logos radio débordait (scrollWidth > largeur) et écrasait le
     lecteur : on la remplace par le menu déroulant « Nos radios ». */
  body.theme-no1 .player-bar .pb-radios { display: none; }

  /* Le thème classique masque le sélecteur sous 640px (@media .universe-switch
     {display:none}) : sans lui ET sans la bande de logos, le mobile n'aurait plus
     aucun moyen de changer de radio. On le rétablit en pastille compacte. */
  body.theme-no1 .universe-switch { display: block; }
  /* Pastille compacte, mais le nom de la radio reste lisible : il est tronqué par
     ellipse plutôt que masqué, pour qu'on sache toujours ce qu'on écoute. */
  body.theme-no1 .us-trigger { padding: 6px 9px; gap: 5px; font-size: .76rem; max-width: 46vw; }
  body.theme-no1 .us-label-txt {
    display: block;
    max-width: 30vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.theme-no1 .us-panel { left: auto; right: 0; min-width: 210px; }
  /* Les réseaux sociaux cèdent la place en premier. */
  body.theme-no1 .n1-social { gap: 11px; margin-right: 0; }
}

/* Sous 420px, on sacrifie les réseaux secondaires pour garder le nom de la radio,
   le sélecteur et le burger sur une seule ligne. */
@media (max-width: 420px) {
  body.theme-no1 .n1-social a:nth-child(n+3) { display: none; }
}
@media (max-width: 340px) {
  body.theme-no1 .n1-social { display: none; }
}

body.theme-no1 .universe-switch {
  order: 3;          /* après la nav : ne s'intercale plus entre logo et menu */
  margin: 0 0 0 auto;
  align-self: center;
}

body.theme-no1 .us-trigger {
  background: var(--c1);
  border-color: transparent;
  color: #fff;
}

body.theme-no1 .us-trigger:hover { filter: brightness(1.08); background: var(--c1); }

/* ── Ticker « fil info » ─────────────────────────────────────────────────── */
body.theme-no1 .n1-ticker {
  display: flex;
  align-items: stretch;
  background: var(--c1);
  color: #fff;
  overflow: hidden;
  /* dernier enfant du header (sticky) : pleine largeur malgré son padding */
  order: 5;
  width: calc(100% + 48px);
  margin: 0 -24px;
}

@media (max-width: 768px) {
  body.theme-no1 .n1-ticker { width: calc(100% + 40px); margin: 0 -20px; }
}

body.theme-no1 .n1-ticker-label {
  order: 2;            /* le libellé est à DROITE sur la référence */
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--n1-dark);
  color: #fff;
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 0 16px;
  white-space: nowrap;
}

body.theme-no1 .n1-ticker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c1);
  animation: n1Pulse 1.6s infinite;
}

@keyframes n1Pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, .5); }
  70%  { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

body.theme-no1 .n1-ticker-viewport {
  order: 1;
  overflow: hidden;
  flex: 1;
  position: relative;
}

body.theme-no1 .n1-ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 36px;
  padding: 6px 24px;
  white-space: nowrap;
  animation: n1Scroll 45s linear infinite;
}

body.theme-no1 .n1-ticker:hover .n1-ticker-track { animation-play-state: paused; }

body.theme-no1 .n1-ticker-track a {
  color: #fff;
  text-decoration: none;
  font-size: .8rem;
  font-weight: 600;
}

body.theme-no1 .n1-ticker-track a:hover { text-decoration: underline; }

body.theme-no1 .n1-ticker-track a::before {
  content: "•";
  margin-right: 12px;
  opacity: .5;
}

@keyframes n1Scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-no1 .n1-ticker-track { animation: none; }
}

/* ── Grille magazine : contenu + colonne latérale ────────────────────────── */
body.theme-no1 .n1-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  max-width: 1200px;
  margin: 28px auto;
  padding: 0 20px;
  align-items: start;
}

@media (max-width: 992px) {
  body.theme-no1 .n1-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Ceinture et bretelles : aucun bloc ne peut imposer sa largeur intrinsèque. */
body.theme-no1 .n1-main,
body.theme-no1 .n1-aside,
body.theme-no1 .n1-block { min-width: 0; }

/* Accueil sans aucune section : la colonne principale est vide et laissait un
   grand blanc à gauche. On repasse alors sur une seule colonne centrée. */
body.theme-no1 .n1-grid:has(.n1-main:empty) {
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
}

body.theme-no1 .n1-aside {
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 210px;
}

@media (max-width: 992px) {
  body.theme-no1 .n1-aside { position: static; }
}

/* ── Blocs (cartes) ─────────────────────────────────────────────────────── */
body.theme-no1 .n1-block {
  background: #fff;
  border: 1px solid var(--n1-line);
  border-radius: var(--n1-radius);
  overflow: hidden;
}

body.theme-no1 .n1-block-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 13px 16px;
  background: var(--n1-dark);
  color: #fff;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

body.theme-no1 .n1-block-title i { color: var(--c1); }

body.theme-no1 .n1-block-more {
  display: block;
  padding: 11px;
  text-align: center;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c1);
  text-decoration: none;
  border-top: 1px solid var(--n1-line);
}

body.theme-no1 .n1-block-more:hover { background: rgba(0, 0, 0, .03); }

/* ── « Ça vient de passer » ──────────────────────────────────────────────── */
body.theme-no1 .n1-play {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--n1-line);
}

body.theme-no1 .n1-play:last-of-type { border-bottom: 0; }

body.theme-no1 .n1-play-time {
  flex-shrink: 0;
  width: 42px;
  font-size: .78rem;
  font-weight: 800;
  color: var(--c1);
  font-variant-numeric: tabular-nums;
}

body.theme-no1 .n1-play-cover {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e9ecef;
}

body.theme-no1 .n1-play-cover-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
}

body.theme-no1 .n1-play-meta { min-width: 0; }

body.theme-no1 .n1-play-title {
  font-weight: 700;
  font-size: .9rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.theme-no1 .n1-play-artist {
  font-size: .74rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--n1-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Sidebar : podcasts & clips ──────────────────────────────────────────── */
body.theme-no1 .n1-side-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--n1-line);
  text-decoration: none;
  color: var(--tx);
}

body.theme-no1 .n1-side-item:last-of-type { border-bottom: 0; }
body.theme-no1 .n1-side-item:hover { background: rgba(0, 0, 0, .03); }

body.theme-no1 .n1-side-thumb {
  width: 54px;
  height: 40px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

body.theme-no1 .n1-side-name {
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Hero slider : plus plat, coins nets, dans la grille ─────────────────── */
/* Même gouttière que .n1-grid (padding 0 20px) pour un bord aligné au pixel. */
body.theme-no1 .hero-slider,
body.theme-no1 .hero {
  max-width: 1160px;   /* = largeur de contenu de .n1-grid (1200 - 2×20 de gouttière) */
  width: calc(100% - 40px);
  margin: 22px auto 0;
  border-radius: var(--n1-radius);
  overflow: hidden;
}

body.theme-no1 .hero {
  background: #fff;
  border: 1px solid var(--n1-line);
}

/* ── Cartes actus : bandeau accent au survol ─────────────────────────────── */
body.theme-no1 .news-card {
  background: #fff;
  border: 1px solid var(--n1-line);
  border-radius: var(--n1-radius);
  overflow: hidden;
  transition: transform .18s, box-shadow .18s;
}

body.theme-no1 .news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .1);
}

body.theme-no1 .news-card h2 {
  font-size: 1rem;
  line-height: 1.3;
}

body.theme-no1 .news-card-date { background: var(--c1); }

/* ── Footer sombre ──────────────────────────────────────────────────────── */
body.theme-no1 .site-footer {
  background: var(--n1-dark);
  color: rgba(255, 255, 255, .75);
}

body.theme-no1 .site-footer a { color: rgba(255, 255, 255, .8); }
body.theme-no1 .site-footer a:hover { color: var(--c1); }

/* ── Barre player : remontée sous le header, dans le flux ────────────────────
 * En thème classique elle est position:fixed;bottom:0. Ici elle est émise juste
 * après le <header> et repasse en flux normal : plus rien n'est collé en bas,
 * donc on annule aussi le padding-bottom du body et on recale dédicaces/expand.
 * -------------------------------------------------------------------------- */
body.theme-no1 { padding-bottom: 0; }

/* Dernier enfant du header (sticky top:0) : la barre reste collée en haut au scroll.
   Marges négatives pour annuler le padding latéral du header et rester pleine largeur. */
body.theme-no1 .player-bar {
  position: static;
  order: 4;
  width: calc(100% + 48px);
  margin: 0 -24px;
  height: var(--player-h);
  background: var(--c2);          /* = &bg du player : aucune jointure visible */
  box-shadow: none;
  border-bottom: 3px solid var(--c1);
}

@media (max-width: 768px) {
  body.theme-no1 .player-bar { width: calc(100% + 40px); margin: 0 -20px; }
}

/* La barre de dédicaces reste fixe en bas, mais n'a plus le player à surmonter.
   Elle est rendue en fin de <body> : la passer en flux l'enverrait sous le footer. */
body.theme-no1 .dedic-bar { bottom: 0; }
body.theme-no1.has-dedic { padding-bottom: 42px; }

/* Le bouton « agrandir le lecteur » n'a plus de player en bas à éviter. */
body.theme-no1 .player-expand,
body.theme-no1.has-dedic .player-expand { bottom: 14px; }

body.theme-no1 #site-main { min-height: 0; }
