/* ============================================================
   Reylih Cinematic Universe — Styles globaux
   Thème zen nocturne & steampunk gaming
   ============================================================ */

/* Police de titre locale (Lobster, Apache 2.0) */
@font-face {
    font-family: 'Lobster';
    src: url('/assets/fonts/Lobster_1_4.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ============================================================
   Variables — Charte graphique officielle
   ============================================================ */
:root {
    /* Couleurs principales */
    --c-bg-deep:    #0A1628;   /* Bleu nuit — fonds header, footer, sections sombres */
    --c-bg-main:    #16243A;   /* Bleu marine — fond principal des cartes, sections */
    --c-bg-accent:  #3A5A7A;   /* Bleu acier — éléments secondaires */
    --c-gold:       #C9A55C;   /* Or / laiton — accent principal, titres, bordures */
    --c-gold-light: #D4AF6A;   /* Or clair — hover, variante or */

    /* Couleurs secondaires */
    --c-green:      #2D3B2D;   /* Vert sapin — badges "publié" */
    --c-stone:      #E8E4D8;   /* Pierre clair — texte sur fond sombre */
    --c-moon:       #F4EAD0;   /* Lumière lune — texte clair, mise en valeur */

    /* Typographie */
    --font-title: 'Lobster', cursive;
    --font-body:  'Nunito', sans-serif;

    /* Taille de police */
    --fs-xs:   0.75rem;    /*  12px */
    --fs-sm:   0.875rem;   /*  14px */
    --fs-base: 1rem;       /*  16px */
    --fs-lg:   1.125rem;   /*  18px */
    --fs-xl:   1.5rem;     /*  24px */
    --fs-2xl:  2rem;       /*  32px */
    --fs-3xl:  2.5rem;     /*  40px */

    /* Espacements */
    --sp-xs:  0.25rem;
    --sp-sm:  0.5rem;
    --sp-md:  1rem;
    --sp-lg:  1.5rem;
    --sp-xl:  2rem;
    --sp-2xl: 3rem;
    --sp-3xl: 4rem;

    /* Rayons */
    --r-sm:   4px;
    --r-md:   8px;
    --r-lg:   12px;
    --r-pill: 9999px;

    /* Bordure or standard */
    --border-gold: 1px solid var(--c-gold);

    /* Ombres */
    --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 12px rgba(201, 165, 92, 0.25);

    /* Transition standard */
    --transition: 200ms ease;
}

/* ============================================================
   Reset léger
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    font-weight: 400;
    line-height: 1.65;
    background-color: var(--c-bg-deep);
    color: var(--c-stone);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a {
    color: var(--c-gold);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--c-gold-light); }

ul, ol { list-style: none; }

/* ============================================================
   Typographie
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    color: var(--c-gold);
    line-height: 1.2;
    margin-bottom: var(--sp-sm);
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); font-family: var(--font-body); font-weight: 700; }

p {
    margin-bottom: var(--sp-md);
    color: var(--c-stone);
}
p:last-child { margin-bottom: 0; }

strong { font-weight: 700; color: var(--c-moon); }

/* ============================================================
   Layout global
   ============================================================ */
.site-main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--sp-2xl) var(--sp-lg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--sp-lg);
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
    background-color: var(--c-bg-deep);
    border-bottom: var(--border-gold);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--sp-md) var(--sp-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-lg);
}

.site-logo {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    color: var(--c-gold);
    font-family: var(--font-title);
    font-size: var(--fs-xl);
    flex-shrink: 0;
    transition: color var(--transition);
}
.site-logo:hover { color: var(--c-gold-light); }

.logo-img        { width: 48px; height: 48px; object-fit: contain; }
.logo-img--small { width: 32px; height: 32px; }
.logo-img--xs    { width: 24px; height: 24px; }

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
    flex-wrap: wrap;
}

.site-nav a {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--c-stone);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: color var(--transition);
    white-space: nowrap;
}
.site-nav a:hover,
.site-nav a.active { color: var(--c-gold); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    background-color: var(--c-bg-deep);
    border-top: var(--border-gold);
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--sp-xl) var(--sp-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-lg);
    flex-wrap: wrap;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
}

.footer-site-name {
    font-family: var(--font-title);
    color: var(--c-gold);
    font-size: var(--fs-lg);
}

.footer-nav {
    display: flex;
    gap: var(--sp-lg);
    flex-wrap: wrap;
    align-items: center;
}

.footer-nav a {
    font-size: var(--fs-sm);
    color: var(--c-stone);
    transition: color var(--transition);
}
.footer-nav a:hover { color: var(--c-gold); }

.footer-copy {
    width: 100%;
    text-align: center;
    font-size: var(--fs-xs);
    color: var(--c-bg-accent);
    padding-top: var(--sp-md);
    border-top: 1px solid rgba(201, 165, 92, 0.15);
    margin-top: var(--sp-md);
}

/* ============================================================
   Séparateurs et helpers
   ============================================================ */
.divider {
    border: none;
    border-top: 1px solid rgba(201, 165, 92, 0.3);
    margin: var(--sp-2xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--sp-2xl);
}
.section-header p {
    max-width: 600px;
    margin: var(--sp-sm) auto 0;
}

