/* themes/feg/style.css */

/* ==========================================================================
   1. VARIABLES & CONFIGURATION GLOBALE
   2. VARIABLEN & GLOBALE KONFIGURATION
   3. VARIABLES & GLOBAL CONFIGURATION
   ========================================================================== */

:root {
    /* --- Couleurs de base / Basisfarben / Base Colors --- */
    --bg-color: #575756;              /* Fond de page / Hintergrund / Page background */
    --card-bg: #6e6e6e;               /* Fond des cartes / Kartenhintergrund / Card background */
    
    /* --- Typographie / Typografie / Typography --- */
    --text-main: #ffffff;             /* Texte principal / Haupttext / Main text */
    --text-muted: #cccccc;            /* Texte secondaire / Sekundärtext / Secondary text (Adjusted for readability) */
    --text-light: #000000;            /* Texte sur fond clair / Text auf hellem Grund / Text on light background */
    
    /* --- Structure / Struktur / Structure --- */
    --border-color: #000000;          /* Bordures / Rahmen / Borders */
    --shadow-color: rgba(255, 255, 255, 0.05); /* Ombres / Schatten / Shadows */
    
    /* --- Accentuation / Akzentfarbe / Accent Color --- */
    --primary-color: #8bb6c7;         /* Couleur principale / Hauptfarbe / Primary color */
    --primary-hover: #688895;         /* Survol / Hover / Hover state */
    
    /* --- Épisode en vedette / Hervorgehobene Episode / Featured Episode --- */
    --featured-bg: #6e6e6e;
    --featured-border: #313131;

    /* --- Boutons / Schaltflächen / Buttons --- */
    /* RSS */
    --btn-rss-bg: #fccb8d;
    --btn-rss-bg-hover: #caa271;
    --btn-rss-text: #000000;

    /* Externe / Social / Externe Links */
    --btn-external-bg: #8bb6c7;
    --btn-external-bg-hover: #688895;
    --btn-external-text: #000000;

    /* Télécharger / Herunterladen / Download */
    --btn-download-bg: #8bb6c7;
    --btn-download-bg-hover: #688895;
    --btn-download-text: #000000;

    /* Vidéo / Video */
    --btn-video-bg: #e98675;
    --btn-video-bg-hover: #b7685c;
    --btn-video-text: #000000;

    /* Document / Dokument */
    --btn-doc-bg: #fccb8d;
    --btn-doc-bg-hover: #caa271;
    --btn-doc-text: #000000;

    /* Secondaire / Sekundär / Secondary */
    --btn-secondary-bg: #6c757d;
    --btn-secondary-bg-hover: #5a6268;
    --btn-secondary-text: #ffffff;

    /* --- Espacements & Formes / Abstände & Formen / Spacing & Shapes --- */
    --container-width: 900px;
    --radius: 8px;           /* Arrondi général / Allgemeiner Radius / General radius */
    --btn-radius: 50px;      /* Arrondi boutons / Button radius */
    --card-radius: 12px;     /* Arrondi cartes / Card radius (Adjusted for modern look) */
    --shadow: 0 2px 5px var(--shadow-color);
    --font-family: Roboto, sans-serif;
    /* --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; */
}

