/* =========================================================
   XBeat Radio — feuille de style principale
   ========================================================= */

/* Polices auto-hébergées (Barlow / Barlow Condensed, licence SIL OFL) —
   plus aucune requête vers Google Fonts : l'adresse IP des visiteurs n'est
   jamais transmise à un tiers pour l'affichage du site. */
@font-face {
    font-family: 'Barlow';
    src: url('../fonts/barlow-latin-400-normal.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow';
    src: url('../fonts/barlow-latin-500-normal.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow';
    src: url('../fonts/barlow-latin-600-normal.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow';
    src: url('../fonts/barlow-latin-700-normal.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow Condensed';
    src: url('../fonts/barlow-condensed-latin-600-normal.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow Condensed';
    src: url('../fonts/barlow-condensed-latin-700-normal.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow Condensed';
    src: url('../fonts/barlow-condensed-latin-800-normal.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #08080a;
    --bg-alt: #131316;
    --bg-card: #1a1a1e;
    --border: #2a2a2f;
    --red: #e2141a;
    --red-bright: #ff2a2a;
    --red-dark: #7a0209;
    --text: #f5f5f7;
    --text-muted: #a3a3ab;
    --radius: 14px;
    --font: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
    --font-body: 'Barlow', Arial, sans-serif;
}

* { box-sizing: border-box; }

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

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
    font-family: var(--font);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0 0 0.5em;
    font-weight: 700;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Header ---------- */

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

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand img {
    height: 44px;
    width: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.brand-name {
    font-family: var(--font);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.04em;
    line-height: 1.1;
}
.brand-name small {
    display: block;
    font-size: 0.55rem;
    letter-spacing: 0.35em;
    color: var(--text-muted);
    font-weight: 400;
}

nav.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

nav.main-nav a {
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color .15s;
}
nav.main-nav a:hover, nav.main-nav a.active { color: var(--text); }

.btn-play {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-family: var(--font);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background .15s, transform .1s;
}
.btn-play:hover { background: var(--red-bright); }
.btn-play:active { transform: scale(0.97); }
/* Repère "toujours en écoute" sur le bouton du menu quand la popup est fermée
   mais que la radio continue de jouer en fond. */
.btn-play.is-live::after {
    content: '';
    width: 7px; height: 7px; border-radius: 50%;
    background: #fff;
    animation: pulse 1.4s infinite;
}

.btn-play-big {
    padding: 18px 36px;
    font-size: 1rem;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(226,20,26,0.35);
}

.lang-switch {
    display: flex;
    gap: 2px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px;
}
.lang-switch a {
    padding: 5px 10px;
    border-radius: 999px;
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.lang-switch a.active { background: var(--red); color: #fff; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    cursor: pointer;
}

@media (max-width: 860px) {
    nav.main-nav { display: none; }
    .nav-toggle { display: block; }
    .site-header.nav-open nav.main-nav {
        display: flex;
        position: absolute;
        top: 72px; left: 0; right: 0;
        background: var(--bg-alt);
        flex-direction: column;
        padding: 18px 20px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }
}

/* ---------- Hero (accueil) ---------- */

.hero {
    position: relative;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(226,20,26,0.25), transparent 60%),
        linear-gradient(180deg, #0c0c0f 0%, #08080a 100%);
    padding: 64px 0 48px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.onair-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--red);
    color: #fff;
    font-family: var(--font);
    font-weight: 700;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    padding: 6px 14px;
    border-radius: 999px;
    text-transform: uppercase;
    margin-bottom: 18px;
}
.onair-badge .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #fff;
    animation: pulse 1.4s infinite;
}
@keyframes pulse {
    0%,100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 40px;
    align-items: center;
}
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.05;
    margin-bottom: 12px;
}
.hero-time {
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}
.hero-track {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
}
.hero-track strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-art {
    aspect-ratio: 1;
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 30px 60px -20px rgba(226,20,26,0.35);
}

.listeners-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---------- Section titles ---------- */

.section {
    padding: 56px 0;
}
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 26px;
    gap: 16px;
    flex-wrap: wrap;
}
.section-head h2 {
    font-size: 1.7rem;
    margin: 0;
    position: relative;
    padding-bottom: 10px;
}
.section-head h2::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 46px; height: 3px;
    background: var(--red);
    border-radius: 3px;
}
.section-head .see-all {
    color: var(--red);
    font-family: var(--font);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* ---------- Cartes émissions ---------- */

.show-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.show-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .15s, border-color .15s;
    display: flex;
    flex-direction: column;
}
.show-card:hover { transform: translateY(-4px); border-color: var(--red-dark); }

.show-card .thumb {
    aspect-ratio: 16/10;
    background-size: cover;
    background-position: center;
    background-color: #202024;
    position: relative;
}
.show-card .thumb .time-badge {
    position: absolute;
    left: 10px; bottom: 10px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 6px;
}
.show-card .body { padding: 14px 16px 18px; flex: 1; display: flex; flex-direction: column; }
.show-card h3 {
    font-size: 1.05rem;
    margin: 0 0 6px;
    text-transform: none;
    letter-spacing: 0;
}
.show-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin: 0;
    line-height: 1.4;
}

/* ---------- Grille hebdomadaire ---------- */

.day-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
}
.day-tabs button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 12px 16px;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}
.day-tabs button.active {
    color: #fff;
    border-bottom-color: var(--red);
}

.day-panel { display: none; }
.day-panel.active { display: block; }

.slot-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.slot-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    transition: background .15s;
}
.slot-row:last-child { border-bottom: none; }
.slot-row:hover { background: #202024; }
.slot-time {
    font-family: var(--font);
    font-weight: 700;
    color: var(--red-bright);
    width: 64px;
    flex-shrink: 0;
    font-size: 1rem;
}
.slot-thumb {
    width: 52px; height: 52px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: #202024;
    flex-shrink: 0;
}
.slot-title { font-weight: 600; font-size: 0.98rem; }
.slot-desc { color: var(--text-muted); font-size: 0.82rem; margin-top: 2px; }

/* ---------- Équipe ---------- */

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}
.team-card {
    display: block;
    text-align: center;
    color: inherit;
    text-decoration: none;
    padding: 10px;
    border-radius: var(--radius);
    transition: background .15s, transform .1s;
}
a.team-card:hover { background: var(--bg-card); transform: translateY(-2px); }
.team-card .photo {
    width: 140px; height: 140px;
    border-radius: 50%;
    margin: 0 auto 14px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-card);
    border: 3px solid var(--border);
}
.team-card h3 { font-size: 1.05rem; text-transform: none; letter-spacing: 0; margin-bottom: 8px; }
.team-card-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; }
.team-card-tags .tag { margin: 0 4px 4px 0; }

