/* ==========================================================
   RUINES DZ — PAGE STREAMERS
   Identité visuelle alignée sur l'accueil :
   bleu-gris sombre / anthracite / rouge / doré
   CSS réservé à la page Streamers.
   ========================================================== */

.streamers-page {
    --stream-bg: #0a0f14;
    --stream-panel: #151c24;
    --stream-panel-light: #1c2b36;
    --stream-line: #344454;
    --stream-red: #d84a35;
    --stream-gold: #c5a45b;
    --stream-text: #f4f6f8;
    --stream-muted: #aab5c2;

    min-height: 60vh;
    color: var(--stream-text);
    background:
        radial-gradient(
            ellipse at 50% 0%,
            rgba(28, 43, 54, .45),
            transparent 55%
        ),
        var(--stream-bg);
}

.streamers-page *,
.streamer-player-modal * {
    box-sizing: border-box;
}

/* ==========================================================
   BANNIÈRE
   ========================================================== */

.streamers-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(35px, 6vw, 75px) 24px;
    border-bottom: 1px solid var(--stream-line);
    background:
        radial-gradient(
            ellipse at 100% 0%,
            rgba(216, 74, 53, .15),
            transparent 40%
        ),
        linear-gradient(
            120deg,
            #1c2b36 0%,
            #151c24 65%,
            #111820 100%
        );
    box-shadow: 0 12px 35px rgba(0, 0, 0, .18);
}

.streamers-hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 7%;
    width: 86%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--stream-red),
        transparent
    );
    opacity: .8;
}

.streamers-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(10, 15, 20, .12),
        transparent 70%
    );
}

.streamers-hero-content {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.streamers-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--stream-gold);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.eyebrow-line {
    width: 28px;
    height: 2px;
    background: var(--stream-red);
}

.streamers-hero h1 {
    margin: 14px 0;
    color: #f4f6f8;
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -1px;
    text-transform: uppercase;
}

.streamers-hero h1 span {
    color: var(--stream-red);
}

.streamers-intro {
    max-width: 680px;
    margin: 18px 0 0;
    color: #c0cbd4;
    font-size: 14px;
    line-height: 1.8;
}

.streamers-hero-stats {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-top: 30px;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hero-stat-number {
    color: #fff;
    font-size: 29px;
    font-weight: 900;
    line-height: 1;
}

.hero-stat-label {
    color: var(--stream-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

.hero-stat-divider {
    width: 1px;
    height: 42px;
    background: var(--stream-line);
}

/* ==========================================================
   CONTENU
   ========================================================== */

.streamers-content {
    padding: clamp(25px, 4vw, 45px) 22px;
}

.streamers-content > .container {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
}

.streamers-section + .streamers-section {
    margin-top: 45px;
}

.streamers-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--stream-line);
}

.section-heading-left {
    display: flex;
    align-items: center;
    gap: 13px;
}

.section-heading-left h2 {
    margin: 0;
    color: #f4f6f8;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .5px;
}

.section-heading-left p {
    margin: 5px 0 0;
    color: var(--stream-muted);
    font-size: 12px;
    line-height: 1.6;
}

.live-indicator,
.offline-indicator {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
}

.live-indicator {
    background: var(--stream-red);
    box-shadow: 0 0 12px rgba(216, 74, 53, .55);
    animation: streamer-live-pulse 1.8s infinite;
}

.offline-indicator {
    background: var(--stream-gold);
    box-shadow: 0 0 10px rgba(197, 164, 91, .25);
}

@keyframes streamer-live-pulse {
    50% {
        box-shadow: 0 0 0 6px rgba(216, 74, 53, .08);
    }
}

.section-counter {
    padding: 7px 10px;
    border: 1px solid var(--stream-line);
    border-radius: 4px;
    background: #111820;
    color: var(--stream-gold);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .7px;
    white-space: nowrap;
}

/* ==========================================================
   GRILLE DES STREAMERS
   ========================================================== */

.streamers-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.streamer-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--stream-line);
    border-radius: 7px;
    background: var(--stream-panel);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .16);
    transition:
        transform .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.streamer-card:hover {
    transform: translateY(-4px);
    border-color: #536879;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .3);
}

.streamer-card-live {
    border-top: 2px solid var(--stream-red);
}

.streamer-card-live:hover {
    border-color: rgba(216, 74, 53, .7);
}

.streamer-card-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #202a35;
}

