/* jebmusic.fr - V0 - dark theme, minimaliste */

:root {
  --bg: #0a0a0a;
  --bg-alt: #111111;
  --text: #ededed;
  --text-dim: #9a9a9a;
  --accent: #2563eb;
  --border: #2a2a2a;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', Arial, sans-serif;
  scroll-behavior: smooth;
}

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, color 0.3s ease;
}

a:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Apparition en fondu au scroll (Accueil) */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scrollspy (Projets) */

.scrollspy {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 150;
}

.scrollspy a {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: none;
}

.scrollspy-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.3s ease, transform 0.3s ease;
}

.scrollspy-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  white-space: nowrap;
  transition: color 0.3s ease;
}

.scrollspy a:hover .scrollspy-label {
  color: var(--text);
}

.scrollspy a.active .scrollspy-dot {
  background: var(--accent);
  transform: scale(1.3);
}

.scrollspy a.active .scrollspy-label {
  color: var(--accent);
}

@media (max-width: 900px) {
  .scrollspy {
    display: none;
  }
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header / nav */

header.site-header {
  position: sticky;
  top: 0;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

nav.main-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  position: relative;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: none;
  padding-bottom: 3px;
}

nav.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

nav.main-nav a.active::after,
nav.main-nav a:hover::after {
  transform: scaleX(1);
}

nav.main-nav a.active,
nav.main-nav a:hover {
  color: var(--accent);
}

#lang-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 999px;
  margin-left: 28px;
}

#lang-toggle:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.nav-right {
  display: flex;
  align-items: center;
}

/* Hero (Home/Listen) */

.hero {
  text-align: center;
  padding: 70px 24px;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 14px;
}

.hero p.tagline {
  font-size: 17px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0;
}

.hero p.tagline a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.hero p.tagline a:hover {
  color: var(--text);
}

/* Playlists section */

.playlists {
  padding: 30px 24px;
}

.playlist-block {
  margin: 0 auto 24px;
  max-width: 760px;
}

.playlist-block h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-align: center;
  margin: 0 0 18px;
  font-weight: 500;
}

.playlist-embed {
  border: 1px solid var(--border);
  background: var(--bg-alt);
  border-radius: 4px;
  min-height: 610px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 14px;
  text-align: center;
  padding: 20px;
}

.playlist-embed iframe {
  width: 100%;
  height: 610px;
  border: 0;
}

/* Section titles (Works categories) */

.section-title {
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  /* Couleur éclaircie par rapport à var(--accent) (#2563eb) : le bleu
     accent d'origine ne passait pas le seuil de contraste WCAG AA
     (4.5:1), ni sur fond noir ni sur les zones teintées. #4d8cf7 reste
     dans la même famille de bleu tout en garantissant >= 4.5:1 partout. */
  color: #4d8cf7;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin: 70px 0 36px;
}

/* Titres des 4 catégories (Projets) : une seule règle uniforme, tout
   l'espacement passe par padding (jamais margin) pour éviter les fusions
   de marges imprévisibles entre sections. 42px en haut du titre + 42px en
   bas de la section (voir .wall-section) = le contenu respire pareil des
   deux côtés, "centré" dans sa zone, teintée ou non. */
.wall-section .section-title {
  border-top: none;
  padding-top: 42px;
  margin-top: 0;
  margin-bottom: 36px;
}


/* Fiches (Works) */

.fiche {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  align-items: stretch;
}

.fiche[hidden] {
  display: none;
}

.fiche-visual img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 4px;
}

.wall-section--square .fiche-visual img {
  aspect-ratio: 1 / 1;
  height: auto;
}

.fiche-details {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.fiche-text h3 {
  font-size: 20px;
  margin: 0 0 10px;
  font-weight: 600;
}

.fiche-meta {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.7;
}

.fiche-meta .todo {
  color: #a06b3a;
}

.fiche-meta-line {
  display: block;
}

.fiche-meta-line strong {
  color: var(--text);
  font-weight: 500;
}

.fiche-note {
  font-size: 14px;
  color: var(--text-dim);
  font-style: italic;
  margin: 10px 0 0;
}

.fiche-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-dim);
}

