@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Russo+One&family=Orbitron:wght@700;900&display=swap');

@font-face {
    font-family: 'SaiyanSans';
    src: url('../polices/Saiyan-Sans.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Police DB fallback si SaiyanSans absent */
:root {
    --font-db: 'SaiyanSans', 'Bebas Neue', 'Russo One', 'Arial Black', Impact, sans-serif;
    --font-label: 'Bebas Neue', 'Russo One', 'Arial Black', sans-serif;
}

@font-face {
    font-family: 'SaiyanSansLeft';
    src: url('../polices/Saiyan-Sans Left Oblique.ttf') format('truetype');
    font-weight: normal;
    font-style: oblique;
}

@font-face {
    font-family: 'SaiyanSansRight';
    src: url('../polices/Saiyan-Sans Right Oblique.ttf') format('truetype');
    font-weight: normal;
    font-style: oblique;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial Black', Arial, sans-serif;
    background: url('../assets/img/bg3.jpg') center/cover fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    overflow-x: hidden;
    color: white;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
}

.container {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem 1.5rem;
    max-width: 700px;
    width: 100%;
    justify-content: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* ===== PAGE D'ACCUEIL MODERNISÉE ===== */
#homepage {
    display: block;
}

.logo-container {
    margin-bottom: 1.8rem;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.logo {
    max-width: 320px;
    width: 100%;
    filter: drop-shadow(0 10px 28px rgba(255, 153, 0, 0.6));
}

.menu-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.game-button {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.82) 0%, rgba(15, 15, 15, 0.92) 100%);
    border: 2px solid #ffcc00;
    padding: 0.75rem 1.2rem;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5),
                0 0 16px rgba(255, 204, 0, 0.15);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    min-height: 72px;
    width: 100%;
}

.game-button:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7),
                0 0 50px rgba(255, 204, 0, 0.6);
    border-color: #fff;
}

.game-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 204, 0, 0.2), transparent);
    transition: left 0.6s;
}

.game-button:hover::before {
    left: 100%;
}

.game-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 204, 0, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
}

.game-button:hover::after {
    opacity: 1;
}

.icon {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(255, 204, 0, 0.5);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
    transition: all 0.3s;
}

/* Bordures spécifiques pour chaque icône */
.icon-classique {
    border-color: #F78701;
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.3);
}

.icon-technique {
    border-color: #FA85FF;
    box-shadow: 0 4px 15px rgba(153, 0, 255, 0.3);
}


/* Hover states pour chaque icône */
.game-button:hover .icon-classique {
    border-color: #ff9900;
    transform: scale(1.05) rotate(-2deg);
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.6);
}

.game-button:hover .icon-technique {
    border-color: #9900ff;
    transform: scale(1.05) rotate(-2deg);
    box-shadow: 0 6px 20px rgba(153, 0, 255, 0.6);
}



.button-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.button-title {
    font-size: 1.3rem;
    letter-spacing: 2px;
    font-family: "BBH Bogle", 'Bebas Neue', sans-serif;
    color: #ffcc00;
    text-shadow: 0 2px 8px rgba(255, 153, 0, 0.6);
}

.button-subtitle {
    font-size: 0.78rem;
    font-weight: normal;
    opacity: 0.85;
    text-transform: none;
    letter-spacing: 0.3px;
    font-family: 'Arial', sans-serif;
    color: #ddd;
}

.classique-btn {
    border-color: #F78701;
}

.classique-btn:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7),
                0 0 50px rgba(255, 153, 0, 0.6);
}

.technique-btn {
    border-color: #FA85FF;
}

.technique-btn:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7),
                0 0 50px rgba(0, 168, 255, 0.6);
}

.moitie-btn {
    border-color: #9900ff;
}

.moitie-btn:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7),
                0 0 50px rgba(153, 0, 255, 0.6);
}

/* ===== MODES DE JEU ===== */


/* ===== LOGO EN HAUT DU MODE DE JEU ===== */
.game-mode-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.game-mode-logo img {
    max-width: 350px;
    width: 100%;
    filter: drop-shadow(0 10px 30px rgba(255, 153, 0, 0.5));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.game-mode-logo img:hover {
    transform: scale(1.06) translateY(-4px);
    filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.6));
    cursor: pointer;
}


.game-mode {
    display: none;
    position: relative;
    z-index: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 2rem 2rem;
}

.game-mode.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.game-header {
    margin-bottom: 1rem;
    text-align: center;
}

.game-title {
    font-size: 1rem;
    font-family: var(--font-label);
    color: rgba(255, 230, 150, 0.9);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 700;
    margin: 0;
}

.game-subtitle {
    display: none;
}

.game-intro-box .hint-buttons-container {
    margin-bottom: 0;
    margin-top: 1rem;
}

/* ===== BOX INTRO DRAGON BALL ===== */
.game-intro-box {
    max-width: 720px;
    margin: 0 auto 1.8rem auto;
    position: relative;
    background: linear-gradient(160deg,
        rgba(12, 6, 0, 0.96) 0%,
        rgba(22, 10, 0, 0.97) 50%,
        rgba(12, 6, 0, 0.96) 100%);
    border: 0;
    border-radius: 0;
    padding: 1.6rem 2.2rem 1.4rem;
    text-align: center;
    /* Coins coupés style manga */
    clip-path: polygon(
        16px 0%, calc(100% - 16px) 0%,
        100% 16px, 100% calc(100% - 16px),
        calc(100% - 16px) 100%, 16px 100%,
        0% calc(100% - 16px), 0% 16px
    );
    outline: 2px solid rgba(255, 180, 0, 0.35);
    outline-offset: -3px;
    box-shadow:
        0 0 0 1px rgba(255, 100, 0, 0.15),
        0 0 0 3px rgba(0, 0, 0, 0.9),
        0 12px 50px rgba(0, 0, 0, 0.8),
        0 0 60px rgba(255, 80, 0, 0.06),
        inset 0 0 80px rgba(255, 60, 0, 0.04);
    animation: introBoxPulse 4s ease-in-out infinite;
}