/* --- Couleurs pour thème clair / Farben für helles Theme / Colors for light theme --- */
@media (prefers-color-scheme: light) {
    :root {
        /* --- Couleurs de base / Basisfarben / Base Colors --- */
        --bg-color: #f1f1f1;              /* Fond de page / Hintergrund / Page background */
        --card-bg: #dadada;               /* Fond des cartes / Kartenhintergrund / Card background */
    
        /* --- Typographie / Typografie / Typography --- */
        --text-main: #000000;             /* Texte principal / Haupttext / Main text */
        --text-muted: #000000;            /* Texte secondaire / Sekundärtext / Secondary text (Adjusted for readability) */
        --text-light: #ffffff;            /* Texte sur fond clair / Text auf hellem Grund / Text on light background */
    
        /* --- Structure / Struktur / Structure --- */
        --border-color: #000000;          /* Bordures / Rahmen / Borders */
        --shadow-color: rgba(255, 255, 255, 0.05); /* Ombres / Schatten / Shadows */
    
        /* --- Accentuation / Akzentfarbe / Accent Color --- */
        --primary-color: #688895;         /* Couleur principale / Hauptfarbe / Primary color */
        --primary-hover: #688895;         /* Survol / Hover / Hover state */
    
        /* --- Épisode en vedette / Hervorgehobene Episode / Featured Episode --- */
        --featured-bg: #e8e8e8;
        --featured-border: #313131;

        /* --- Boutons / Schaltflächen / Buttons --- */
        /* RSS */
        --btn-rss-bg: #fccb8d;
        --btn-rss-bg-hover: #caa271;
        --btn-rss-text: #000000;

        /* Externe / Social / Externe Links */
        --btn-external-bg: #8bb6c7;
        --btn-external-bg-hover: #688895;
        --btn-external-text: #000000;

        /* Télécharger / Herunterladen / Download */
        --btn-download-bg: #8bb6c7;
        --btn-download-bg-hover: #688895;
        --btn-download-text: #000000;

        /* Vidéo / Video */
        --btn-video-bg: #e98675;
        --btn-video-bg-hover: #b7685c;
        --btn-video-text: #000000;

        /* Document / Dokument */
        --btn-doc-bg: #fccb8d;
        --btn-doc-bg-hover: #caa271;
        --btn-doc-text: #000000;

        /* Secondaire / Sekundär / Secondary */
        --btn-secondary-bg: #6c757d;
        --btn-secondary-bg-hover: #5a6268;
        --btn-secondary-text: #ffffff;
    }
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */

/* Reset basique / Basis-Reset / Basic Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    padding-bottom: 3rem;
}

/* Conteneur principal / Hauptcontainer / Main Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================================================
   3. ENTÊTE DE PAGE / HEADER / KOPFZEILE
   ========================================================================== */

.site-header {
    background: var(--card-bg);
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-image-wrapper {
    flex-shrink: 0;
}

.podcast-cover-header {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: block;
}

.header-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

.site-title {
    font-size: 2rem;
    margin: 0;
    color: var(--primary-color);
    line-height: 1.2;
}

.site-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

/* ==========================================================================
   4. BOUTONS / SCHALTFLÄCHEN / BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--btn-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s, transform 0.1s;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    color: var(--text-light); /* Default text color for safety */
}

.btn:active { transform: scale(0.98); }
.btn:hover { opacity: 0.9; text-decoration: none; }

/* RSS */
.btn-rss { 
    background: var(--btn-rss-bg); 
    color: var(--btn-rss-text); 
}
.btn-rss:hover { background: var(--btn-rss-bg-hover); }

/* Externe / Social */
.btn-external { 
    background: var(--btn-external-bg); 
    color: var(--btn-external-text);
}
.btn-external:hover { background: var(--btn-external-bg-hover); }

.btn-label { margin-left: 0.3rem; }

/* Télécharger / Download */
.btn-download { 
    background: var(--btn-download-bg); 
    color: var(--btn-download-text); 
}
.btn-download:hover { background: var(--btn-download-bg-hover); }

/* Vidéo / Video */
.btn-video { 
    background: var(--btn-video-bg); 
    color: var(--btn-video-text); 
}
.btn-video:hover { background: var(--btn-video-bg-hover); }

/* Document / Dokument */
.btn-doc { 
    background: var(--btn-doc-bg); 
    color: var(--btn-doc-text); 
}
.btn-doc:hover { background: var(--btn-doc-bg-hover); }

/* Secondaire / Secondary */
.btn-secondary {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
}
.btn-secondary:hover { background: var(--btn-secondary-bg-hover); }

/* ==========================================================================
   5. CONTENU & ÉPISODES / INHALT & EPISODEN / CONTENT & EPISODES
   ========================================================================== */

.no-content {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-muted);
}

