:root {
    --lettre-spacing: 2px;
    --color-nav-base: #FFC947;
    --color-nav-souris: #8B5CF6;
    --marge-gauche-droite: 50px;
    --adouss-border: 30px;
    --espace-sous-section: 20px;
    --color-bg-dark: #0F172A;
    --color-bg-light: #1E293B;
    --color-text-light: #F3F7FA;
    --color-yellow-vif: #FFC947;
    --color-purple-vif: #8B5CF6;
}

/* Police principale */
@font-face {
    font-family: 'PoliceEcriture';
    src: url('../fonts/showcard-gothic.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    color: var(--color-text-light);
    /* Background Mystery Gradient */
    background:
        /* Particules lumineuses animées */
        radial-gradient(circle at 20% 30%, rgba(255, 201, 71, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 201, 71, 0.02) 0%, transparent 40%),
        radial-gradient(circle at 90% 20%, rgba(139, 92, 246, 0.03) 0%, transparent 40%),

        /* Motif géométrique hexagonal */
        repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(255, 201, 71, 0.02) 2px,
            rgba(255, 201, 71, 0.02) 4px),
        repeating-linear-gradient(60deg,
            transparent,
            transparent 2px,
            rgba(139, 92, 246, 0.02) 2px,
            rgba(139, 92, 246, 0.02) 4px),
        repeating-linear-gradient(120deg,
            transparent,
            transparent 2px,
            rgba(255, 201, 71, 0.02) 2px,
            rgba(255, 201, 71, 0.02) 4px),

        /* Dégradé principal sombre mystérieux */
        linear-gradient(135deg,
            #0a0e1a 0%,
            #0f172a 25%,
            #1e1b3d 50%,
            #0f172a 75%,
            #0a0e1a 100%);

    background-size:
        600px 600px,
        800px 800px,
        500px 500px,
        700px 700px,
        100px 100px,
        100px 100px,
        100px 100px,
        100% 100%;

    background-position:
        0% 0%,
        100% 100%,
        50% 50%,
        0% 100%,
        0 0,
        0 0,
        0 0,
        0 0;

    background-attachment: fixed;
    animation: mysteryShift 30s ease-in-out infinite;
}

@keyframes mysteryShift {

    0%,
    100% {
        background-position:
            0% 0%,
            100% 100%,
            50% 50%,
            0% 100%,
            0 0,
            0 0,
            0 0,
            0 0;
    }

    50% {
        background-position:
            100% 100%,
            0% 0%,
            25% 75%,
            100% 0%,
            0 0,
            0 0,
            0 0,
            0 0;
    }
}


/* Animation Pac-Man Float */
@keyframes pacmanFloat {

    0%,
    100% {
        background-position:
            0% 0%,
            100% 0%,
            0% 100%,
            100% 100%,
            0 0,
            0 0,
            0 0,
            0 0,
            0 0;
    }

    25% {
        background-position:
            5% 10%,
            95% 15%,
            10% 90%,
            90% 95%,
            10px 0,
            0 0,
            0 0,
            25px 25px,
            0 0;
    }

    50% {
        background-position:
            10% 5%,
            90% 10%,
            5% 95%,
            95% 90%,
            20px 0,
            0 0,
            0 0,
            50px 50px,
            0 0;
    }

    75% {
        background-position:
            5% 15%,
            95% 5%,
            15% 85%,
            85% 95%,
            30px 0,
            0 0,
            0 0,
            75px 75px,
            0 0;
    }
}

/* Titres globaux */
h1,
h2,
h3,
h4 {
    font-family: 'PoliceEcriture', Arial, sans-serif;
    color: var(--color-yellow-vif);
    letter-spacing: var(--lettre-spacing);
    margin: 0;
    padding: 0.5em 0;
}

/* Bandeau principal */
.bandeau {
    background-color: var(--color-bg-dark);
    color: var(--color-nav-base);
    border: 3px solid var(--color-yellow-vif);
    border-radius: var(--adouss-border);
    padding: 0px 15px 0px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: 'PoliceEcriture', Arial, sans-serif;
    box-shadow:
        0 0 25px rgba(255, 201, 71, 0.5),
        0 0 40px rgba(255, 201, 71, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Ligne supérieure */
.ligne-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.coordonnees {
    flex: 0 0 200px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
}

.coordonnees .logo-entreprise-lien {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    padding: 0;
    cursor: pointer;
    background: linear-gradient(145deg, #1a2540, #0a0f1c);
    box-shadow:
        0 6px 0 0 #050810,
        0 8px 14px rgba(0, 0, 0, 0.5),
        inset 1px 1px 0 rgba(255, 255, 255, 0.08),
        inset -1px -1px 0 rgba(0, 0, 0, 0.4);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    transform: translateY(0);
}

.coordonnees .logo-entreprise-lien:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 0 0 #050810,
        0 12px 20px rgba(0, 0, 0, 0.6),
        0 0 14px rgba(255, 201, 71, 0.4),
        inset 1px 1px 0 rgba(255, 255, 255, 0.12),
        inset -1px -1px 0 rgba(0, 0, 0, 0.4);
}

.coordonnees .logo-entreprise-lien:active {
    transform: translateY(4px);
    box-shadow:
        0 2px 0 0 #050810,
        0 3px 6px rgba(0, 0, 0, 0.5),
        inset 1px 1px 0 rgba(255, 255, 255, 0.05),
        inset -1px -1px 0 rgba(0, 0, 0, 0.4);
}

.coordonnees .logo-entreprise {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    pointer-events: none;
}

/* Titre avec icônes */
.titre-site {
    flex: 1;
    text-align: center;
    font-size: 24px;
}

.titre-site .titre-icon-1 img {
    height: 64px;
    width: auto;
}

.titre-site .titre-icon-2 img {
    height: 64px;
    width: auto;
}

.titre-site .logo-titre {
    margin: 0;
    font-size: 2em;
    font-weight: bold;
    font-family: 'PoliceEcriture', sans-serif;
    letter-spacing: var(--lettre-spacing);
    color: var(--color-nav-base);
}

.titre-site .logo-titre a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Avatar */
.avatar-bloc {
    position: relative;
    flex: 0 0 200px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    color: var(--color-yellow-vif);
    font-weight: bold;
    text-align: center;
}

.avatar-container {
    position: relative;
    width: 100px;
    height: 100px;
}

.avatar-container .cadre,
.avatar-container img#Avatar {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: translate(-50%, -50%);
}

.avatar-container .cadre img {
    width: 150%;
    height: 150%;
    object-fit: contain;
    z-index: 1;
}

.avatar-container img#Avatar {
    z-index: 2;
}

/* Pseudo et niveau */
.Avatar .pseudo {
    font-size: 16px;
    font-weight: bold;
    color: var(--color-yellow-vif);
    margin: 15px 0 15px 0;
    text-align: center;
    font-family: 'PoliceEcriture', Arial, sans-serif;
    letter-spacing: 1px;
}

.Avatar .niveau {
    font-size: 14px;
    color: var(--color-purple-vif);
    margin: 15px 0 0 0;
    text-align: center;
    font-weight: bold;
}

/* Ligne inférieure */
.ligne-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border-top: 1px solid var(--color-yellow-vif);
    padding-top: 10px;
    font-size: 18px;
    margin-top: 5px;
}