.fiche-player {
  margin-top: 20px;
}

.mini-player {
  width: 100%;
  min-height: 120px;
  border: 1px dashed var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
  padding: 14px;
}

.mini-player-embed {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  border-radius: 4px;
  overflow: hidden;
}

.mini-player-embed iframe {
  width: 100%;
  border: 0;
  display: block;
}

@media (max-width: 640px) {
  .fiche {
    grid-template-columns: 1fr;
  }
  nav.main-nav ul {
    gap: 16px;
  }
}

/* Bio (Accueil) */

.bio-section {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 65px 24px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}

/* --- Fond de section teinté (point d) ---
   Dégradé bleu marine -> bleu accent (var(--accent)), monochrome (reste
   dans la famille de couleur déjà utilisée sur le site : liens, scrollspy,
   etc). Casse le conteneur (plein viewport) alors que le contenu reste
   lui centré à --max-width comme avant.
   Classe réutilisable : ajouter "section-tint" à n'importe quelle section
   qui a position:relative (ou lui ajouter ici au besoin) pour l'appliquer. */
.section-tint {
  position: relative;
}

.section-tint::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #0a1230 0%, #163a8f 55%, var(--accent) 100%);
  opacity: 0.2;
  z-index: 0;
  pointer-events: none;
}

.section-tint > * {
  position: relative;
  z-index: 1;
}

/* --- Interrupteur "no-tint" (voir js/main.js, SECTION_TINT_ENABLED) ---
   Désactive toutes les teintes d'un coup et remet les lignes de séparation
   d'origine sur les 3 pages (Accueil, Projets, Studio). */
body.no-tint .section-tint::before {
  display: none;
}

body.no-tint .wall-section .section-title,
body.no-tint .studio-section .section-title {
  border-top: 1px solid var(--border);
}

body.no-tint .bio-section {
  border-top: 1px solid var(--border);
}

body.no-tint .contact-content {
  border-top: 1px solid var(--border);
}

.bio-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
}

.bio-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.bio-photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px dashed var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 12px;
  text-align: center;
  padding: 16px;
}

.bio-text p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
  margin: 0 0 22px;
}

@media (max-width: 640px) {
  .bio-section {
    grid-template-columns: 1fr;
  }
  .bio-photo,
  .bio-photo-placeholder {
    max-width: 240px;
    margin: 0 auto;
  }
}

/* Wall of visuals (Projets) */

.wall-section {
  margin-bottom: 0;
  padding-bottom: 42px;
  scroll-margin-top: 90px;
  /* display: flow-root plutôt que overflow:hidden : garantit que rien ne
     "remonte" fusionner avec la section précédente, sans rogner le fond
     plein-largeur du dégradé. Marge à 0 + padding-bottom uniforme (42px,
     teinté ou non) + padding-top du titre suivant (42px, voir plus haut) :
     chaque zone respire pareil en haut et en bas, l'écart entre deux
     catégories reste déterministe et identique partout (84px au total). */
  display: flow-root;
}

.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  grid-auto-flow: dense;
  gap: 14px;
}

.wall-item {
  position: relative;
}

.wall-thumb {
  display: block;
  width: 100%;
  position: relative;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.wall-square .wall-thumb {
  aspect-ratio: 1 / 1;
}

/* Override ponctuel : certaines images ont un cadrage qui ne supporte
   pas le recadrage "cover" (sujet trop proche des bords). On les affiche
   en entier (dezoom), quitte a laisser un fond uni autour.
   Selecteurs combines avec l'element + la classe pour battre la
   specificite de ".wall-thumb img" / ".fiche-visual img" ci-dessus. */
.wall-thumb img.thumb-contain,
.fiche-visual img.thumb-contain {
  object-fit: contain;
  background: var(--bg-alt);
}

.wall-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.wall-thumb:hover img {
  transform: scale(1.06);
}

.wall-caption {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 10px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.88), transparent);
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  color: var(--text);
}

.wall-item.active .wall-thumb {
  opacity: 0.35;
}