@keyframes introBoxPulse {
    0%, 100% {
        outline-color: rgba(255, 180, 0, 0.35);
        box-shadow:
            0 0 0 1px rgba(255, 100, 0, 0.15),
            0 0 0 3px rgba(0, 0, 0, 0.9),
            0 12px 50px rgba(0, 0, 0, 0.8),
            0 0 60px rgba(255, 80, 0, 0.06);
    }
    50% {
        outline-color: rgba(255, 210, 0, 0.6);
        box-shadow:
            0 0 0 1px rgba(255, 140, 0, 0.3),
            0 0 0 3px rgba(0, 0, 0, 0.9),
            0 12px 50px rgba(0, 0, 0, 0.8),
            0 0 80px rgba(255, 100, 0, 0.12);
    }
}

/* Lignes de scan manga en fond */
.game-intro-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -55deg,
        transparent 0px,
        transparent 10px,
        rgba(255, 120, 0, 0.018) 10px,
        rgba(255, 120, 0, 0.018) 12px
    );
    pointer-events: none;
    z-index: 0;
}

/* Barre ki en haut */
.game-intro-box::after {
    content: '';
    position: absolute;
    top: 0; left: 16px; right: 16px;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 180, 0, 0.5) 20%,
        rgba(255, 220, 0, 0.9) 50%,
        rgba(255, 140, 0, 0.7) 80%,
        transparent 100%
    );
    animation: kiSweep 3s ease-in-out infinite;
}

@keyframes kiSweep {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Barre ki verticale gauche */
.game-intro-box .ki-bar-left {
    position: absolute;
    left: 0; top: 16px; bottom: 16px;
    width: 4px;
    background: linear-gradient(to bottom, #ffcc00, #ff6600, #ff2200);
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.8);
    z-index: 1;
}

.game-intro-box > * {
    position: relative;
    z-index: 1;
}

/* ===== BARRE DE RECHERCHE ===== */
.search-container {
    position: relative;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    z-index: 10;
}

#searchInputClassique {
    width: 100%;
    padding: 1.3rem 4.5rem 1.3rem 1.8rem;
    font-size: 1.1rem;
    border: 3px solid #ffcc00;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.85);
    color: #ffcc00;
    font-weight: bold;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5),
                0 0 30px rgba(255, 204, 0, 0.2);
    transition: all 0.3s ease;
    outline: none;
}

#searchInputClassique:focus {
    border-color: #ff9900;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7),
                0 0 40px rgba(255, 153, 0, 0.4);
    transform: translateY(-2px);
}

#searchInputClassique::placeholder {
    color: rgba(255, 204, 0, 0.5);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 55px;
    height: 55px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #ff9900, #ff6600);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.5);
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.7);
}

/* ===== SUGGESTIONS ===== */
.suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #ffcc00;
    border-radius: 12px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7),
                0 0 30px rgba(255, 153, 0, 0.3);
    display: none;
}

.suggestions.show {
    display: block;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.2rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 204, 0, 0.2);
    transition: all 0.3s ease;
}

.suggestion-item:hover {
    background: linear-gradient(90deg, rgba(255, 153, 0, 0.3), rgba(255, 102, 0, 0.2));
    transform: translateX(5px);
}

.player-photo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 1rem;
    border: 2px solid #ffcc00;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.player-info {
    flex: 1;
}

.player-name {
    font-size: 1.05rem;
    font-weight: 900;
    color: #ffcc00;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
}

.player-details {
    font-size: 0.85rem;
    color: #fff;
    font-weight: 600;
}

/* ===== ZONE D'AFFICHAGE DES PERSONNAGES (100x100) ===== */
#resultsClassique {
    margin: 2rem auto;
    max-width: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.categories-header {
    display: grid;
    grid-template-columns: repeat(8, 100px);
    gap: 8px;
    margin: 0 auto 5px auto;
    align-items: end;
}

.category-header-item {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    line-height: 1.1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    padding: 0 4px;
}

.category-header-item::after {
    content: '';
    display: block;
    width: 50%;
    height: 3px;
    background-color: #ffcc00;
    margin: 8px auto 0;
    border-radius: 2px;
}

.selected-player {
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: center;
}

#resultsClassique > * {
    margin-left: auto;
    margin-right: auto;
}

.player-categories {
    display: grid;
    grid-template-columns: repeat(8, 100px);
    gap: 8px;
    margin: 0 auto;
}

