/*
Theme Name:        PROMOMEDIA Radio
Theme URI:         https://promomedia.fr
Author:            PROMOMEDIA
Author URI:        https://promomedia.fr
Description:       Thème radio moderne, sombre, conçu pour fonctionner avec le plugin PROMOMEDIA Radio CMS. Entièrement personnalisable via le Customizer.
Version:           1.0.0
Requires at least: 6.4
Tested up to:      6.9
Requires PHP:      8.1
License:           Proprietary
Text Domain:       promomedia-radio-theme

/* ═══════════════════════════════════════════════════════════════════
   PROMOMEDIA Radio Theme — Feuille de styles principale
   Les variables CSS sont gérées via le Customizer WP (inc/customizer.php)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Variables (surchargées par le Customizer) ───────────────────── */
:root {
    --rt-accent:      #e2001a;
    --rt-bg:          #0a0a0a;
    --rt-surface:     #141414;
    --rt-surface2:    #1e1e1e;
    --rt-border:      rgba(255,255,255,.08);
    --rt-text:        #ffffff;
    --rt-muted:       rgba(255,255,255,.55);
    --rt-radius:      4px;
    --rt-radius-lg:   8px;
    --rt-font:        'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Reset / Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--rt-bg);
    color: var(--rt-text);
    font-family: var(--rt-font);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--rt-accent); text-decoration: none; transition: opacity .15s; }
a:hover { opacity: .8; }

img, video { max-width: 100%; height: auto; display: block; }

/* ── Layout ─────────────────────────────────────────────────────── */
.rt-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.rt-section { padding: 60px 0; }

/* ── Header / Nav ───────────────────────────────────────────────── */
#rt-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10,10,10,.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rt-border);
}

#rt-main {
    padding-top: 60px;
}

/* Décaler le header fixe sous la barre admin WordPress */
.admin-bar #rt-header { top: 32px; }
@media screen and (max-width: 782px) {
    .admin-bar #rt-header { top: 46px; }
}

.rt-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 20px;
}

.rt-logo {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -.02em;
    color: var(--rt-text);
    text-decoration: none;
    flex-shrink: 0;
}

.rt-logo span { color: var(--rt-accent); }

.rt-logo-img {
    display: flex;
    align-items: center;
}

.rt-logo-img img {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

/* Navigation principale */
.rt-nav { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.rt-nav li { list-style: none; }

.rt-nav a {
    color: var(--rt-muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: var(--rt-radius);
    transition: color .15s, background .15s;
}

.rt-nav a:hover,
.rt-nav a.current-menu-item { color: var(--rt-text); background: rgba(255,255,255,.06); }

/* Hamburger mobile */
#rt-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--rt-text);
    padding: 4px;
}

#rt-mobile-menu {
    display: none;
    background: var(--rt-surface);
    border-top: 1px solid var(--rt-border);
    padding: 12px 20px;
    flex-direction: column;
    gap: 4px;
}

#rt-mobile-menu a {
    display: block;
    color: var(--rt-muted);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 0;
    border-bottom: 1px solid var(--rt-border);
}

/* ── Hero / Carousel ────────────────────────────────────────────── */
.rt-hero {
    position: relative;
    overflow: hidden;
    background: var(--rt-surface);
}

.rt-carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .8s ease;
}

.rt-carousel-slide.active { opacity: 1; }

.rt-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rt-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,.8) 0%, rgba(0,0,0,.2) 100%);
    display: flex;
    align-items: center;
}

/* ── Cards ──────────────────────────────────────────────────────── */
.rt-card {
    background: var(--rt-surface);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-lg);
    overflow: hidden;
    transition: border-color .2s, transform .2s;
}

.rt-card:hover {
    border-color: var(--rt-accent);
    transform: translateY(-2px);
}

.rt-card-img {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--rt-surface2);
}

.rt-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.rt-card:hover .rt-card-img img { transform: scale(1.04); }

.rt-card-body { padding: 16px; }

.rt-card-category {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--rt-accent);
    margin-bottom: 8px;
}

.rt-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--rt-text);
    margin-bottom: 8px;
}

.rt-card-meta { font-size: 12px; color: var(--rt-muted); }

/* ── Grilles ────────────────────────────────────────────────────── */
.rt-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.rt-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ── Section titres ─────────────────────────────────────────────── */
.rt-section-title {
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -.01em;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.rt-section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: var(--rt-accent);
    border-radius: 2px;
    flex-shrink: 0;
}

.rt-accent { color: var(--rt-accent); }

/* ── Boutons ────────────────────────────────────────────────────── */
.rt-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--rt-radius);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .15s;
    border: none;
    text-decoration: none;
}

