/* =========================================================
   VARIABLES GLOBALES
   ========================================================= */
:root {
    --jaune: #ebad25;
    --jaune-hover: #ffb832;
    --jaune-clair: #ebe22a;
    --jaune-clair-hover: #d6cd0f;

--reception: #eb5d25;
--receptionM: #f7071b;

--nom: #574c4c;

    --gris-texte: #6b7280;
    --gris-fond: #f3f4f6;
    --gris-clair: #d1d5db;
    --gris-moyen: #9ca3af;
    --gris-fonce: #374151;

    --noir: #000000;
    --blanc: #ffffff;

    --fond-clair: #f4f4f7;
    --fond-sombre: #111827;
    --fond-header: #1f2937;

    --ombre: rgba(0,0,0,0.08);
    --ombre-hover: rgba(0,0,0,0.25);

    --bleu: #2563eb;
    --bleu-sombre: #1d4ed8;
    --bleu-clair: #60a5fa;
}

/* =========================================================
   MODE SOMBRE
   ========================================================= */
body.dark {
    background: var(--fond-sombre);
    color: #e5e7eb;
}

body.dark .stats-dashboard,
body.dark .section-block,
body.dark .filtre-sections {
    background: var(--fond-header);
    box-shadow: 0 4px 18px rgba(0,0,0,0.6);
}

body.dark .stat-title,
body.dark .filtre-section h2 {
    color: #e5e7eb;
}

body.dark .stat-value {
    color: var(--bleu-clair);
}

body.dark .stat-sub {
    color: #9ca3af;
}

body.dark .stats-table thead {
    background: var(--bleu-sombre);
}

body.dark .stats-table td {
    border-bottom: 1px solid var(--gris-fonce);
}

body.dark .alpha-btn {
    background: var(--bleu-clair);
}

body.dark .alpha-btn:hover {
    background: var(--bleu-sombre);
}

body.dark .menu-btn,
body.dark .menu-btn:hover {
    background: var(--jaune);
}

body.dark .menu-btn-active {
    background: #c76502;
    color: var(--noir);
}

body.dark .filtre-btn {
    background: #4b5563;
    color: #f3f4f6;
}

body.dark .filtre-btn:hover {
    background: #6b7280;
}

body.dark .filtre-btn.active {
    background: #9ca3af;
    color: var(--noir);
}

body.dark #backToTop {
    background: var(--jaune);
}

body.dark #backToTop:hover {
    background: var(--jaune-hover);
}

body.dark .resume-content {
    background: var(--fond-header);
}

body.dark .jeu-info-line .texte {
    background: var(--gris-fonce);
}

body.dark .video-title {
    color: var(--bleu-clair);
}

/* =========================================================
   STRUCTURE GÉNÉRALE
   ========================================================= */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
    background: var(--fond-clair);
    color: #222;
    transition: background 0.3s, color 0.3s;
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--fond-header);
    color: #f9fafb;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header h1 {
    margin: 0;
    font-size: 1.3rem;
}

.nav-links a {
    color: #e5e7eb;
    text-decoration: none;
    margin-left: 12px;
    font-size: 0.85rem;
}

.nav-links a:hover {
    text-decoration: underline;
}

.toggle-theme {
    cursor: pointer;
    font-size: 0.85rem;
    padding: 6px 10px;
    border-radius: 999px;
    background: #374151;
    color: #e5e7eb;
    margin-left: 12px;
}

/* =========================================================
   DASHBOARD STATS
   ========================================================= */
.stats-dashboard {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px auto 40px;
    padding: 20px;
    background: var(--blanc);
    border-radius: 14px;
    box-shadow: 0 4px 18px var(--ombre);
    max-width: 900px;
}

.stat-card {
    text-align: center;
    padding: 10px 20px;
}

.stat-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--jaune-hover);
}

.stat-sub {
    font-size: 0.9rem;
    color: #666;
    margin-top: 4px;
}

/* =========================================================
   BLOCS DE SECTION
   ========================================================= */
.section-block {
    width: 95%;
    max-width: 1100px;
    margin: 0 auto 40px;
    background: var(--blanc);
    border-radius: 14px;
    box-shadow: 0 3px 12px var(--ombre);
    padding: 20px;
}

.section-block h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* =========================================================
   TABLEAUX
   ========================================================= */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.stats-table thead {
    background: var(--jaune-hover);
    color: #f9fafb;
}

.stats-table th,
.stats-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
}

.stats-table tr:hover {
    background: var(--gris-fond);
}

/* =========================================================
   CARTES DE JEUX
   ========================================================= */
.jeu-card {
    display: flex;
    gap: 20px;
    background: #6b728038;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 4px 14px var(--ombre);
    margin-bottom: 25px;
    border: 1px solid #e5e7eb;
}

.jeu-card-left {
    width: 180px;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    transform-origin: left center;
}

.jeu-card-left:hover {
    transform: scale(1.10);
}