.category {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100px;
    height: 100px;
    background: rgba(20, 20, 20, 0.9);
    border-radius: 8px;
    border: 3px solid rgba(255, 204, 0, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.category:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(255, 153, 0, 0.5);
    border-color: rgba(255, 204, 0, 0.7);
}

.category.correct {
    background: linear-gradient(135deg, #00cc00, #009900);
    border-color: #00ff00;
    animation: correctPulse 2s ease-in-out infinite;
}

.category.incorrect {
    background: linear-gradient(135deg, #cc0000, #990000);
    border-color: #ff0000;
}

.category.partial {
    background: linear-gradient(135deg, #FE7E0B, #c95f00);
    border-color: #FE7E0B;
    animation: partialPulse 2s ease-in-out infinite;
}

@keyframes partialPulse {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(254, 126, 11, 0.4);
    }
    50% { 
        box-shadow: 0 8px 25px rgba(254, 126, 11, 0.7);
    }
}

@keyframes correctPulse {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(0, 255, 0, 0.4);
    }
    50% { 
        box-shadow: 0 8px 25px rgba(0, 255, 0, 0.7);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.selected-player.new-player {
    animation: slideInLeft 0.5s ease-out;
}

.selected-player.new-player .category {
    opacity: 0;
    animation: categoryReveal 0.4s ease-out forwards;
}

.selected-player.new-player .category:nth-child(1) { animation-delay: 0s; }
.selected-player.new-player .category:nth-child(2) { animation-delay: 0.3s; }
.selected-player.new-player .category:nth-child(3) { animation-delay: 0.6s; }
.selected-player.new-player .category:nth-child(4) { animation-delay: 0.9s; }
.selected-player.new-player .category:nth-child(5) { animation-delay: 1.2s; }
.selected-player.new-player .category:nth-child(6) { animation-delay: 1.5s; }
.selected-player.new-player .category:nth-child(7) { animation-delay: 1.8s; }
.selected-player.new-player .category:nth-child(8) { animation-delay: 2.1s; }

@keyframes categoryReveal {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    60% {
        transform: scale(1.05) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.category-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    gap: 4px;
}

.player-main-photo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    border-radius: 6px;
}

.player-name-main {
    position: absolute;
    bottom: 4px;
    left: 2px;
    right: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 4px;
    padding: 4px 6px;
    border: 1px solid rgba(255, 204, 0, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffcc00;
    text-align: center;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category:hover .player-name-main {
    opacity: 1;
}

.category-value {
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    word-break: break-word;
    line-height: 1.1;
    max-width: 100%;
    padding: 2px 4px;
    hyphens: auto;
    overflow-wrap: anywhere;
}

.arrow-indicator {
    display: inline-block;
    width: 24px;
    height: 24px;
}

.arrow-indicator svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.5));
}

/* ===== SYSTÈME D'INDICES ===== */
.hint-buttons-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0 auto 1.5rem auto;
    flex-wrap: wrap;
    max-width: 750px;
}

.hint-button {
    position: relative;
    background: rgba(10, 8, 5, 0.75);
    border: 1.5px solid rgba(255, 180, 0, 0.18);
    border-radius: 14px;
    padding: 1rem 1.4rem;
    width: 180px;
    min-width: 160px;
    cursor: not-allowed;
    transition: all 0.25s ease;
    opacity: 0;
    transform: translateY(6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.4rem;
    backdrop-filter: blur(6px);
}

.hint-button::before { display: none; }
.hint-button::after { display: none; }

.hint-button.visible {
    opacity: 1;
    transform: translateY(0);
    animation: hintAppear 0.4s ease-out;
}

@keyframes hintAppear {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.hint-button.unlocked {
    cursor: pointer;
    border-color: rgba(255, 180, 0, 0.45);
    background: rgba(20, 14, 4, 0.85);
}

.hint-button.unlocked:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 204, 0, 0.75);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.2);
}

.hint-button.active {
    border-color: rgba(255, 204, 0, 0.8);
    background: rgba(30, 18, 2, 0.92);
    box-shadow: 0 0 16px rgba(255, 140, 0, 0.2);
}

.hint-button.first-reveal {
    animation: firstReveal 0.4s ease-out;
}

@keyframes firstReveal {
    0% { transform: scale(0.9); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.hint-button .hint-corner-tl,
.hint-button .hint-corner-br { display: none; }

.hint-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    animation: none;
    position: relative;
    z-index: 1;
    line-height: 1;
}

.hint-label {
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--font-label);
    color: rgba(255, 200, 100, 0.7);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: none;
    position: relative;
    z-index: 1;
}

.hint-button.unlocked .hint-label,
.hint-button.active .hint-label {
    color: #ffcc00;
}

.hint-lock {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 1rem;
    opacity: 0.35;
    animation: none;
    position: relative;
    z-index: 1;
}

.hint-unlock-text {
    font-size: 0.62rem;
    font-family: var(--font-label);
    color: rgba(255, 200, 100, 0.5);
    letter-spacing: 1px;
    text-transform: uppercase;
    background: none;
    padding: 0;
    border: none;
    clip-path: none;
}

.hint-value {
    font-size: 0.85rem;
    font-weight: bold;
    font-family: var(--font-label);
    letter-spacing: 1px;
    color: white;
    padding: 0.3rem 0.7rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    border: 1px solid rgba(255, 180, 0, 0.25);
    min-height: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.25s ease;
    text-align: center;
    word-wrap: break-word;
    max-width: 100%;
    position: relative;
    z-index: 1;
    text-shadow: none;
    clip-path: none;
}

.hint-value.revealed {
    opacity: 1;
    transform: scale(1);
    animation: valueReveal 0.3s ease-out;
}

@keyframes valueReveal {
    0% { opacity: 0; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1); }
}

.hint-button.unlocked::before { display: none; }

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(180deg); }
}

/* ===== VICTORY BOX ===== */
.victory-container {
    margin: 3rem auto;
    animation: victoryReveal 0.8s ease forwards;
}

@keyframes victoryReveal {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-5deg);
    }
    50% {
        transform: scale(1.1) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.box {
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.95), rgba(255, 102, 0, 0.95));
    border: 5px solid #ffcc00;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 15px 50px rgba(255, 153, 0, 0.8);
    max-width: 650px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.victory-title {
    font-size: 2.5rem;
    color: #fff;
    text-align: center;
    margin-bottom: 1.5rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.victory-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.victory-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #ffcc00;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    animation: float 3s ease-in-out infinite;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.victory-text {
    font-size: 1.4rem;
    color: #fff;
    font-weight: bold;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    text-align: center;
}

.victory-text strong {
    color: #ffcc00;
    font-size: 1.6rem;
}

.victory-stats {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 2px solid #ffcc00;
}

.stat-label {
    font-weight: bold;
    color: #fff;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffcc00;
}