.rt-btn-primary   { background: var(--rt-accent); color: #fff; }
.rt-btn-primary:hover { opacity: .85; }

.rt-btn-outline   { background: transparent; border: 1px solid var(--rt-border); color: var(--rt-text); }
.rt-btn-outline:hover { border-color: var(--rt-accent); color: var(--rt-accent); }

/* ── Formulaires ────────────────────────────────────────────────── */
.rt-input, .rt-textarea, .rt-select {
    width: 100%;
    background: var(--rt-surface2);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    color: var(--rt-text);
    font-size: 14px;
    padding: 10px 14px;
    outline: none;
    transition: border-color .15s;
    font-family: inherit;
}

.rt-input:focus, .rt-textarea:focus { border-color: var(--rt-accent); }
.rt-textarea { resize: vertical; min-height: 100px; }

/* ── Footer ─────────────────────────────────────────────────────── */
#rt-footer {
    background: var(--rt-surface);
    border-top: 1px solid var(--rt-border);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.rt-footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 2fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* Colonne émissions : 2 mini-colonnes internes */
.rt-footer-col-emissions { min-width: 0; }
.rt-footer-nav-cols {
    column-count: 2;
    column-gap: 16px;
}
.rt-footer-nav-cols li { break-inside: avoid; }

/* Lien émission : 1 seule ligne, ellipsis si trop long */
.rt-footer-emission-link {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Lien actu : 2 lignes max avec ellipsis */
.rt-footer-actu-link {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* ── Footer — réseaux sociaux & apps ────────────────────────────── */
.rt-footer-social-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 24px 0 20px;
}

.rt-footer-socials {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rt-social-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rt-muted);
    transition: background .2s, color .2s, border-color .2s;
    text-decoration: none;
}

.rt-social-btn:hover {
    background: var(--rt-accent);
    color: #fff;
    border-color: transparent;
}

.rt-social-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.rt-footer-apps {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rt-app-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    padding: 8px 16px;
    color: var(--rt-text);
    text-decoration: none;
    transition: background .2s;
}

.rt-app-btn:hover {
    background: rgba(255,255,255,.15);
}

.rt-app-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.rt-app-label {
    display: flex;
    flex-direction: column;
}

.rt-app-sub {
    font-size: 10px;
    color: var(--rt-muted);
    line-height: 1.2;
}

.rt-app-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.rt-footer-bottom {
    border-top: 1px solid var(--rt-border);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--rt-muted);
}

/* ── Badges ─────────────────────────────────────────────────────── */
.rt-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 20px;
}

.rt-badge-live {
    background: var(--rt-accent);
    color: #fff;
    animation: rt-pulse-badge 2s ease-in-out infinite;
}

/* ── Mode clair ─────────────────────────────────────────────────── */
body.rt-light {
    --rt-bg:       #f4f4f4;
    --rt-surface:  #ffffff;
    --rt-surface2: #ebebeb;
    --rt-border:   rgba(0,0,0,.1);
    --rt-text:     #111111;
    --rt-muted:    rgba(0,0,0,.5);
}

body.rt-light #rt-header {
    background: rgba(244,244,244,.95);
}

body.rt-light .rt-social-btn {
    background: rgba(0,0,0,.06);
    border-color: rgba(0,0,0,.12);
    color: rgba(0,0,0,.5);
}

body.rt-light .rt-social-btn:hover {
    background: var(--rt-accent);
    color: #fff;
    border-color: transparent;
}

body.rt-light .rt-app-btn {
    background: rgba(0,0,0,.06);
    border-color: rgba(0,0,0,.12);
    color: var(--rt-text);
}

body.rt-light .pmr-station-card {
    background: var(--rt-surface);
    border-color: var(--rt-border);
}

/* ── Toggle Dark/Light ──────────────────────────────────────────── */
.rt-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--rt-border);
    background: none;
    color: var(--rt-muted);
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s;
    flex-shrink: 0;
}

.rt-theme-toggle:hover { color: var(--rt-text); border-color: rgba(255,255,255,.25); }
body.rt-light .rt-theme-toggle:hover { border-color: rgba(0,0,0,.25); }

.rt-theme-toggle .rt-icon-sun  { display: none; }
.rt-theme-toggle .rt-icon-moon { display: block; }
body.rt-light .rt-theme-toggle .rt-icon-sun  { display: block; }
body.rt-light .rt-theme-toggle .rt-icon-moon { display: none; }

/* ── Utilitaires ────────────────────────────────────────────────── */
.rt-hidden { display: none !important; }
.rt-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-text-muted { color: var(--rt-muted); }
.rt-text-accent { color: var(--rt-accent); }

/* ── Animations ─────────────────────────────────────────────────── */
@keyframes rt-pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--rt-accent), .4); }
    50%       { box-shadow: 0 0 0 6px rgba(var(--rt-accent), 0); }
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .rt-grid-4 { grid-template-columns: repeat(3, 1fr); }
    .rt-footer-grid { grid-template-columns: 1fr 1fr; }
    .rt-footer-nav-cols { column-count: 1; }
}

@media (max-width: 768px) {
    .rt-grid-3, .rt-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .rt-nav { display: none; }
    #rt-menu-toggle { display: flex; }
    .rt-footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .rt-footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .rt-footer-social-row { flex-direction: column; align-items: flex-start; }
    .rt-footer-apps { flex-direction: column; width: 100%; }
    .rt-app-btn { justify-content: center; }
}

@media (max-width: 480px) {
    .rt-grid-3, .rt-grid-4 { grid-template-columns: 1fr; }
    .rt-section { padding: 40px 0; }
}