.jeu-card-left img,
.jeu-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    transition: transform 0.3s ease;
}

.jeu-img:hover {
    transform: scale(1.35);
    box-shadow: 0 8px 20px var(--ombre-hover);
}

.jeu-card-right {
    flex: 1;
}

.jeu-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--noir);
    font-variant: small-caps;
}

.jeu-title a {
    color: var(--noir);
    text-decoration: none;
    font-variant: small-caps;
}

.jeu-title a:hover {
    text-decoration: underline;
}

.jeu-year {
    color: var(--gris-texte);
    margin-left: 4px;
    font-size: 0.9em;
}

.jeu-prete,
.jeu-pasJoue,
.jeu-date {
    margin-left: 4px;
    font-style: italic;
}

.jeu-pasJoue {
    font-size: 0.9em;
    color: var(--gris-texte);
	display: block;
}

.jeu-date {
    font-size: 0.9em;
	color: var(--reception);
}

.jeu-prete {
    font-size: 0.7em;
    color: var(--gris-texte);
}

.jeu-nom {
    font-size: 1.6em;
    color: var(--nom);
}

.jeu-pret {
    color: #d71925;
    margin-left: 10px;
    font-style: italic;
}

.jeu-meta {
    margin-top: 6px;
    color: var(--gris-fonce);
}

.jeu-meta span {
    margin-right: 15px;
}

.jeu-auteurs,
.jeu-illustrateurs,
.jeu-editeurs,
.jeu-meca,
.jeu-bgg {
    margin-top: 10px;
    font-size: 0.95rem;
    color: #1f2937;
}

.jeu-bgg-icons {
    display: flex;
    gap: 18px;
    margin-top: 6px;
    font-size: 1rem;
    align-items: center;
}

.jeu-bgg-icons span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge-diff {
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--blanc);
    font-weight: bold;
}

/* =========================================================
   BOUTONS
   ========================================================= */
.btn-resume {
    margin-top: 12px;
    padding: 10px 18px;
    font-size: 1rem;
    background: var(--jaune);
    color: var(--blanc);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease;
}

.btn-resume:hover {
    background: var(--jaune-hover);
    transform: scale(1.05);
}

.btn-regles {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 10px;
    font-size: 0.8rem;
    background: var(--jaune-clair);
    color: var(--blanc);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease;
}

.btn-regles:hover {
    background: var(--jaune-clair-hover);
    transform: scale(1.05);
}

/* =========================================================
   CONTENU RÉSUMÉ
   ========================================================= */
.resume-content {
    display: none;
    margin-top: 10px;
    background: var(--gris-fond);
    padding: 12px;
    border-radius: 8px;
    color: #111827;
    line-height: 1.5;
}

.resume-content.open {
    display: block;
}
/*
.resume-content ul {
    margin: 4px 0;
    padding-left: 0;
}

.resume-content li {
    list-style: none;
    position: relative;
    padding-left: 45px;
    margin: 3px 0;
    line-height: 1;
}

.resume-content li::before {
    content: "🎲";
    position: absolute;
    left: 20px;
    top: 0;
    font-size: 0.7em;
    color: #444;
}*/




/* UL → Meeple Carcassonne */
.resume-content ul {
    margin: 4px 0;
    padding-left: 0;
}

.resume-content ul li {
    list-style: none;
    position: relative;
    padding-left: 45px;
    margin: 3px 0;
    line-height: 1;
}

.resume-content ul li::before {
    content: "🎲 ";
    position: absolute;
    left: 20px;
    top: 0;
    font-size: 0.7em;
    color: #444;
}

/* OL → Dé ludique */
.resume-content ol {
    margin: 4px 0;
    padding-left: 0;
}

.resume-content ol li {
    list-style: none;
    position: relative;
    padding-left: 45px;
    margin: 3px 0;
    line-height: 1;
}

.resume-content ol li::before {
    content: "🃏 ";
    position: absolute;
    left: 20px;
    top: 0;
    font-size: 0.7em;
    color: #444;
}


/* =========================================================
   VIDÉOS
   ========================================================= */
.jeu-videos {
    margin-top: 15px;
}

.video-title {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--bleu);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.video-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-item img {
    width: 80%;
    height: auto;
    display: block;
}

.video-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--ombre-hover);
}

/* Limiter la largeur des cartes sur ordinateur */
.jeu-card {
    max-width: 900px;      /* Ajuste selon ton goût */
    margin-left: auto;
    margin-right: auto;    /* Centre la carte */
}

/* =========================================================
   FILTRES
   ========================================================= */
.filtre-sections {
    width: 95%;
    max-width: 1100px;
    margin: 20px auto;
    padding: 20px;
    background: var(--gris-fond);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--ombre);
    display: flex;
    flex-direction: column;
    align-items: center; /* centre horizontalement */
    gap: 20px; 
}