.menu-nav {
    display: flex;
    gap: 10px;
}

.Reseau_sociaux {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    flex-grow: 1;
    margin-right: 40px;
}

.Espace_prive {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.menu-nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
}

.menu-nav a {
    color: var(--color-nav-base);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 15px;
    position: relative;
}

.menu-nav a:hover {
    color: var(--color-nav-souris);
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.2));
    box-shadow:
        0 4px 15px rgba(139, 92, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* Styles pour les emojis cadenas */
.nav-lock {
    font-size: 16px;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.menu-nav a:active .nav-lock {
    transform: scale(1.2);
}

/* Style pour la page courante */
.menu-nav a.current-page {
    color: var(--color-nav-souris);
    font-weight: bolder;
}

.menu-nav a.current-page .nav-lock {
    color: var(--color-nav-souris);
    transform: scale(1.3);
    text-shadow: 0 0 8px var(--color-nav-souris);
}


.Reseau_sociaux .Reseau-icon img {
    height: 50px;
    width: 50px;
}

.Reseau_sociaux .Reseau-icon img:hover {
    transform: scale(1.05);
    cursor: pointer;
}


.Espace_prive a {
    color: var(--color-nav-base);
    text-decoration: none;
    font-weight: bold;
}

.Espace_prive a:hover {
    color: var(--color-nav-souris);
}
/* ============================================
   BADGES DÉFIS TERMINÉS
   ============================================ */

/* Badge terminé sur les cartes */
.badge-defi-termine {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
    z-index: 10;
    animation: fade-in-badge 0.3s ease-in;
}

.badge-icon {
    font-size: 1.1em;
}

.badge-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.9em;
}

@keyframes fade-in-badge {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Effet visuel sur la carte terminée */
.defi-termine {
    position: relative;
    border-color: #10b981 !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2) !important;
}

.defi-termine::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.1));
    border-radius: inherit;
    pointer-events: none;
}