/* ===== BOUTON RETOUR (suite) ===== */
.back-btn {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(20, 20, 20, 0.9));
    border: 3px solid rgba(255, 255, 255, 0.4);
    padding: 1rem 2.5rem;
    color: white;
    cursor: pointer;
    border-radius: 10px;
    font-size: 1.1rem;
    margin-top: 2rem;
    transition: all 0.3s;
    font-family: 'Arial Black', Arial, sans-serif;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.back-btn:hover {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.9), rgba(40, 40, 40, 1));
    border-color: #ffcc00;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 204, 0, 0.3);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 2.5rem;
    border-radius: 15px;
    border: 3px solid #ffcc00;
    max-width: 650px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    cursor: pointer;
    color: #ffcc00;
    transition: all 0.3s;
}

.modal-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

.modal-title {
    font-size: 2rem;
    color: #ffcc00;
    margin-bottom: 1.5rem;
    text-align: center;
    text-shadow: 0 2px 8px rgba(255, 153, 0, 0.6);
}

/* ===== STATISTIQUES ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-box {
    background: rgba(255, 153, 0, 0.1);
    border: 2px solid #ffcc00;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.stat-box:hover {
    background: rgba(255, 153, 0, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.4);
}

.stat-number {
    font-size: 2.5rem;
    color: #ffcc00;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ===== COMING SOON ===== */
.coming-soon {
    text-align: center;
    padding: 4rem;
    background: rgba(255, 153, 0, 0.1);
    border: 3px dashed #ffcc00;
    border-radius: 20px;
    margin: 2rem 0;
}

.coming-soon h2 {
    font-size: 3rem;
    color: #ffcc00;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 204, 0, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.coming-soon p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ===== HELP MODAL CONTENT ===== */
.help-content {
    text-align: left;
    line-height: 1.8;
    color: #fff;
}

.help-content h3 {
    color: #ffcc00;
    margin: 1.5rem 0 0.5rem 0;
    font-size: 1.3rem;
}

.help-content ol, .help-content ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.help-content li {
    margin-bottom: 0.5rem;
}

.help-content p {
    margin-bottom: 1rem;
}

/* ===== NO RESULTS ===== */
.no-results {
    padding: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

/* ===== SCROLLBAR CUSTOM ===== */
.suggestions::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 10px;
}

.suggestions::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.suggestions::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: #ffcc00;
    border-radius: 10px;
    transition: all 0.3s;
}

.suggestions::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: #ff9900;
}

/* ===== RESPONSIVE TABLET ===== */
@media (max-width: 1024px) {
    .menu-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .game-title {
        font-size: 2rem;
    }

    .categories-header,
    .player-categories {
        grid-template-columns: repeat(8, 90px);
        gap: 6px;
    }

    .category {
        width: 90px;
        height: 90px;
    }

    .player-main-photo {
        width: 90px;
        height: 90px;
    }

    .category-header-item {
        width: 90px;
    }
}

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .logo {
        max-width: 300px;
    }

    .menu-container {
        gap: 1.5rem;
    }

    .game-button {
        padding: 1.2rem;
        min-height: 110px;
        flex-direction: row;
    }

    .icon {
        width: 70px;
        height: 70px;
    }

    .button-title {
        font-size: 1.8rem;
    }

    .button-subtitle {
        font-size: 0.8rem;
    }

    .game-title {
        font-size: 1.8rem;
    }

    .game-subtitle {
        font-size: 1rem;
    }

    #searchInputClassique {
        padding: 1rem 3.5rem 1rem 1.2rem;
        font-size: 1rem;
    }

    .search-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .categories-header,
    .player-categories {
        grid-template-columns: repeat(8, 80px);
        gap: 5px;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 5px;
    }

    .category {
        width: 80px;
        height: 80px;
    }

    .player-main-photo {
        width: 80px;
        height: 80px;
    }

    .category-header-item {
        width: 80px;
        font-size: 0.6rem;
        height: 50px;
    }

    .category-value {
        font-size: 0.65rem;
    }

    .hint-buttons-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

     .hint-button {
        width: 180px;
        height: 180px;
        min-width: 180px;
    }
    
    .hint-icon {
        font-size: 2.5rem;
    }
    
    .hint-label {
        font-size: 0.9rem;
    }
    
    .hint-value {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .game-mode-logo img {
        max-width: 300px;
    }

    .victory-title {
        font-size: 2rem;
    }

    .victory-photo {
        width: 120px;
        height: 120px;
    }

    .victory-text {
        font-size: 1.2rem;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .modal-content {
        padding: 2rem;
        width: 95%;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .coming-soon h2 {
        font-size: 2rem;
    }

    .coming-soon p {
        font-size: 1rem;
    }
}

/* ===== RESPONSIVE SMALL MOBILE ===== */
@media (max-width: 480px) {
    .logo {
        max-width: 250px;
    }

    .game-button {
        padding: 1rem;
        min-height: 100px;
    }

    .icon {
        width: 60px;
        height: 60px;
    }

    .button-title {
        font-size: 1.5rem;
    }

    .button-subtitle {
        font-size: 0.7rem;
    }

    .categories-header,
    .player-categories {
        grid-template-columns: repeat(8, 70px);
        gap: 4px;
    }

    .category {
        width: 70px;
        height: 70px;
    }

    .player-main-photo {
        width: 70px;
        height: 70px;
    }

    .category-header-item {
        width: 70px;
        font-size: 0.55rem;
        height: 45px;
    }

    .category-value {
        font-size: 0.6rem;
        padding: 1px 2px;
    }

    .player-name-main {
        font-size: 0.65rem;
        padding: 2px 4px;
    }

    .hint-button {
        width: 160px;
        height: 160px;
        min-width: 160px;
    }
    
    .hint-icon {
        font-size: 2rem;
    }
    
    .hint-label {
        font-size: 0.85rem;
    }
    
    .hint-value {
        font-size: 0.9rem;
    }
    
    .game-mode-logo img {
        max-width: 250px;
    }
}


/* ===== ANIMATIONS SUPPLEMENTAIRES ===== */
@keyframes twinkle {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* ===== ACCESSIBILITE ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== PRINT ===== */
@media print {
    body::before {
        display: none;
    }

    .back-btn,
    .search-container,
    .hint-buttons-container {
        display: none;
    }
}

/* ============================================
   MODE TECHNIQUE
   ============================================ */

/* --- Box principale style Dragon Ball --- */
.technique-gif-container {
    display: flex;
    justify-content: center;
    margin: 0 auto 2rem;
    max-width: 680px;
    width: 100%;
}

.technique-gif-wrapper {
    position: relative;
    width: 100%;
    max-width: 580px;

    /* Fond sombre avec légère teinte orange */
    background: linear-gradient(160deg,
        rgba(10, 5, 0, 0.97) 0%,
        rgba(25, 10, 0, 0.98) 50%,
        rgba(10, 5, 0, 0.97) 100%);

    /* Bordure Ki dorée */
    border: 2px solid #ffaa00;
    border-radius: 4px;

    /* Découpe en biseau aux coins — style DB */
    clip-path: polygon(
        16px 0%, calc(100% - 16px) 0%,
        100% 16px, 100% calc(100% - 16px),
        calc(100% - 16px) 100%, 16px 100%,
        0% calc(100% - 16px), 0% 16px
    );

    box-shadow:
        0 0 0 1px rgba(255, 80, 0, 0.15),
        0 0 30px rgba(255, 140, 0, 0.35),
        0 0 80px rgba(255, 80, 0, 0.15),
        inset 0 0 40px rgba(0, 0, 0, 0.6);

    overflow: hidden;
}

/* Ligne Ki en haut */
.technique-gif-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        #ff6600 20%,
        #ffcc00 50%,
        #ff6600 80%,
        transparent 100%);
    z-index: 10;
    box-shadow: 0 0 12px rgba(255, 180, 0, 0.8);
}

/* Ligne Ki en bas */
.technique-gif-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        #ff4400 20%,
        #ff9900 50%,
        #ff4400 80%,
        transparent 100%);
    z-index: 10;
    box-shadow: 0 0 12px rgba(255, 100, 0, 0.8);
}