.filtre-section {
    margin-bottom: 25px;
    width: 100%;
    max-width: 600px; /* largeur contrôlée */
    text-align: center; /* centre le texte */
}

.filtre-section h2 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: var(--gris-fonce);
}

.filtre-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.filtre-btn {
    padding: 8px 14px;
    background: var(--gris-clair);
    color: var(--noir);
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.filtre-btn:hover {
    background: var(--gris-moyen);
    transform: scale(1.05);
}

.filtre-btn.active {
    background: var(--gris-fonce);
    color: var(--blanc);
    font-weight: 600;
}

/* =========================================================
   NAVIGATION ALPHABÉTIQUE
   ========================================================= */
.alpha-nav {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    padding: 10px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    border-bottom: 1px solid #e5e7eb;
}

.alpha-btn {
    padding: 6px 12px;
    background: #ebd425;
    color: var(--blanc);
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
}

.alpha-btn:hover {
    background: #d4bd13;
    transform: scale(1.08);
}

/* =========================================================
   MENU
   ========================================================= */
.menu-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 15px 10px;
}

.menu-btn,
.menu-btn-active {
    padding: 8px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
}

.menu-btn {
    background: var(--jaune);
    color: var(--blanc);
}

.menu-btn:hover {
    background: #c78902;
    transform: scale(1.05);
}

.menu-btn-active {
    background: #c76502;
    color: var(--noir);
    transform: scale(1.08);
    box-shadow: 0 0 8px var(--ombre-hover);
}

/* =========================================================
   BOUTON RETOUR EN HAUT
   ========================================================= */
#backToTop {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    cursor: pointer;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--jaune);
    box-shadow: 0 4px 12px var(--ombre-hover);
    border: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

#backToTop img {
    width: 60%;
    height: auto;
    pointer-events: none;
}

#backToTop:hover {
    background: var(--jaune-hover);
    transform: scale(1.12);
}




/* =========================================================
   RESPONSIVE MOBILE
   ========================================================= */
@media (max-width: 700px) {

    .stats-dashboard {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .jeu-card {
        flex-direction: column;
        align-items: center;
        padding: 15px;
        gap: 15px;
    }

    .jeu-card-left {
		width: 55%;          /* au lieu de 85% */
		max-width: 180px;    /* limite raisonnable */
		/*transform-origin: center;*/
		height: auto !important;   /* ← supprime la hauteur fixe */
		padding: 0;                /* ← évite les marges fantômes */
	}

    .jeu-img {
		/*width: 100%;*/
		max-height: 150px;   /* limite la hauteur */
		/*object-fit: contain;*/
		width: 100%;
		object-fit: contain;
	}

    .jeu-card-right {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 12px;
        font-size: 1rem;
    }


    .jeu-info-line {
        margin: 1px 0;
        line-height: 1.1;
		font-size: 0.9rem;
    }
	
	/* Réduction des espaces entre les sections */
	.jeu-meta {
		display: flex;
		flex-wrap: wrap;
		gap: 6px;
		font-size: 0.9rem;
	}

	.jeu-meta span {
		margin-right: 10px;
		font-size: 0.9rem;
	}

.jeu-nom {
    font-size: 1.4em;
    color: var(--nom);
}

    .jeu-bgg-icons {
		display: flex;
		justify-content: space-between;
		font-size: 0.85rem;   /* un peu plus petit */
		padding: 2px 0;       /* réduit l’espace vertical */
		margin-top: 2px;      /* plus compact */
		/*gap: 10px;*/
    }

    .jeu-info-line .texte {
        display: inline-block;
        background: #e5e7eb;
        padding: 4px 8px;
	}
	
	
	.video-grid {
		grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); /* plus petites */
		gap: 6px;
	}

	.video-item img {
		max-height: 80px;    /* limite la hauteur */
		/*object-fit: cover;*/
	}


}
/* =========================================================
ALIGNEMENT BOUTONS RESUME + REGLES
========================================================= */

/* BOUTONS TOUJOURS EN COLONNE */
.jeu-buttons {
    display: flex;
    flex-direction: column;   /* <-- clé du problème */
    gap: 12px;
    margin-top: 12px;
    align-items: flex-start;  /* ou center si tu préfères */
}

/* Largeur identique */
.jeu-buttons .btn-resume,
.jeu-buttons .btn-regles {
    width: 220px;             /* même largeur sur PC */
    text-align: center;
    display: block;
    padding: 10px 18px;
    font-size: 1rem;
    border-radius: 8px;
    box-sizing: border-box;
}

/* MOBILE : largeur 90% */
@media (max-width: 700px) {
    .jeu-buttons {
        align-items: center;
    }

    .jeu-buttons .btn-resume,
    .jeu-buttons .btn-regles {
        width: 90%;
    }
}

label[for="aext"], input[name="aext"] {
    display: inline-block;
    text-align: center;
}

.filtre-extension {
    text-align: center;
    margin-top: 15px;
}