.streamer-card-cover > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.streamer-card:hover .streamer-card-cover > img {
    transform: scale(1.04);
}

.streamer-cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        0deg,
        rgba(9, 13, 18, .85),
        transparent 65%
    );
    pointer-events: none;
}

/* Badges */

.streamer-live-badge,
.streamer-viewers,
.streamer-offline-badge,
.streamer-platform-badge {
    position: absolute;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .5px;
}

.streamer-live-badge {
    top: 10px;
    left: 10px;
    background: var(--stream-red);
    color: #fff;
}

.streamer-live-badge > span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}

.streamer-viewers {
    right: 10px;
    bottom: 10px;
    background: rgba(9, 13, 18, .9);
    color: #fff;
}

.streamer-offline-badge {
    top: 10px;
    left: 10px;
    border: 1px solid #465564;
    background: rgba(9, 13, 18, .9);
    color: #c0cbd4;
}

.streamer-platform-badge {
    right: 10px;
    bottom: 10px;
    border: 1px solid var(--stream-line);
    background: rgba(9, 13, 18, .9);
    color: var(--stream-gold);
}

/* Couverture des streamers hors ligne */

.streamer-card-cover-offline {
    background:
        radial-gradient(
            ellipse at 100% 0%,
            rgba(216, 74, 53, .12),
            transparent 45%
        ),
        linear-gradient(120deg, #1c2b36, #111820);
}

.offline-cover-pattern {
    position: absolute;
    inset: 0;
    opacity: .35;
    background: repeating-linear-gradient(
        135deg,
        transparent 0 22px,
        rgba(255, 255, 255, .025) 22px 23px
    );
}

/* ==========================================================
   INFORMATIONS DU STREAMER
   ========================================================== */

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

.streamer-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin-bottom: 16px;
}

.streamer-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border: 1px solid #465564;
    border-radius: 50%;
    background: #26323e;
    color: var(--stream-gold);
    font-size: 19px;
    font-weight: 900;
}

.streamer-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.streamer-identity-text {
    min-width: 0;
}

.streamer-identity-text h3 {
    margin: 0 0 5px;
    overflow-wrap: anywhere;
    color: #f4f6f8;
    font-size: 15px;
    font-weight: 800;
}

.streamer-platform-label {
    color: var(--stream-gold);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .7px;
    text-transform: uppercase;
}

/* Jeu en cours */

.streamer-live-info {
    padding: 11px 12px;
    border-left: 2px solid var(--stream-red);
    background: #111820;
}