/* --- Titre de la question en haut de la box --- */
.technique-box-header {
    padding: 0.85rem 1.5rem 0.7rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 150, 0, 0.2);
    background: linear-gradient(135deg,
        rgba(255, 100, 0, 0.08),
        rgba(255, 200, 0, 0.05));
    position: relative;
}

.technique-box-question {
    font-family: var(--font-db);
    font-size: 1.15rem;
    color: #ffcc00;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(255, 180, 0, 0.7);
    line-height: 1.2;
}

/* --- Zone GIF --- */
.technique-gif-area {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
}

.technique-gif {
    width: 100%;
    height: auto;
    display: block;
    transition: filter 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    object-fit: cover;
}

.technique-gif.revealed {
    filter: blur(0px) !important;
}

.technique-gif.revealed {
    filter: blur(0px) !important;
}

/* Overlay info sur le gif */
.technique-blur-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 1.2rem 1rem 0.8rem;
    transition: opacity 0.5s;
    pointer-events: none;
}

.technique-blur-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.technique-blur-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
}

.technique-blur-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(255,150,0,0.9));
}

.technique-blur-text {
    font-family: var(--font-label);
    font-size: 0.95rem;
    color: #ffcc00;
    letter-spacing: 0.12em;
    text-shadow: 0 0 12px rgba(255,180,0,0.8);
}

.technique-blur-count {
    font-size: 0.72rem;
    color: rgba(255, 200, 100, 0.65);
    font-style: italic;
}

/* --- Footer de la box (settings intégrés) --- */
.technique-box-footer {
    padding: 0.7rem 1.5rem;
    border-top: 1px solid rgba(255, 150, 0, 0.15);
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.3);
}

/* --- Barre de recherche technique --- */
.search-container-technique {
    position: relative;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    z-index: 10;
}

#searchInputTechnique {
    width: 100%;
    padding: 1.3rem 4.5rem 1.3rem 1.8rem;
    font-size: 1.1rem;
    border: 3px solid #ffcc00;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.85);
    color: #ffcc00;
    font-weight: bold;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(255, 204, 0, 0.2);
    transition: all 0.3s ease;
    outline: none;
    font-family: 'Arial Black', Arial, sans-serif;
}

#searchInputTechnique:focus {
    border-color: #ff9900;
    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(255, 153, 0, 0.4);
    transform: translateY(-2px);
}

#searchInputTechnique::placeholder {
    color: rgba(255, 204, 0, 0.5);
}

#searchInputTechnique:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.search-btn-technique {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 55px;
    height: 55px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #ff9900, #ff6600);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.4);
}

.search-btn-technique:hover {
    background: linear-gradient(135deg, #ffcc00, #ff9900);
    transform: translateY(-50%) scale(1.05);
}

/* --- Liste des essais --- */
.technique-essais-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 620px;
    margin: 0 auto 2rem;
}

.technique-essai-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 0.5px solid rgba(255,255,255,0.08);
    background: rgba(0, 0, 0, 0.55);
    position: relative;
    overflow: hidden;
    animation: essaiSlideIn 0.4s ease-out;
}

.technique-essai-item::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    border-radius: 12px 0 0 12px;
}

.technique-essai-item.correct {
    border-color: rgba(0, 230, 119, 0.737);
    background: rgba(0, 230, 119, 0.4);
}