.episode-card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Épisode en vedette / Hervorgehobene Episode / Featured Episode */
.featured-episode {
    margin-bottom: 3rem;
}

.featured-episode .episode-card {
    background: var(--featured-bg);
    border-color: var(--featured-border);
    padding: 2rem;
}

.featured-episode h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.featured-episode h2 svg {
    fill: var(--text-main);
}

/* Image épisode / Episodenbild / Episode Image */
.episode-image img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: var(--radius);
    display: block;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

/* Texte épisode / Episodentext / Episode Text */
.episode-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.episode-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.episode-meta svg {
    fill: var(--text-muted);
}

.episode-desc {
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
}

.episode-player {
    margin-bottom: 1.5rem;
    width: 100%;
}

audio {
    width: 100%;
}

.episode-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.separator {
    border: 0;
    border-top: 2px solid var(--border-color);
    margin: 2rem 0;
}

.episode-list h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: var(--text-main);
}

/* ==========================================================================
   6. LECTEUR AUDIO / AUDIO-PLAYER
   ========================================================================== */

.custom-audio-player {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--btn-radius);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    width: 100%;
    box-sizing: border-box;
}

/* Cacher le lecteur natif / Natives Player ausblenden / Hide native player */
.custom-audio-player audio {
    display: none;
}

/* Bouton Play/Pause */
.audio-play-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
    font-size: 1.2rem;
    padding-top: 4px;
}

.audio-play-btn svg {
    fill: var(--text-light);
}

.audio-play-btn:hover {
    background: var(--primary-hover);
    opacity: 1;
}

/* Barre de progression / Fortschrittsbalken / Progress Bar */
.audio-progress-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
}

.audio-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.audio-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.1s linear;
}

/* Temps / Zeit / Time */
.audio-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
    display: flex;
    justify-content: space-between;
}

/* Volume */
.audio-volume-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    color: var(--text-main);
}

.audio-volume-container svg {
    fill: var(--text-main);
}

.audio-volume-slider {
    width: 80px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* ==========================================================================
   7. PIED DE PAGE / FOOTER / FUSSZEILE
   ========================================================================== */

.site-footer {
    margin-top: 3rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.site-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   8. RESPONSIVE / ANPASSUNGSFÄHIG
   ========================================================================== */

/* Tablette & Desktop (min-width: 768px) */
@media (min-width: 768px) {
    .episode-card {
        flex-direction: row;
        align-items: flex-start;
    }

    .episode-image {
        flex-shrink: 0;
        width: 200px;
        margin-right: 1.5rem;
        margin-bottom: 0;
    }
    
    .episode-image img {
        width: 100%;
        max-width: none;
    }

    .episode-content {
        flex-grow: 1;
    }

    .header-actions {
        justify-content: flex-start;
    }
    
    .featured-episode .episode-card {
        padding: 2.5rem;
    }
}

/* Mobile (max-width: 767px) */
@media (max-width: 767px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .header-content {
        align-items: center;
        width: 100%;
    }

    .header-actions {
        justify-content: center;
        width: 100%;
    }

    .header-image-wrapper, 
    .podcast-cover-header {
        display: none !important;
    }

    .site-title {
        font-size: 1.5rem;
    }
    
    .site-description {
        font-size: 1rem;
    }

    /* Lecteur audio mobile / Mobiler Audio-Player / Mobile Audio Player */
    .custom-audio-player {
        flex-wrap: wrap;
        padding: 0.8rem;
        gap: 0.8rem;
    }
    
    .audio-volume-container {
        display: none; /* Caché sur mobile / Auf Mobile ausgeblendet / Hidden on mobile */
    }
    
    .audio-play-btn {
        width: 35px;
        height: 35px;
    }
}