/* Reset */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Background global */
html {
    background-color: #1f140d;
    background-image: url("../img/background.png");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

body {
    background: transparent;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
}

img {
    max-width: 100%;
}

.site-header {
    position: relative;
    z-index: 100;
    width: 100%;
    flex-shrink: 0;
}

.site-header-bg {
    width: 100%;
    height: auto;
    display: block;
}

.site-header-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 55px;
}

.header-mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.header-quick-links {
    display: none;
}

.header-quick-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(61, 44, 33, 0.88);
    border: 1px solid rgba(240, 201, 147, 0.22);
    color: #f1e0c6;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.header-quick-link:hover {
    background: rgba(78, 56, 40, 0.95);
    border-color: rgba(240, 201, 147, 0.45);
    transform: translateY(-1px);
}

.site-header-menu {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.page-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 32px;
}

.header-nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-link {
    font-size: 15px;
    color: #f1e0c6;
    text-decoration: none;
    font-weight: bold;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
    transition: 0.2s;
}

.nav-link:hover {
    transform: scale(1.05);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

/* Bouton de connexion */
.btn-connexion {
    background-color: #f1e0c6;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    color: #000;
    font-weight: bold;
    font-family: Arial, sans-serif;
    transition: 0.2s;
}

.btn-connexion:hover {
    background-color: #dac4a3;
    transform: scale(1.05);
}

/* Zone sous le header */
.background-zone {
    min-height: 100vh;
}

/* Titre du site dans le header */
.site-title {
    display: inline-flex;
    align-items: center;
    transition: 0.2s;
}

.site-title img {
    display: block;
    width: 170px;
    height: 115px;
}

.site-title:hover {
    transform: scale(1.05);
}

.header-menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(240, 201, 147, 0.4);
    border-radius: 12px;
    background: rgba(61, 44, 33, 0.88);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.header-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #f1e0c6;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.menu-open .header-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-header.menu-open .header-menu-toggle span:nth-child(2) {
    opacity: 0;
}

.site-header.menu-open .header-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Conteneur du formulaire */
.form-container {
    width: min(350px, calc(100% - 32px));
    margin: 80px auto;
    padding: 25px;
    background-color: #3d2c21;
    color: #f1e0c6;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    font-family: Arial, sans-serif;
}

.form-container h2 {
    margin-top: 0;
}

.profil-container {
    width: min(460px, calc(100% - 32px));
}

.profil-password-section {
    margin-top: 22px;
    padding-top: 10px;
    border-top: 1px solid rgba(241, 224, 198, 0.25);
}

.profil-password-section h3 {
    margin: 8px 0 0;
    font-size: 18px;
    text-align: left;
}

.form-container label {
    display: block;
    text-align: left;
    margin-top: 15px;
    font-weight: bold;
}

.form-container .file-input {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    border-radius: 6px;
    border: 1px solid #000;
    background-color: #f1e0c6;
    font-size: 16px;
    box-sizing: border-box;
    color: #000;
}

.form-container input {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    border-radius: 6px;
    border: 1px solid #000;
    background-color: #f1e0c6;
    font-size: 16px;
    box-sizing: border-box;
}
.input-quantite {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    border-radius: 6px;
    border: 1px solid #000;
    background-color: #f1e0c6;
    font-size: 16px;
    box-sizing: border-box;
}