.streamer-game-label {
    display: block;
    color: var(--stream-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .7px;
}

.streamer-game {
    margin: 6px 0 0;
    color: #f4f6f8;
    font-size: 13px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.streamer-live-title {
    display: -webkit-box;
    min-height: 38px;
    margin: 12px 0;
    overflow: hidden;
    color: #c0cbd4;
    font-size: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.streamer-description {
    min-height: 48px;
    margin: 0 0 16px;
    color: var(--stream-muted);
    font-size: 12px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

/* ==========================================================
   BOUTONS
   ========================================================== */

.streamer-button,
.streamers-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 10px 14px;
    border: 1px solid #465564;
    border-radius: 4px;
    background: #1c2b36;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .5px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        background .18s ease,
        border-color .18s ease,
        transform .18s ease;
}

.streamer-button {
    width: 100%;
}

.streamer-button:hover,
.streamers-cta:hover {
    transform: translateY(-1px);
    border-color: var(--stream-red);
    background: #202a35;
    color: #fff;
}

.streamer-button-live {
    border-color: var(--stream-red);
    background: var(--stream-red);
    color: #fff;
}

.streamer-button-live:hover {
    border-color: #ed624f;
    background: #ed624f;
    color: #fff;
}

.streamers-cta {
    border-color: var(--stream-red);
    background: var(--stream-red);
    color: #fff;
}

.streamers-cta:hover {
    border-color: #ed624f;
    background: #ed624f;
}

/* ==========================================================
   MESSAGES ET ABSENCE DE STREAMERS
   ========================================================== */

.streamers-message {
    max-width: 800px;
    margin: 20px auto;
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid var(--stream-line);
    border-radius: 7px;
    background:
        radial-gradient(
            ellipse at 100% 0%,
            rgba(216, 74, 53, .08),
            transparent 45%
        ),
        var(--stream-panel);
    text-align: center;
}

.streamers-message-icon {
    margin-bottom: 12px;
    font-size: 32px;
}

.streamers-message h2 {
    margin: 0 0 12px;
    color: #f4f6f8;
    font-size: clamp(18px, 3vw, 25px);
    font-weight: 900;
}

.streamers-message p {
    color: var(--stream-muted);
    font-size: 13px;
    line-height: 1.8;
}

/* ==========================================================
   RECRUTEMENT DES CRÉATEURS
   ========================================================== */

.streamers-recruitment {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 45px;
    padding: 24px;
    border: 1px solid #354553;
    border-radius: 8px;
    background: linear-gradient(
        110deg,
        #1b2933,
        #141b22
    );
}

.recruitment-icon {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border: 1px solid #354553;
    border-radius: 7px;
    background: #24313d;
    font-size: 23px;
}

.recruitment-content {
    flex: 1;
    min-width: 0;
}

.recruitment-content h2 {
    margin: 0 0 8px;
    color: #f4f6f8;
    font-size: 17px;
    font-weight: 900;
}

.recruitment-content p {
    margin: 0;
    color: var(--stream-muted);
    font-size: 12px;
    line-height: 1.7;
}

/* ==========================================================
   LECTEUR TWITCH
   ========================================================== */

.streamer-player-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.streamer-player-modal.is-open {
    display: flex;
}

.streamer-player-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 7, 11, .88);
    backdrop-filter: blur(5px);
}

.streamer-player-dialog {
    position: relative;
    z-index: 1;
    width: min(1180px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 18px;
    border: 1px solid #465564;
    border-radius: 7px;
    background: #111820;
    box-shadow: 0 25px 80px rgba(0, 0, 0, .55);
}

.streamer-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}

.streamer-player-header > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.streamer-player-header h2 {
    margin: 0;
    color: #f4f6f8;
    font-size: clamp(16px, 2.5vw, 22px);
    font-weight: 900;
}

.streamer-player-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--stream-red);
    box-shadow: 0 0 12px rgba(216, 74, 53, .6);
}

.streamer-player-close {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: 1px solid #465564;
    border-radius: 4px;
    background: #1c2b36;
    color: #fff;
    font-size: 25px;
    cursor: pointer;
}

.streamer-player-close:hover {
    border-color: var(--stream-red);
    background: #202a35;
}

.streamer-player-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 12px;
}

.streamer-player-video,
.streamer-player-chat {
    min-width: 0;
    min-height: 200px;
    overflow: hidden;
    border: 1px solid #263541;
    border-radius: 4px;
    background: #05080c;
}

.streamer-player-video {
    aspect-ratio: 16 / 9;
}

.streamer-player-video iframe,
.streamer-player-chat iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 200px;
    border: 0;
}

.streamer-player-note {
    margin: 12px 0 0;
    color: var(--stream-muted);
    font-size: 11px;
    line-height: 1.7;
}

body.streamer-player-open {
    overflow: hidden;
}

/* Accessibilité clavier */

.streamer-button:focus-visible,
.streamers-cta:focus-visible,
.streamer-player-close:focus-visible {
    outline: 2px solid var(--stream-gold);
    outline-offset: 3px;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 1050px) {
    .streamers-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .streamer-player-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .streamer-player-chat {
        min-height: 280px;
    }
}

@media (max-width: 700px) {
    .streamers-hero {
        padding: 35px 18px;
    }

    .streamers-content {
        padding: 25px 14px;
    }

    .streamers-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .streamers-section-heading {
        align-items: flex-start;
    }

    .section-heading-left h2 {
        font-size: 16px;
    }

    .section-counter {
        padding: 6px 8px;
        font-size: 8px;
    }

    .streamers-recruitment {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .streamers-recruitment .streamers-cta {
        width: 100%;
    }

    .streamer-player-modal {
        padding: 8px;
    }

    .streamer-player-dialog {
        max-height: calc(100vh - 16px);
        padding: 12px;
    }
}

@media (max-width: 420px) {
    .streamers-hero-stats {
        gap: 18px;
    }

    .hero-stat-number {
        font-size: 25px;
    }

    .streamers-section-heading {
        gap: 8px;
    }

    .section-heading-left {
        gap: 9px;
    }

    .streamer-card-body {
        padding: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .streamers-page *,
    .streamer-player-modal * {
        animation: none !important;
        transition: none !important;
    }
}