.technique-essai-item.correct::before {
    background: #00e676;
}

.technique-essai-item.incorrect {
    border-color: rgba(255, 80, 80, 0.734);
    background: rgba(255, 50, 50, 0.4);
}

.technique-essai-item.incorrect::before {
    background: rgb(255, 80, 80);
}

@keyframes essaiSlideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.technique-essai-photo {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 0.5px solid rgba(255,255,255,0.12);
    flex-shrink: 0;
}

.technique-essai-nom {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    font-family: 'Arial', Arial, sans-serif;
}

.technique-essai-num {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    min-width: 18px;
    text-align: right;
}

.technique-essai-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    flex-shrink: 0;
}

.technique-essai-badge.correct {
    background: rgba(0, 230, 118, 0.12);
    color: #00e676;
    border: 0.5px solid rgba(0, 230, 118, 0.35);
}

.technique-essai-badge.incorrect {
    background: rgba(255, 80, 80, 0.1);
    color: rgba(255, 120, 120, 0.9);
    border: 0.5px solid rgba(255, 80, 80, 0.3);
}

.technique-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.technique-badge-dot.correct { background: #00e676; }
.technique-badge-dot.incorrect { background: rgba(255, 100, 100, 0.8); }

/* --- Victory box spécifique technique --- */
/* ============================================================
   VICTORY BOX — DRAGON BALL REDESIGN
   À coller dans style.css en remplacement des sections
   .technique-victory-box, .victory-box-compact, et les classes
   victory-* qui les suivent (lignes ~2006 → 2215 env.)
   ============================================================ */

/* ===== CONTENEUR VICTOIRE ===== */
.victory-container {
    margin: 2rem auto 0;
    max-width: 640px;
    position: relative;
    z-index: 5;
}

/* ===== BOX PRINCIPALE VICTOIRE TECHNIQUE ===== */
.technique-victory-box {
    position: relative;
    background:
        /* Speed lines rayonnant du centre */
        repeating-conic-gradient(
            from 0deg at 50% 50%,
            rgba(255,200,0,0.04) 0deg 3deg,
            transparent 3deg 9deg
        ),
        linear-gradient(160deg, #E65100 0%, #BF360C 35%, #7B1A00 70%, #3E0A00 100%);
    border: none;
    border-radius: 0;
    /* Clip-path trapèze angulaire style DB */
    clip-path: polygon(2% 0%, 98% 0%, 100% 6%, 100% 94%, 98% 100%, 2% 100%, 0% 94%, 0% 6%);
    padding: 0;
    overflow: visible;
    box-shadow:
        0 0 0 3px #ffcc00,
        0 0 0 5px #ff6600,
        0 0 60px rgba(255,153,0,0.7),
        0 0 120px rgba(255,80,0,0.4),
        0 20px 60px rgba(0,0,0,0.9);
    animation: dbBoxAppear 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes dbBoxAppear {
    0%  { transform: scale(0.6) rotate(-3deg); opacity: 0; }
    60% { transform: scale(1.04) rotate(0.5deg); opacity: 1; }
    100%{ transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Aura Ki pulsante derrière la box */
.technique-victory-box::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(ellipse at 50% 50%,
        rgba(255,200,0,0.35) 0%,
        rgba(255,100,0,0.2) 40%,
        transparent 70%);
    border-radius: 50%;
    animation: kiAura 2s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes kiAura {
    0%,100% { transform: scale(1);   opacity: 0.7; }
    50%     { transform: scale(1.08); opacity: 1; }
}

/* Barre Ki horizontale haut */
.technique-victory-box::after {
    content: '';
    position: absolute;
    top: -4px; left: 10%; right: 10%;
    height: 4px;
    background: linear-gradient(90deg,
        transparent,
        #ffee58 20%,
        #fff9c4 50%,
        #ffee58 80%,
        transparent);
    border-radius: 2px;
    box-shadow: 0 0 16px rgba(255,230,0,0.9), 0 0 40px rgba(255,180,0,0.5);
    animation: kiBar 2s ease-in-out infinite;
}

@keyframes kiBar {
    0%,100% { opacity: 0.8; }
    50%     { opacity: 1; box-shadow: 0 0 30px rgba(255,230,0,1), 0 0 60px rgba(255,180,0,0.7); }
}

/* ===== INNER PADDING WRAPPER ===== */
.victory-box-compact {
    padding: 1.6rem 1.8rem 1.4rem !important;
    max-width: 640px;
    margin: 0 auto;
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

/* Supprime l'ancien ::before ::after de compact pour éviter conflit */
.victory-box-compact::before,
.victory-box-compact::after {
    display: none;
}

/* ===== RANGÉE HAUT : photo + infos ===== */
.victory-row-top {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1rem;
}

/* Halo autour de la photo */
.victory-photo-wrap {
    flex-shrink: 0;
    position: relative;
}

.victory-photo-wrap::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: conic-gradient(#ffcc00, #ff9900, #ff4400, #ff9900, #ffcc00);
    animation: photoBorderSpin 3s linear infinite;
    z-index: 0;
}

@keyframes photoBorderSpin {
    to { transform: rotate(360deg); }
}

.victory-photo-wrap .victory-photo,
.victory-photo-compact {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #000 !important;   /* fond noir derrière le conic border */
    box-shadow: 0 0 0 2px #ffcc00, 0 0 20px rgba(255,204,0,0.6) !important;
    position: relative;
    z-index: 1;
    display: block;
}

/* ===== INFOS VICTOIRE ===== */
.victory-main-info {
    flex: 1;
    text-align: left;
}

.victory-title-compact {
    font-family: var(--font-db);
    font-size: 2.2rem;
    color: #fff9c4;
    text-shadow:
        2px 2px 0 #b71c1c,
        4px 4px 0 rgba(0,0,0,0.7),
        0 0 20px rgba(255,220,0,1),
        0 0 50px rgba(255,100,0,0.8);
    letter-spacing: 4px;
    line-height: 1;
    margin-bottom: 0.3rem;
    transform: skewX(-5deg);
    display: inline-block;
    animation: victoryTitlePulse 2.5s ease-in-out infinite;
}

@keyframes victoryTitlePulse {
    0%,100% { text-shadow: 2px 2px 0 #b71c1c, 4px 4px 0 rgba(0,0,0,0.7), 0 0 20px rgba(255,220,0,1), 0 0 50px rgba(255,100,0,0.8); }
    50%     { text-shadow: 2px 2px 0 #b71c1c, 4px 4px 0 rgba(0,0,0,0.7), 0 0 40px rgba(255,240,0,1), 0 0 90px rgba(255,130,0,1), 0 0 140px rgba(255,60,0,0.5); }
}

.victory-text-compact {
    font-size: 0.95rem;
    color: rgba(255,255,220,0.95);
    margin-bottom: 0.6rem;
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.victory-name {
    color: #ffee58;
    font-weight: 900;
    text-shadow: 0 0 12px rgba(255,220,0,0.9);
}

/* ===== PILLS STATS ===== */
.victory-stats-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.stat-pill {
    background: rgba(0,0,0,0.5);
    border: 1.5px solid rgba(255,204,0,0.6);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.82rem;
    color: #ffcc00;
    font-family: var(--font-label);
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 0 8px rgba(255,153,0,0.3);
}

.countdown-pill {
    color: #fff;
    border-color: rgba(255,255,255,0.3);
    box-shadow: none;
}

/* ===== GIF VICTOIRE ===== */
.technique-victory-gif {
    width: 100%;
    max-width: 380px;
    margin: 0.8rem auto 1rem;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

/* Cadre style énergie ki autour du gif */
.technique-victory-gif::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 3px solid #ffcc00;
    border-radius: 4px;
    box-shadow:
        inset 0 0 20px rgba(255,180,0,0.2),
        0 0 20px rgba(255,153,0,0.6),
        0 0 50px rgba(255,80,0,0.3);
    z-index: 2;
    pointer-events: none;
}

/* Coin triangulaires style DB aux 4 angles */
.technique-victory-gif::after {
    content: '';
    position: absolute;
    inset: -1px;
    background:
        linear-gradient(135deg, #ffcc00 8px, transparent 8px) top left,
        linear-gradient(-135deg, #ffcc00 8px, transparent 8px) top right,
        linear-gradient(45deg, #ffcc00 8px, transparent 8px) bottom left,
        linear-gradient(-45deg, #ffcc00 8px, transparent 8px) bottom right;
    background-size: 20px 20px;
    background-repeat: no-repeat;
    z-index: 3;
    pointer-events: none;
}

.technique-victory-gif-img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== SECTION MODE SUIVANT ===== */
.next-mode-section {
    border-top: 1px solid rgba(255,200,0,0.25);
    padding-top: 1rem;
    margin-top: 0.4rem;
}

.next-mode-label {
    font-size: 0.7rem;
    color: rgba(255,230,150,0.5);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
    font-family: var(--font-label);
}

/* Bouton mode suivant — style DB */
.next-mode-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    background: rgba(0,0,0,0.5);
    border: 2px solid rgba(255,204,0,0.35);
    border-radius: 0;
    clip-path: polygon(0 0, 100% 0, 97% 100%, 3% 100%);
    padding: 0.75rem 1.2rem;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

/* Shimmer hover */
.next-mode-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,204,0,0.15), transparent);
    transition: left 0.5s ease;
}

.next-mode-btn:hover::before {
    left: 140%;
}

.next-mode-btn:hover {
    background: rgba(0,0,0,0.7);
    border-color: rgba(255,204,0,0.7);
    box-shadow: 0 0 20px rgba(255,153,0,0.4);
    transform: translateX(3px);
}

.next-mode-btn-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: rgba(255,204,0,0.1);
    border: 1px solid rgba(255,204,0,0.25);
}

.classique-next-btn .next-mode-btn-icon {
    background: rgba(247,135,1,0.15);
    border-color: rgba(247,135,1,0.3);
}

.technique-next-btn .next-mode-btn-icon {
    background: rgba(250,133,255,0.12);
    border-color: rgba(250,133,255,0.25);
}

.moitie-next-btn .next-mode-btn-icon {
    background: rgba(0,212,255,0.12);
    border-color: rgba(0,212,255,0.25);
}

.next-mode-btn-content { flex: 1; }

.next-mode-btn-title {
    font-family: var(--font-label);
    font-size: 1.05rem;
    color: #ffcc00;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255,153,0,0.5);
}

.next-mode-btn-sub {
    font-size: 0.72rem;
    color: rgba(255,230,180,0.55);
    font-family: 'Arial', sans-serif;
    font-weight: normal;
    margin-top: 1px;
}

.next-mode-btn-arrow {
    color: rgba(255,204,0,0.7);
    font-size: 1.3rem;
    transition: transform 0.2s, color 0.2s;
}

.next-mode-btn:hover .next-mode-btn-arrow {
    transform: translateX(5px);
    color: #ffcc00;
}

/* ===== AJUSTEMENT GIF COMPACT ===== */
.victory-box-compact .technique-victory-gif {
    max-width: 300px;
}

/* --- Paramètres technique (cachés car intégrés dans la box footer) --- */
.technique-settings {
    display: none;
}

.tech-setting-toggle {
    background: rgba(10, 10, 20, 0.82);
    border: 0.5px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Arial', sans-serif;
}

.tech-setting-toggle:hover {
    border-color: rgba(255,204,0,0.4);
    color: #fff;
}

.tech-setting-toggle.active {
    border-color: #ffcc00;
    color: #ffcc00;
}

/* Mode noir & blanc */
#technique-mode.nb-mode .technique-essai-item.correct {
    background: rgba(20, 20, 20, 0.88);
    border-color: rgba(255,255,255,0.3);
}

#technique-mode.nb-mode .technique-essai-item.correct::before {
    background: rgba(255,255,255,0.7);
}

#technique-mode.nb-mode .technique-essai-item.incorrect {
    background: rgba(10, 10, 10, 0.88);
    border-color: rgba(255,255,255,0.1);
}

#technique-mode.nb-mode .technique-essai-item.incorrect::before {
    background: rgba(255,255,255,0.2);
}

#technique-mode.nb-mode .technique-essai-badge.correct {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.85);
    border-color: rgba(255,255,255,0.25);
}

#technique-mode.nb-mode .technique-essai-badge.incorrect {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.4);
    border-color: rgba(255,255,255,0.1);
}

#technique-mode.nb-mode .technique-badge-dot.correct,
#technique-mode.nb-mode .technique-badge-dot.incorrect {
    background: rgba(255,255,255,0.5);
}

/* ===== BARRE DE NAVIGATION MODES ===== */
.mode-nav-bar {
    display: flex;
    justify-content: center;
    margin: 0 auto 2rem auto;
}

.mode-nav-track {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    border: 1.5px solid rgba(255, 204, 0, 0.2);
    border-radius: 50px;
    padding: 8px 20px;
    gap: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 20px rgba(255,204,0,0.05);
}

.mode-nav-connector {
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, rgba(247,135,1,0.4), rgba(250,133,255,0.4));
    border-radius: 2px;
    flex-shrink: 0;
    margin: 0 4px;
}

.mode-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    transition: all 0.25s ease;
    border-radius: 40px;
    position: relative;
}