.form-container textarea {
    flex: 1;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    resize: none;
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    border-radius: 6px;
    border: 1px solid #000;
    background-color: #f1e0c6;
    font-size: 16px;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

.form-container select {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    border-radius: 6px;
    border: 1px solid #000;
    background-color: #f1e0c6;
    font-size: 16px;
    box-sizing: border-box;
}

/* Bouton principal */
.btn-submit {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: linear-gradient(15deg, #f1e0c6, #ffc078cc);
    border-radius: 6px;
    border: 1px solid #000;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    color: #000;
    font-weight: bold;
    font-family: Arial, sans-serif;
    transition: 0.2s;
}

.btn-submit:hover {
    background: linear-gradient(15deg, #ffc98bcc, #ffb25bcc);
}

/* Bouton secondaire */
.btn-secondary {
    display: inline-block;
    margin-top: 15px;
    text-decoration: none;
    color: #f1e0c6;
    font-weight: bold;
    transition: 0.2s;
}

.btn-secondary:hover {
    color: #ffc078cc;
}

/* Texte d'aide */
.help-text {
    font-size: 12px;
    color: #b0a080;
    margin-top: 5px;
    margin-bottom: 10px;
    font-style: italic;
}

/* Bloc de lien de développement */
.dev-reset-link {
    background-color: #1a2a3d;
    border: 1px solid #3a5a7d;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.dev-reset-link p {
    margin: 10px 0;
    color: #a0c0e0;
}

.dev-reset-link code {
    display: block;
    background-color: #0a1f14;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #2ecc71;
    overflow-x: auto;
    word-break: break-all;
    margin: 10px 0;
}

/* Ligne de séparation */
.dev-reset-link hr {
    border: none;
    border-top: 1px solid #3a5a7d;
    margin: 15px 0;
}

/* Ligne d'annonces */
.annonces-ligne {
    display: flex;
    justify-content: center;
    gap: 35px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Carte d'annonce */
.annonce {
    width: 220px;
    min-height: 340px;
    background: #3d2c21;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    transition: 0.2s;
}

.annonce:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.annonce-link {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

/* Zone image */
.annonce-image {
    width: 100%;
    height: 220px;
    background-color: #ffe1becc;
    border-radius: 8px;
    margin-bottom: 15px;
    background-size: cover;
    background-position: center;
    object-fit: contain;
    padding: 10px;
    box-sizing: border-box;
}

/* Nom du produit */
.annonce-nom {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
    color: #f1e0c6;
}

/* Prix */
.annonce-prix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    font-size: 20px;
    font-weight: bold;
    color: #c09565cc;
    margin-top: auto;
    color: #ffeaa7;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.annonce-meta .annonce-prix,
.inventaire-meta .annonce-prix {
    align-self: center;
    text-align: center;
}

.annonce-prix .gold-icon,
.annonce-prix .argent-icon,
.annonce-prix .bronze-icon {
    width: 40px;
    height: 40px;
    margin-left: -8px;
}

.annonce-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    margin-top: 10px;
}

.recherche-panel {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: min(520px, 100%);
}

.recherche-panel[hidden] {
    display: none;
}

.recherche-panel input {
    flex: 1 1 220px;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid rgba(240, 201, 147, 0.3);
    background-color: #3d2c21;
    color: #f1e0c6;
    font-size: 15px;
    font-family: Arial, sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.recherche-panel input::placeholder {
    color: rgba(241, 224, 198, 0.45);
}

.recherche-panel input:focus {
    outline: none;
    border-color: rgba(240, 201, 147, 0.7);
    box-shadow: 0 0 0 3px rgba(240, 201, 147, 0.1);
}

.btn-recherche {
    padding: 10px 16px;
    border: 1px solid #c09565cc;
    border-radius: 6px;
    background-color: #3d2c21;
    color: #f1e0c6;
    cursor: pointer;
    font-weight: bold;
    font-family: Arial, sans-serif;
    font-size: 15px;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn-recherche:hover {
    background-color: #4e3828;
    border-color: #f1e0c6;
    transform: translateY(-1px);
}

.annonce-evaluations {
    margin-top: 10px;
    color: #f1e0c6;
    text-align: center;
    font-size: 13px;
    line-height: 1.35;
}

.annonce-etoiles {
    display: block;
    color: #f5c518;
    font-size: 16px;
    letter-spacing: 1px;
}

.annonce-eval-texte {
    display: block;
    color: #d8c4a9;
}

.annonce-stock {
    color: #f1e0c6;
    font-size: 14px;
}

.shop-panier-form {
    margin-top: 14px;
}

.shop-panier-btn {
    margin-top: 0;
    padding: 10px 12px;
    font-size: 14px;
}

.shop-indisponible {
    margin: 14px 0 0;
    text-align: center;
    color: #ff9999;
    font-weight: bold;
}

.shop-connexion {
    display: block;
    margin-top: 14px;
    text-align: center;
}

.shop-feedback {
    width: min(900px, 85%);
    margin: 24px auto 0;
}

.inventaire-page {
    width: min(1120px, calc(100% - 48px));
    margin: 36px auto 60px;
}

.inventaire-hero {
    margin-bottom: 26px;
    padding: 28px 30px;
    background: linear-gradient(135deg, rgba(61, 44, 33, 0.96), rgba(34, 22, 15, 0.96));
    border: 1px solid rgba(240, 201, 147, 0.35);
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.inventaire-kicker {
    margin: 0 0 8px;
    color: #d7b07c;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 12px;
    font-weight: bold;
}

.inventaire-titre {
    margin: 0;
    color: #f7ead7;
    font-size: 34px;
    line-height: 1.1;
    font-family: 'Arial Black', Arial, sans-serif;
}

.inventaire-sous-titre {
    margin: 10px 0 0;
    color: #e7d7bf;
    font-size: 16px;
}

.inventaire-ligne {
    align-items: stretch;
}

.inventaire-carte {
    position: relative;
    width: 230px;
    min-height: 360px;
    text-decoration: none;
    border: 1px solid rgba(240, 201, 147, 0.18);
    overflow: hidden;
}

.inventaire-carte::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 30%);
    pointer-events: none;
}

.inventaire-carte:hover {
    border-color: rgba(240, 201, 147, 0.45);
}

.inventaire-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1;
    min-width: 44px;
    padding: 6px 10px;
    text-align: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #f1e0c6, #c09565cc);
    color: #25160f;
    font-weight: bold;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}

.inventaire-image {
    height: 240px;
    object-fit: contain;
    padding: 10px;
    box-sizing: border-box;
}

.inventaire-type {
    margin: 2px auto 10px;
    padding: 5px 10px;
    border: 1px solid rgba(240, 201, 147, 0.28);
    border-radius: 999px;
    color: #d9c1a0;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
}

.inventaire-meta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.inventaire-detail {
    color: #e9dcc9;
    font-size: 14px;
    text-align: center;
}

.inventaire-vide {
    width: min(720px, calc(100% - 24px));
    margin: 30px auto 0;
    padding: 28px;
    text-align: center;
    background: rgba(61, 44, 33, 0.94);
    border-radius: 16px;
    color: #f1e0c6;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.enigma-hero {
    margin-bottom: 32px;
}

.enigma-filters {
    margin: 24px 0;
    display: flex;
    justify-content: center;
}

.enigma-filtre-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.enigma-filtre-form label {
    color: #f1e0c6;
    font-size: 16px;
    font-weight: 500;
}

.enigma-filtre-form select {
    padding: 10px 12px;
    background: rgba(61, 44, 33, 0.96);
    border: 1px solid rgba(240, 201, 147, 0.3);
    border-radius: 8px;
    color: #f1e0c6;
    font-size: 16px;
    cursor: pointer;
    font-family: inherit;
}

.enigma-filtre-form select:hover {
    border-color: rgba(240, 201, 147, 0.6);
    background: rgba(61, 44, 33, 0.98);
}

.enigma-filtre-form select:focus {
    outline: none;
    border-color: rgba(240, 201, 147, 0.8);
    box-shadow: 0 0 0 3px rgba(240, 201, 147, 0.1);
}

.enigma-filtre-form select option {
    background: #3d2c21;
    color: #f1e0c6;
}

.enigma-container {
    display: flex;
    justify-content: center;
    max-width: 680px;
    margin: 24px auto;
}

.enigma-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.enigma-card {
    padding: 28px 30px;
    background: rgba(61, 44, 33, 0.96);
    border: 1px solid rgba(240, 201, 147, 0.2);
    border-top: 3px solid rgba(240, 201, 147, 0.5);
    border-radius: 18px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
    color: #f1e0c6;
    width: 100%;
}

.enigma-card--facile  { border-top-color: #4caf50; }
.enigma-card--moyen   { border-top-color: #ffc107; }
.enigma-card--difficile { border-top-color: #f44336; }

.enigma-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.enigma-question {
    margin: 0 0 22px;
    padding-bottom: 18px;
    font-size: 22px;
    line-height: 1.4;
    border-bottom: 1px solid rgba(240, 201, 147, 0.15);
}

.enigma-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.enigma-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border: 1px solid rgba(240, 201, 147, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.enigma-choice:hover {
    background: rgba(240, 201, 147, 0.08);
    border-color: rgba(240, 201, 147, 0.45);
}

.enigma-choice:has(input:checked) {
    background: rgba(240, 201, 147, 0.13);
    border-color: rgba(240, 201, 147, 0.65);
}

.enigma-choice input[type="radio"] {
    width: auto;
    margin: 0;
    accent-color: #f0c993;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.enigma-diff-badge {
    font-weight: bold;
}

.enigma-diff-f { color: #a5d6a7; border-color: rgba(76, 175, 80, 0.5) !important; }
.enigma-diff-m { color: #ffe082; border-color: rgba(255, 193, 7, 0.5) !important; }
.enigma-diff-d { color: #ef9a9a; border-color: rgba(244, 67, 54, 0.5) !important; }

.enigma-form .btn-submit {
    margin-top: 8px;
    width: auto;
    align-self: center;
    padding: 12px 40px;
}

.enigma-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 40px;
    padding: 40px 20px;
}

.enigma-menu h2 {
    text-align: center;
    color: #fff;
    font-size: 32px;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.enigma-menu-bottons {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
}

.enigma-menu-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 30px;
    min-width: 200px;
    background: rgba(61, 44, 33, 0.8);
    border: 2px solid rgba(240, 201, 147, 0.4);
    border-radius: 16px;
    color: #f1e0c6;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.enigma-menu-btn:hover {
    background: rgba(61, 44, 33, 0.95);
    border-color: rgba(240, 201, 147, 0.8);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
    transform: translateY(-4px);
}

.enigma-btn-icon {
    font-size: 48px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.enigma-btn-icon i {
    color: #f0c993;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
    transition: transform 0.25s ease, color 0.25s ease, filter 0.25s ease;
}

.enigma-menu-btn:hover .enigma-btn-icon i {
    transform: scale(1.08);
}

.enigma-alÃ©atoire .enigma-btn-icon i,
.enigma-toutes .enigma-btn-icon i {
    color: #9ed8ff;
}

.enigma-difficulte .enigma-btn-icon i {
    color: #f5c56b;
}

.enigma-categorie .bi-hammer {
    color: #d8b07c;
}

.enigma-categorie .bi-shield-fill {
    color: #8fb7d9;
}

.enigma-categorie .bi-capsule-pill {
    color: #7bd389;
}

.enigma-categorie .bi-stars {
    color: #d8a6ff;
}

.enigma-facile .enigma-btn-icon i,
.enigma-stat-facile .enigma-stat-icon i {
    color: #86d17a;
}

.enigma-moyen .enigma-btn-icon i,
.enigma-stat-moyen .enigma-stat-icon i {
    color: #f0c561;
}

.enigma-difficile .enigma-btn-icon i,
.enigma-stat-difficile .enigma-stat-icon i {
    color: #e78383;
}

.enigma-btn-texte {
    font-size: 20px;
    font-weight: 600;
    color: #f0c993;
}

.enigma-btn-desc {
    font-size: 14px;
    color: #d4b5a0;
}

.enigma-btn-note {
    font-size: 12px;
    color: #ef9a9a;
    font-style: italic;
}

.enigma-facile {
    border-color: rgba(100, 200, 100, 0.5);
}

.enigma-facile:hover {
    border-color: rgba(100, 200, 100, 0.8);
    background: rgba(90, 140, 90, 0.3);
}

.enigma-moyen {
    border-color: rgba(200, 180, 100, 0.5);
}

.enigma-moyen:hover {
    border-color: rgba(200, 180, 100, 0.8);
    background: rgba(140, 120, 60, 0.3);
}

.enigma-difficile {
    border-color: rgba(200, 100, 100, 0.5);
}

.enigma-difficile:hover {
    border-color: rgba(200, 100, 100, 0.8);
    background: rgba(140, 60, 60, 0.3);
}

.enigma-aléatoire {
    border-color: rgba(150, 150, 200, 0.5);
}

.enigma-aléatoire:hover {
    border-color: rgba(150, 150, 200, 0.8);
    background: rgba(100, 100, 150, 0.3);
}

.enigma-difficulte {
    border-color: rgba(200, 150, 100, 0.5);
}

.enigma-difficulte:hover {
    border-color: rgba(200, 150, 100, 0.8);
    background: rgba(150, 100, 50, 0.3);
}

.enigma-menu-retour {
    margin-top: 30px;
}

.enigma-retour-btn {
    display: inline-block;
    padding: 10px 22px;
    background: rgba(61, 44, 33, 0.85);
    border: 2px solid rgba(150, 150, 200, 0.55);
    border-radius: 10px;
    color: #c8c8f0;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.enigma-retour-btn:hover {
    background: rgba(80, 70, 110, 0.45);
    border-color: rgba(150, 150, 200, 0.9);
    transform: translateY(-2px);
}

/* Enigma Statistics Section */
.enigma-stats-section {
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.enigma-stats-section h2 {
    text-align: center;
    color: #f0c993;
    margin-bottom: 20px;
    font-size: 18px;
}

.enigma-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.enigma-stat-card {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 2px solid;
}

.enigma-stat-icon {
    font-size: 28px;
}

.enigma-stat-label {
    font-weight: bold;
    font-size: 16px;
}

.enigma-stat-value {
    font-size: 24px;
    font-weight: bold;
}

.enigma-stat-text {
    font-size: 12px;
}

.enigma-stat-echouees {
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    background: rgba(220, 50, 50, 0.55);
    border-radius: 6px;
    padding: 2px 8px;
}

.enigma-stat-facile {
    background: rgba(76, 175, 80, 0.28);
    border-color: #4caf50;
    color: #fff;
}

.enigma-stat-moyen {
    background: rgba(255, 193, 7, 0.22);
    border-color: #ffc107;
    color: #fff;
}

.enigma-stat-difficile {
    background: rgba(244, 67, 54, 0.28);
    border-color: #f44336;
    color: #fff;
}

.flex-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Filtre catégories — boutons radio */
.filtre-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
    padding-inline: 16px;
}

.filtre-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    gap: 15px;
    flex-wrap: wrap;
}

.filtre-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #3d2c21;
    color: #f1e0c6;
    border: 1px solid #c09565cc;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s;
    box-sizing: border-box;
    line-height: 1.2;
}

button.filtre-option {
    background-color: #3d2c21;
}

.filtre-option input[type="checkbox"] {
    display: none;
}

.filtre-option:hover {
    background-color: #4e3828;
    border-color: #f1e0c6;
}

.filtre-option.actif {
    background-color: #f1e0c6;
    color: #000;
    border-color: #c09565cc;
}

/* Filtre catégories — select (fallback) */
.filtre-select {
    background-color: #3d2c21;
    color: #f1e0c6;
    border: 1px solid #c09565cc;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    cursor: pointer;
    transition: 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23c09565' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 40px;
}

.filtre-select:hover {
    background-color: #4e3828;
    border-color: #ab773bcc;
}

.filtre-select option {
    background-color: #3d2c21;
    color: #c09565cc;
}

/* Solde monnaies */
.header-joueur {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
    margin-left: auto;
}

.solde {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.monnaie {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #f1e0c6;
    font-weight: bold;
    font-family: Arial, sans-serif;
    font-size: 15px;
}

.cercle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.gold-icon {
    width: 60px;
    height: 60px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    background-image: url("../img/gold.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.argent-icon {
    width: 60px;
    height: 60px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    background-image: url("../img/argent.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.bronze-icon {
    width: 60px;
    height: 60px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    background-image: url("../img/bronze.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.header-panier {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.header-panier img {
    width: 75px;
    height: 75px;
    display: block;
    object-fit: contain;
}

.header-panier:hover {
    transform: scale(1.05);
}

.header-panier-badge {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #c0392b;
    color: #fff;
    border: 2px solid #f1e0c6;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    box-sizing: border-box;
}

.joueur-info {
    color: #f1e0c6;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.joueur-profil-link {
    color: #f1e0c6;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

.joueur-profil-link:hover {
    color: #ffc078cc;
}

.joueur-mage {
    color: #ba55d3 !important; /* Mauve */
}

/* Messages erreur / succès */
.erreurs {
    background-color: #5a1a1a;
    border: 1px solid #c0392b;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
}

.erreur {
    color: #ff6b6b;
    margin: 5px 0;
    font-size: 14px;
}

.succes {
    background-color: #1a3d2b;
    border: 1px solid #27ae60;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
    color: #2ecc71;
}

/* ============================================================
   HP Widget (header)
   ============================================================ */
.hp-widget {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.hp-heart {
    font-size: 20px;
    color: #e74c3c;
    filter: drop-shadow(0 0 4px rgba(231, 76, 60, 0.7));
    line-height: 1;
}

.hp-bar-wrap {
    width: 72px;
    height: 10px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hp-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s ease, background-color 0.5s ease;
}

.hp-bar.hp-high  { background: linear-gradient(90deg, #27ae60, #2ecc71); }
.hp-bar.hp-mid   { background: linear-gradient(90deg, #d35400, #f39c12); }
.hp-bar.hp-low   { background: linear-gradient(90deg, #922b21, #e74c3c); box-shadow: 0 0 6px rgba(231, 76, 60, 0.6); }

.hp-value {
    color: #f1e0c6;
    font-size: 12px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    white-space: nowrap;
}

/* ============================================================
   Quiz Reward / Penalty banners (enigma page)
   ============================================================ */
.quiz-feedback-banner {
    width: min(900px, 85%);
    margin: 0 auto 12px;
    padding: 14px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: Arial, sans-serif;
    font-size: 16px;
}

.quiz-reward {
    background: linear-gradient(135deg, rgba(26, 61, 43, 0.97), rgba(22, 50, 30, 0.97));
    border: 1px solid rgba(46, 204, 113, 0.55);
    color: #a8f0c6;
}

.quiz-penalty {
    background: linear-gradient(135deg, rgba(90, 20, 20, 0.97), rgba(70, 15, 15, 0.97));
    border: 1px solid rgba(231, 76, 60, 0.55);
    color: #f5a9a9;
}

.qfb-icon-bronze,
.qfb-icon-argent,
.qfb-icon-gold {
    width: 40px;
    height: 40px;
    display: inline-block;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.qfb-icon-bronze { background-image: url("../img/bronze.png"); }
.qfb-icon-argent { background-image: url("../img/argent.png"); }
.qfb-icon-gold   { background-image: url("../img/gold.png"); }

.qfb-heart {
    font-size: 26px;
    color: #e74c3c;
    filter: drop-shadow(0 0 5px rgba(231, 76, 60, 0.8));
    flex-shrink: 0;
}

.qfb-text {
    font-size: 17px;
    letter-spacing: 0.4px;
}

/* ============================================================
   Death / account-reset banner (enigma page)
   ============================================================ */
.enigma-death-banner {
    width: min(900px, 85%);
    margin: 0 auto 16px;
    padding: 18px 24px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 18px;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, rgba(80, 10, 10, 0.97), rgba(50, 5, 5, 0.97));
    border: 2px solid rgba(220, 50, 50, 0.7);
    color: #ffb3b3;
    box-shadow: 0 0 24px rgba(220, 50, 50, 0.3);
}

.enigma-death-icon {
    font-size: 36px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(220, 50, 50, 0.8));
}

.enigma-death-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.enigma-death-text strong {
    font-size: 18px;
    color: #ff6b6b;
    letter-spacing: 0.5px;
}

.enigma-death-text span {
    font-size: 14px;
    color: #ffb3b3;
}

/* ============================================================
   Animations
   ============================================================ */
@keyframes popIn {
    0%   { opacity: 0; transform: scale(0.7) translateY(-8px); }
    70%  { transform: scale(1.06) translateY(0); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes shakeIn {
    0%   { opacity: 0; transform: translateX(-12px); }
    20%  { transform: translateX(10px); }
    40%  { transform: translateX(-8px); }
    60%  { transform: translateX(6px); }
    80%  { transform: translateX(-3px); }
    100% { opacity: 1; transform: translateX(0); }
}

.animate-pop   { animation: popIn   0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
.animate-shake { animation: shakeIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ============================================================
   Inventory card wrapper (allows form buttons alongside link)
   ============================================================ */
.inventaire-carte-wrapper {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.inventaire-carte-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

/* ============================================================
   "Use item" button — compact (inventory list)
   ============================================================ */
.inventaire-utiliser-form {
    padding: 10px 12px;
    border-top: 1px solid rgba(240, 201, 147, 0.15);
}

.btn-utiliser {
    display: block;
    width: 100%;
    padding: 9px 12px;
    background: linear-gradient(135deg, #1a3d2b, #1f5235);
    border: 1px solid rgba(46, 204, 113, 0.45);
    border-radius: 8px;
    color: #a8f0c6;
    font-size: 13px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    letter-spacing: 0.3px;
}

.btn-utiliser:hover {
    background: linear-gradient(135deg, #1f5235, #27693f);
    border-color: rgba(46, 204, 113, 0.75);
    transform: translateY(-1px);
}

.btn-utiliser:active {
    transform: translateY(0);
}

/* ============================================================
   "Use item" section — large variant (detail page)
   ============================================================ */
.utiliser-section {
    margin-top: 18px;
    padding: 16px;
    background: rgba(26, 61, 43, 0.55);
    border: 1px solid rgba(46, 204, 113, 0.3);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.utiliser-info {
    font-family: Arial, sans-serif;
}

.utiliser-hint {
    color: #b8e8cc;
    font-size: 14px;
}

.utiliser-hint strong {
    color: #2ecc71;
}

.btn-utiliser-lg {
    padding: 12px 18px;
    font-size: 15px;
    border-radius: 10px;
}

@media (max-width: 1024px) {
    .site-header-inner {
        padding: 0 24px;
    }

    .site-header-menu,
    .header-nav,
    .header-joueur {
        gap: 16px;
    }

    .solde {
        gap: 8px;
    }

    .monnaie {
        font-size: 13px;
    }

    .gold-icon,
    .argent-icon,
    .bronze-icon {
        width: 42px;
        height: 42px;
    }

    .inventaire-page {
        width: min(1120px, calc(100% - 32px));
        margin-top: 24px;
    }

    .inventaire-hero {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    html {
        background-attachment: scroll;
    }

    .page-content {
        padding-bottom: 24px;
    }

    .site-header {
        overflow: visible;
    }

    .site-header-bg {
        min-height: 120px;
        object-fit: cover;
    }

    .site-header-inner {
        inset: 0;
        padding: 0px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .header-mobile-top {
        position: relative;
        z-index: 3;
        gap: 10px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
    }

    .site-title img {
        width: 108px;
        height: auto;
    }

    .header-quick-links {
        display: flex;
        gap: 10px;
        position: relative;
        z-index: 3;
    }

    .header-quick-link {
        min-width: 0;
        padding: 9px 12px;
        font-size: 13px;
    }

    .header-menu-toggle {
        display: flex;
        flex-shrink: 0;
        margin-left: auto;
        margin-right: 10px;
    }

    .site-header-menu {
        position: absolute;
        top: calc(100% - 4px);
        left: 12px;
        right: 12px;
        z-index: 4;
        padding: 16px;
        border: 1px solid rgba(240, 201, 147, 0.25);
        border-radius: 16px;
        background: linear-gradient(180deg, rgba(48, 33, 24, 0.98), rgba(28, 18, 12, 0.98));
        box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .site-header.menu-open .site-header-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .header-nav,
    .header-joueur {
        width: 100%;
        margin-left: 0;
    }

    .header-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .nav-link {
        display: block;
        padding: 12px 14px;
        border: 1px solid rgba(240, 201, 147, 0.18);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.04);
        font-size: 14px;
    }

    .nav-link--primary {
        display: none;
    }

    .solde {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px 12px;
        padding: 10px 12px;
        background: rgba(61, 44, 33, 0.55);
        border: 1px solid rgba(240, 201, 147, 0.18);
        border-radius: 12px;
    }

    .header-panier img {
        width: 58px;
        height: 58px;
    }

    .btn-connexion {
        width: 100%;
        text-align: center;
    }

    .joueur-info {
        width: 100%;
        text-align: left;
    }

    .shop-feedback,
    .quiz-feedback-banner,
    .enigma-death-banner {
        width: calc(100% - 32px);
    }

    .inventaire-page {
        width: calc(100% - 24px);
        margin: 20px auto 40px;
    }

    .inventaire-hero {
        padding: 20px 18px;
        border-radius: 14px;
    }

    .inventaire-titre {
        font-size: 28px;
    }

    .inventaire-sous-titre {
        font-size: 15px;
    }

    .annonces-ligne {
        gap: 18px;
        margin-top: 18px;
    }

    .annonce,
    .inventaire-carte {
        width: min(100%, 280px);
        min-height: 0;
    }

    .annonce-image {
        height: 190px;
    }

    .inventaire-image {
        height: 210px;
    }

    .enigma-container {
        margin: 18px auto;
    }

    .enigma-card {
        padding: 22px 18px;
        border-radius: 14px;
    }

    .enigma-question {
        font-size: 19px;
    }

    .enigma-menu {
        min-height: 0;
        gap: 24px;
        padding: 12px 0 24px;
    }

    .enigma-menu h2 {
        font-size: 26px;
    }

    .enigma-menu-bottons {
        width: 100%;
        gap: 16px;
    }

    .enigma-menu-btn {
        width: min(100%, 360px);
        min-width: 0;
        padding: 24px 18px;
    }

    .enigma-btn-icon {
        font-size: 40px;
    }

    .enigma-stats-section {
        margin: 20px auto;
        padding: 16px;
    }

    .enigma-stats-grid {
        grid-template-columns: 1fr;
    }

    .filtre-form {
        gap: 10px;
        margin-top: 18px;
    }

    .filtre-option {
        padding: 9px 14px;
        font-size: 14px;
    }

    .form-container {
        margin: 28px auto 40px;
        padding: 20px 16px;
    }
}

@media (max-width: 520px) {
    .site-header-bg {
        min-height: 132px;
    }

    .site-title img {
        width: 92px;
    }

    .site-header-menu {
        left: 8px;
        right: 8px;
        padding: 14px 12px;
    }

    .header-mobile-top {
        gap: 8px;
    }

    .header-quick-links {
        gap: 8px;
    }

    .header-quick-link {
        padding: 8px 10px;
        font-size: 12px;
    }

    .solde {
        gap: 6px 10px;
        padding: 10px;
    }

    .monnaie {
        font-size: 12px;
        gap: 3px;
    }

    .gold-icon,
    .argent-icon,
    .bronze-icon {
        width: 34px;
        height: 34px;
    }

    .hp-bar-wrap {
        width: 56px;
    }

    .inventaire-page {
        width: calc(100% - 16px);
    }

    .inventaire-hero {
        padding: 18px 14px;
    }

    .inventaire-kicker {
        letter-spacing: 1px;
    }

    .inventaire-titre {
        font-size: 24px;
    }

    .annonce,
    .inventaire-carte {
        width: min(100%, 260px);
        padding: 12px;
    }

    .annonce-image,
    .inventaire-image {
        height: 170px;
    }

    .annonce-nom {
        font-size: 16px;
    }

    .annonce-prix {
        font-size: 18px;
    }

    .enigma-card {
        padding: 18px 14px;
    }

    .enigma-question {
        font-size: 17px;
    }

    .enigma-choice {
        align-items: flex-start;
        padding: 12px 12px;
    }

    .quiz-feedback-banner,
    .enigma-death-banner {
        padding: 12px 14px;
        gap: 10px;
    }
}