.text-gold  { color: var(--c-gold); }
.text-moon  { color: var(--c-moon); }
.text-muted { color: var(--c-bg-accent); }

/* ============================================================
   Page : Accueil
   ============================================================ */

/* --- Hero --- */
.site-main:has(.hero) {
    padding: 0;
    max-width: none;
}

.hero {
    background-color: var(--c-bg-deep);
    border-bottom: var(--border-gold);
    padding: var(--sp-3xl) var(--sp-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Halo décoratif derrière le logo */
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(201, 165, 92, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-lg);
}

.hero-logo {
    width: 140px;
    height: 140px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(201, 165, 92, 0.35));
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--c-gold);
    margin-bottom: 0;
}

.hero-tagline {
    font-size: var(--fs-lg);
    color: var(--c-stone);
    margin-bottom: 0;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: var(--sp-md);
    flex-wrap: wrap;
    justify-content: center;
    margin-top: var(--sp-sm);
}

/* --- Player Twitch --- */
.twitch-live {
    background-color: var(--c-bg-main);
    border-bottom: var(--border-gold);
    padding: var(--sp-xl) var(--sp-lg);
}

.twitch-live-header {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    margin-bottom: var(--sp-lg);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #e74c3c;
    flex-shrink: 0;
    animation: pulse-live 1.6s ease-in-out infinite;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.85); }
}

.live-label {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #e74c3c;
    text-transform: uppercase;
}

.twitch-live-title {
    font-family: var(--font-body);
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--c-moon);
    margin-bottom: 0;
}

.twitch-embed-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    border-radius: var(--r-lg);
    overflow: hidden;
    border: var(--border-gold);
    aspect-ratio: 16 / 9;
}

.twitch-embed-wrapper iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* --- Tuiles de navigation --- */
.home-modules {
    padding: var(--sp-3xl) var(--sp-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--sp-xl);
}

.tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-sm);
    padding: var(--sp-xl);
    background-color: var(--c-bg-main);
    border: var(--border-gold);
    border-radius: var(--r-lg);
    text-decoration: none;
    transition: box-shadow var(--transition), transform var(--transition),
                border-color var(--transition);
    box-shadow: var(--shadow-card);
}

.tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    border-color: var(--c-gold-light);
}

.tile-icon {
    font-size: 2rem;
    line-height: 1;
}

.tile-title {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--c-gold);
    margin-bottom: 0;
}

.tile-desc {
    font-size: var(--fs-sm);
    color: var(--c-stone);
    line-height: 1.5;
    margin-bottom: 0;
    flex: 1;
}

/* --- Section présentation --- */
.home-about {
    background-color: var(--c-bg-main);
    border-top: var(--border-gold);
    padding: var(--sp-3xl) var(--sp-lg);
}

.home-about-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.home-about-inner h2 {
    margin-bottom: var(--sp-lg);
}

.home-about-inner p {
    font-size: var(--fs-lg);
    line-height: 1.7;
    margin-bottom: var(--sp-xl);
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .hero-logo   { width: 100px; height: 100px; }
    .tiles-grid  { grid-template-columns: 1fr 1fr; }
    .hero-actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 420px) {
    .tiles-grid  { grid-template-columns: 1fr; }
}

/* ============================================================
   Module : Game 3xpress
   ============================================================ */

/* Placeholder quand il n'y a pas de cover */
.card__cover--placeholder {
    background: linear-gradient(135deg, var(--c-bg-main) 0%, var(--c-bg-deep) 100%);
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fiche détaillée */
.game-detail { max-width: 900px; margin: 0 auto; }

.game-detail-header {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--sp-2xl);
    align-items: start;
    margin-bottom: var(--sp-xl);
}

@media (max-width: 680px) {
    .game-detail-header { grid-template-columns: 1fr; }
}

.game-detail-cover-wrapper {
    border-radius: var(--r-lg);
    overflow: hidden;
    border: var(--border-gold);
    box-shadow: var(--shadow-card);
}

.game-detail-cover { width: 100%; display: block; }

.game-detail-badges { margin-bottom: var(--sp-md); }

.game-detail-title {
    font-size: var(--fs-2xl);
    margin-bottom: var(--sp-sm);
}

.game-detail-duration {
    font-size: var(--fs-sm);
    margin-bottom: var(--sp-md);
}

.game-detail-intro {
    font-size: var(--fs-lg);
    line-height: 1.65;
    color: var(--c-stone);
}

/* Critères */
.game-criteria h2 { margin-bottom: var(--sp-xl); }

.criteria-list { display: flex; flex-direction: column; gap: var(--sp-xl); }

.criterion {
    background-color: var(--c-bg-main);
    border: var(--border-gold);
    border-radius: var(--r-lg);
    padding: var(--sp-lg);
}

.criterion-label {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: var(--fs-sm);
    color: var(--c-gold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--sp-sm);
}

.criterion-content {
    font-size: var(--fs-base);
    line-height: 1.65;
    color: var(--c-stone);
    margin: 0;
}