/* ---------- Formulaires ---------- */

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

label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=time], input[type=url], textarea, select {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 11px 14px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.95rem;
}
textarea { resize: vertical; min-height: 120px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--red); }

.field { margin-bottom: 18px; }
.checkbox-field { display: flex; align-items: center; gap: 10px; }
.checkbox-field label { margin: 0; }

button, .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 11px 22px;
    font-family: var(--font);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    font-size: 0.9rem;
}
button:hover, .btn:hover { background: var(--red-bright); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--bg-card); }
.btn-small { padding: 7px 14px; font-size: 0.8rem; }
.btn-danger { background: #7a0209; }
.btn-danger:hover { background: #a3070f; }

.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.92rem;
}
.alert-success { background: rgba(30,150,80,0.15); border: 1px solid #1e9650; color: #6fe3a0; }
.alert-error { background: rgba(226,20,26,0.15); border: 1px solid var(--red); color: #ff8b8f; }

/* ---------- Contenu générique (pages statiques) ---------- */

.prose { max-width: 780px; line-height: 1.7; color: #d6d6da; }
.prose h2 { margin-top: 1.4em; font-size: 1.3rem; }
.prose a { color: var(--red-bright); text-decoration: underline; }

.app-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 14px; }
.app-link-card {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 12px; padding: 16px 18px;
    font-family: var(--font); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}
.app-link-card:hover { border-color: var(--red); }
.app-link-label {
    display: flex;
    align-items: center;
    gap: 12px;
}
.app-link-card img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

/* ---------- Annonces d'accueil ---------- */

.announce-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.announce-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .15s, border-color .15s;
    color: inherit;
    text-decoration: none;
}
a.announce-card:hover { transform: translateY(-4px); border-color: var(--red-dark); }
.announce-art {
    aspect-ratio: 1200/630;
    background-size: cover;
    background-position: center;
    background-color: #202024;
}
.announce-body { padding: 14px 16px 18px; }
.announce-body h3 {
    font-size: 1.05rem;
    margin: 0 0 6px;
    text-transform: none;
    letter-spacing: 0;
}
.announce-body p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin: 0;
}

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 44px 0 28px;
    color: var(--text-muted);
    background: var(--bg-alt);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 {
    color: var(--text);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-grid a:hover { color: var(--text); }
.social-row { display: flex; gap: 12px; margin-top: 14px; }
.social-row a {
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
}
.social-row a:hover { border-color: var(--red); color: var(--red-bright); }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.82rem;
}

/* ---------- Lecteur en popup ---------- */

.player-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(8,8,10,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
/* L'attribut HTML "hidden" doit garder le dessus sur le display:flex ci-dessus,
   sinon la popup reste visible en permanence dès le chargement de la page. */
.player-overlay[hidden] {
    display: none;
}
body.player-open { overflow: hidden; }
.player-modal {
    position: relative;
    width: 100%;
    max-width: 360px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 20px 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    text-align: center;
}
.player-modal-close {
    position: absolute;
    top: 12px; right: 12px;
    width: 28px; height: 28px; border-radius: 50%;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 0.75rem; line-height: 1;
    padding: 0;
}
.player-modal-close:hover { color: #fff; border-color: var(--red); background: transparent; }
.player-modal-brand {
    justify-content: center;
    margin-bottom: 12px;
}
.player-modal-brand img { height: 32px; width: 32px; }
.player-modal-brand .brand-name { font-size: 1rem; }
.player-modal-art {
    width: 100%;
    aspect-ratio: 1200 / 540;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    margin-bottom: 12px;
}
.player-modal-title { font-family: var(--font); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 1rem; margin-bottom: 6px; }
.player-modal-track { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 12px; min-height: 1.3em; }
.quality-switch {
    display: inline-flex;
    gap: 4px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px;
    margin-bottom: 14px;
}
.quality-switch button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}
.quality-switch button.active { background: var(--red); color: #fff; }
.player-modal-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.player-modal-controls .play-toggle {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--red);
    display: flex; align-items: center; justify-content: center;
    color: #fff; border: none; cursor: pointer; font-size: 1.2rem;
    flex-shrink: 0;
}
.player-modal-controls .play-toggle:hover { background: var(--red-bright); }
.player-modal-controls .volume {
    flex: 1;
    max-width: 160px;
    accent-color: var(--red);
    cursor: pointer;
}
.mini-player-frame {
    width: 100%;
    aspect-ratio: 1 / 1.2;
    max-height: 60vh;
    border-radius: 12px;
    overflow: hidden;
}
.mini-player-frame iframe { width: 100%; height: 100%; border: none; display: block; }
@media (max-width: 420px) {
    .player-modal { padding: 22px 16px 18px; }
}

/* ---------- Page émission ---------- */

.show-hero {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 34px;
    align-items: start;
}
@media (max-width: 760px) { .show-hero { grid-template-columns: 1fr; } }
.show-hero .art {
    aspect-ratio: 1;
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
}
.show-hero .art.round { border-radius: 50%; }
.tag {
    display: inline-block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0 6px 6px 0;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