.wall-item.active .wall-thumb img {
  transform: none;
  filter: grayscale(1);
}

.fiche-viewer[hidden] {
  display: none;
}

.fiche-viewer {
  margin-bottom: 50px;
}

.fiche-viewer .fiche {
  position: relative;
}

.fiche-close {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.fiche-close:hover {
  color: var(--text);
  border-color: var(--text);
}

/* Contact */

.contact-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px 0;
  text-align: center;
}

/* Cas particulier Studio : nombre impair de sections (3), la dernière
   (Albums) n'est pas teintée, contrairement à Accueil (Bio) et Projets
   (Jeu vidéo) qui finissent sur une section teintée juste avant Contact.
   Sans teinte pour marquer la limite, il faut remettre une ligne. */
body.page-studio .contact-content {
  border-top: 1px solid var(--border);
}

.contact-inner {
  max-width: 760px;
  margin: 0 auto;
}

.contact-col .contact-block:last-child {
  margin-bottom: 0;
}

.contact-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  text-align: left;
}

/* Bloc Contact seul, en pleine largeur au-dessus des colonnes Écouter/Réseaux
   (au lieu d'être une 3e colonne de hauteur inégale à côté d'elles). */
.contact-block--main {
  text-align: center;
}

/* Email + téléphone sur une seule ligne, séparés par un point bleu (même
   esprit que .scrollspy-dot). */
.contact-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.contact-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.contact-col {
  text-align: center;
}

@media (max-width: 640px) {
  .contact-columns {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.contact-block {
  margin-bottom: 44px;
}

.contact-block h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  margin: 0 0 14px;
  font-weight: 500;
}

.contact-block a {
  font-size: 17px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--accent);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.social-icons a:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: scale(1.08);
}

.social-icons svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.mentions-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 30px 24px 90px;
  text-align: center;
}

.mentions-section h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  margin: 0 0 14px;
  font-weight: 500;
}

.mentions {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
  margin: 0 0 12px;
}

.mentions:last-child {
  margin-bottom: 0;
}

footer.site-footer {
  text-align: center;
  padding: 30px 24px;
  font-size: 13px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

footer.site-footer a {
  color: var(--text-dim);
  text-decoration: underline;
}

footer.site-footer a:hover {
  color: var(--text);
}

/* Page Mentions légales */

.legal-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 90px 24px 60px;
}

.legal-section h1 {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 600;
  margin: 0 0 32px;
}

.legal-section h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 500;
  margin: 30px 0 8px;
}

.legal-section p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  margin: 0 0 18px;
}

.legal-section a {
  color: var(--accent);
}

/* Newsletter (bouton flottant + pop-up) */

.newsletter-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 200;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.newsletter-fab:hover {
  border-color: var(--text-dim);
  transform: translateY(-2px);
}

.newsletter-fab svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.newsletter-popup {
  position: fixed;
  right: 24px;
  bottom: 88px;
  width: 320px;
  max-width: calc(100vw - 32px);
  z-index: 300;
}

.newsletter-popup[hidden] {
  display: none;
}

.newsletter-popup-inner {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 34px 22px 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.newsletter-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}

.newsletter-text {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0 0 18px;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.newsletter-input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border-radius: 4px;
}

.newsletter-input::placeholder {
  color: var(--text-dim);
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--text-dim);
}

.newsletter-submit {
  background: var(--accent);
  color: var(--text);
  border: 0;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 11px 12px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.newsletter-submit:hover {
  opacity: 0.85;
}

.newsletter-submit:disabled {
  opacity: 0.5;
  cursor: default;
}

.newsletter-success {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 4px 0 0;
}

.newsletter-success[hidden] {
  display: none;
}

.newsletter-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.newsletter-close:hover {
  color: var(--text);
  border-color: var(--text);
}

@media (max-width: 640px) {
  .newsletter-fab {
    right: 16px;
    bottom: 16px;
    width: 46px;
    height: 46px;
  }

  .newsletter-popup {
    right: 16px;
    bottom: 78px;
    width: calc(100vw - 32px);
  }
}