.mode-nav-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2.5px solid rgba(255,255,255,0.15);
    background: rgba(20, 20, 20, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}

.mode-nav-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.mode-nav-label {
    font-family: var(--font-label);
    font-size: 11px;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    transition: all 0.25s ease;
}

/* Icônes spécifiques */
.classique-icon {
    border-color: rgba(247, 135, 1, 0.35);
}

.technique-icon {
    border-color: rgba(250, 133, 255, 0.35);
}

/* État actif */
.mode-nav-btn.active .classique-icon {
    border-color: #F78701;
    box-shadow: 0 0 14px rgba(247,135,1,0.7), 0 3px 10px rgba(0,0,0,0.4);
}

.mode-nav-btn.active .technique-icon {
    border-color: #FA85FF;
    box-shadow: 0 0 14px rgba(250,133,255,0.7), 0 3px 10px rgba(0,0,0,0.4);
}

.mode-nav-btn.active .mode-nav-label {
    color: #ffcc00;
}

/* Hover */
.mode-nav-btn:not(.active):hover .classique-icon {
    border-color: rgba(247,135,1,0.7);
    transform: scale(1.08);
}

.mode-nav-btn:not(.active):hover .technique-icon {
    border-color: rgba(250,133,255,0.7);
    transform: scale(1.08);
}