/* Animation subtile au hover des cartes terminées */
.defi-termine:hover {
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.4) !important;
}

/* ============================================
   BOUTONS ARCADE — "insérer un jeton"
   ============================================ */

.btn-arcade,
.btn-arcade-sm {
    box-sizing: border-box;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'PoliceEcriture', Arial, sans-serif;
    letter-spacing: 1px;
    text-decoration: none;
    color: #3a2202;
    border: none;
    cursor: pointer;
    background: linear-gradient(145deg, #ffe08a, var(--color-yellow-vif) 55%, #e8a827);
    transform: translateY(0);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-arcade {
    font-size: 1.05rem;
    padding: 14px 30px;
    border-radius: 50px;
    box-shadow:
        0 6px 0 0 #8a5a12,
        0 9px 16px rgba(0, 0, 0, 0.45),
        inset 0 2px 0 rgba(255, 255, 255, 0.6),
        inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.btn-arcade::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 5px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-arcade:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 0 0 #8a5a12,
        0 14px 22px rgba(0, 0, 0, 0.5),
        0 0 22px rgba(255, 201, 71, 0.55),
        inset 0 2px 0 rgba(255, 255, 255, 0.6),
        inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.btn-arcade:active {
    transform: translateY(4px);
    box-shadow:
        0 2px 0 0 #8a5a12,
        0 3px 8px rgba(0, 0, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

.btn-arcade-coin {
    font-size: 1.1em;
    display: inline-block;
}

.btn-arcade:hover .btn-arcade-coin {
    animation: coin-insert 0.5s ease forwards;
}

@keyframes coin-insert {
    0% {
        transform: translateY(-14px) rotate(0deg);
    }

    60% {
        transform: translateY(2px) rotate(180deg);
    }

    100% {
        transform: translateY(0) rotate(360deg);
    }
}

.btn-arcade-sm {
    font-size: 0.8rem;
    padding: 8px 18px;
    border-radius: 30px;
    margin-top: 8px;
    box-shadow:
        0 4px 0 0 #8a5a12,
        0 6px 10px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-arcade-sm:hover {
    transform: translateY(-1px);
    box-shadow:
        0 5px 0 0 #8a5a12,
        0 8px 14px rgba(0, 0, 0, 0.4),
        0 0 14px rgba(255, 201, 71, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-arcade-sm:active {
    transform: translateY(3px);
    box-shadow:
        0 1px 0 0 #8a5a12,
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-arcade:focus-visible,
.btn-arcade-sm:focus-visible {
    outline: 3px solid var(--color-purple-vif);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

    .btn-arcade-coin,
    .btn-arcade,
    .btn-arcade-sm {
        animation: none !important;
        transition: none !important;
    }
}