.mode-nav-btn:not(.active):hover .mode-nav-label {
    color: rgba(255,255,255,0.7);
}

@media (max-width: 480px) {
    .mode-nav-track {
        padding: 6px 14px;
    }
    .mode-nav-icon {
        width: 40px;
        height: 40px;
    }
    .mode-nav-connector {
        width: 28px;
    }
    .mode-nav-label {
        font-size: 9px;
    }
}
/* ===== LÉGENDE INDICATEURS DE COULEUR ===== */
.color-legend-box {
    background: linear-gradient(135deg, rgba(20, 10, 5, 0.92), rgba(40, 15, 5, 0.88));
    border: 2px solid #FE7E0B;
    border-radius: 12px;
    padding: 14px 20px;
    margin: 12px auto 8px auto;
    max-width: 700px;
    box-shadow: 0 0 18px rgba(254, 126, 11, 0.3), 0 4px 20px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.color-legend-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FE7E0B, #ffcc00, #FE7E0B, transparent);
    animation: legendShine 3s ease-in-out infinite;
}

@keyframes legendShine {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.color-legend-title {
    font-family: var(--font-db, 'Arial Black', sans-serif);
    font-size: 13px;
    letter-spacing: 2px;
    color: #ffcc00;
    text-shadow: 0 0 8px rgba(255, 204, 0, 0.6);
    text-align: center;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.color-legend-items {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.color-legend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.color-legend-square {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 2px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

.color-legend-square.correct {
    background: linear-gradient(135deg, #00cc00, #009900);
    border-color: #00ff00;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.4);
}

.color-legend-square.partial {
    background: linear-gradient(135deg, #FE7E0B, #c95f00);
    border-color: #FE7E0B;
    box-shadow: 0 0 8px rgba(254, 126, 11, 0.4);
}

.color-legend-square.incorrect {
    background: linear-gradient(135deg, #cc0000, #990000);
    border-color: #ff0000;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.3);
}

.color-legend-square.arrow-up {
    background: linear-gradient(135deg, #cc0000, #990000);
    border-color: #ff0000;
    color: white;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.3);
}

.color-legend-square.arrow-down {
    background: linear-gradient(135deg, #cc0000, #990000);
    border-color: #ff0000;
    color: white;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.3);
}

.color-legend-label {
    font-family: var(--font-label, 'Arial Black', sans-serif);
    font-size: 10px;
    color: rgba(255,255,255,0.85);
    text-align: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

@media (max-width: 480px) {
    .color-legend-items {
        gap: 10px;
    }
    .color-legend-square {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
    .color-legend-label {
        font-size: 9px;
    }
}