/* ==========================================================================
   00. SETUP & CONFIGURATION
   ========================================================================== */

/* --- CSS Variables --- */
:root {
    /* Main Palette */
    --kaiba-blue: #00aaff;
    --kaiba-blue-glow: rgba(0, 170, 255, 0.7);
    --kaiba-dark-primary: #0a0e14;
    --kaiba-dark-secondary: #000408;
    --kaiba-gold: #FFD700;
    --kaiba-gold-glow: rgba(255, 215, 0, 0.5);
    --kaiba-silver: #C0C0C0;
    --kaiba-bronze: #CD7F32;

    /* Typography */
    --kaiba-text-light: #c9d1d9;
    --kaiba-text-muted: rgba(201, 209, 217, 0.7);

    /* Form Inputs */
    --kaiba-input-bg: var(--kaiba-dark-secondary);
    --kaiba-input-border: var(--kaiba-blue);
    --kaiba-input-text-color: var(--kaiba-text-light);
    --kaiba-input-placeholder-color: rgba(201, 209, 217, 0.5);
    --kaiba-input-focus-border: #fff;
    --kaiba-input-focus-shadow: 0 0 15px var(--kaiba-blue-glow), inset 0 0 8px var(--kaiba-blue-glow);
    --kaiba-input-group-bg: #0d121c;
}

/* ==========================================================================
   01. BASE & RESET
   ========================================================================== */

body {
    font-family: 'Orbitron', sans-serif;
    color: var(--kaiba-text-light);

    background-color: var(--kaiba-dark-primary); 

    /* Dégradé semi-transparent SUR l'image de fond */
    background-image: 
        linear-gradient(145deg, rgba(0, 4, 8, 0.95), rgba(10, 14, 20, 0.9)),
        url('../img/background-main.jpg');

    background-attachment: fixed; 
    background-size: cover;       
    background-position: center center; 
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #ffffff;
    text-shadow: 0 0 8px var(--kaiba-blue-glow);
    font-family: 'Aldrich', sans-serif;
}

p {
    color: var(--kaiba-text-light);
}

a {
    color: var(--kaiba-blue);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--kaiba-blue);
}

/* ==========================================================================
   02. LAYOUT
   ========================================================================== */

.container.mt-4 {
    margin-top: 2rem !important;
}



/* ==========================================================================
   03. COMPONENTS
   ========================================================================== */

/* --- Buttons --- */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: -1;
}

.btn:hover::before {
    width: 200%;
    height: 200%;
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background-color: transparent;
    border: 1px solid var(--kaiba-blue);
    color: var(--kaiba-blue);
    box-shadow: 0 0 5px var(--kaiba-blue-glow), inset 0 0 5px var(--kaiba-blue-glow);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--kaiba-blue) !important;
    color: var(--kaiba-dark-primary) !important;
    border-color: var(--kaiba-blue) !important;
    box-shadow: 0 0 20px var(--kaiba-blue-glow), inset 0 0 10px var(--kaiba-blue-glow) !important;
}

.btn-warning {
    background-color: var(--kaiba-gold);
    border-color: var(--kaiba-gold);
    color: #000;
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.5);
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
    background-color: var(--kaiba-gold) !important;
    border-color: var(--kaiba-gold) !important;
    color: #000 !important;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.8) !important;
}

/* --- Cards --- */
.kaiba-card {
    background-color: rgba(1, 10, 20, 0.75) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--kaiba-blue) !important;
    color: var(--kaiba-text-light);
    box-shadow: 0 0 15px var(--kaiba-blue-glow);
    transition: box-shadow 0.3s ease-in-out, transform 0.2s ease-in-out;
}

.kaiba-card:hover {
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.6);
    transform: translateY(-3px);
}

.kaiba-card .card-header {
    background-color: rgba(8, 33, 62, 0.8);
    border-bottom: 1px solid var(--kaiba-blue);
    color: #ffffff;
}

/* --- Tables --- */
.table {
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(0, 170, 255, 0.4);
    --bs-table-striped-bg: rgba(1, 10, 20, 0.5);
    --bs-table-hover-bg: rgba(8, 33, 62, 0.7);
    color: var(--kaiba-text-light);
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: rgba(0, 170, 255, 0.2);
    color: #ffffff;
    border-bottom: 2px solid var(--kaiba-blue);
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 170, 255, 0.3);
}

.table tbody td {
    /* Effet de texte holographique/métallique */
    background: linear-gradient(45deg, var(--kaiba-text-light), #ffffff);
    -webkit-background-clip: text; 
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 5px rgba(0, 170, 255, 0.5);
    font-weight: 500;

    border-color: rgba(0, 170, 255, 0.2);
    padding: 12px 15px;
    vertical-align: middle;
    transition: all 0.3s ease; 
}

/* Intensifie l'effet au survol de la ligne */
.table tbody tr:hover td {
    background: linear-gradient(45deg, #ffffff, #ffffff); 
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 8px var(--kaiba-blue); 
}

.table-hover tbody tr:hover {
    background-color: var(--bs-table-hover-bg) !important;
}

.table a {
    color: var(--kaiba-blue);
    text-decoration: underline;
}

.table a:hover {
    color: var(--kaiba-gold);
    text-shadow: none;
}

/* --- Alerts --- */
.alert {
    background-color: rgba(0, 170, 255, 0.2);
    border-color: var(--kaiba-blue);
    color: var(--kaiba-text-light);
}
.alert strong {
    color: #ffffff;
}

.kaiba-alert {
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.kaiba-alert .fas {
    color: var(--kaiba-gold);
    margin-bottom: 1rem;
    text-shadow: 0 0 10px var(--kaiba-gold-glow);
}
.kaiba-alert .lead {
    color: var(--kaiba-text-light);
    font-size: 1.15em;
    font-weight: 500;
}

/* Alert modifiers */
.kaiba-alert-info {
    background-color: rgba(0, 170, 255, 0.15);
    border: 1px solid var(--kaiba-blue);
    color: var(--kaiba-blue);
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.3);
}
.kaiba-alert-danger {
    background-color: rgba(220, 53, 69, 0.15);
    border: 1px solid #dc3545;
    color: #dc3545;
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.3);
}
.kaiba-alert-success {
    background-color: rgba(40, 167, 69, 0.15);
    border: 1px solid #28a745;
    color: #28a745;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.3);
}


/* --- Forms --- */
.form-control,
.form-select {
    background-color: var(--kaiba-input-bg);
    border: 1px solid var(--kaiba-input-border);
    color: var(--kaiba-input-text-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
    box-shadow: inset 0 0 5px rgba(0, 170, 255, 0.2);
    caret-color: var(--kaiba-blue);
}

.form-control::placeholder {
    color: var(--kaiba-input-placeholder-color);
    transition: color 0.3s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--kaiba-input-bg);
    border-color: var(--kaiba-input-focus-border);
    box-shadow: var(--kaiba-input-focus-shadow);
    color: #ffffff;
    transform: translateY(-2px);
}

.form-control:focus::placeholder {
    color: rgba(201, 209, 217, 0.2);
}

.form-label {
    font-family: 'Orbitron', sans-serif;
    color: var(--kaiba-blue);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

input[type="file"] {
    background-color: transparent;
    border: 1px dashed var(--kaiba-input-border);
    color: var(--kaiba-input-text-color);
    padding: 20px;
    border-radius: 5px;
    transition: all 0.2s ease-in-out;
}
input[type="file"]:hover {
    background-color: rgba(0, 170, 255, 0.1);
}
input[type="file"]::file-selector-button {
    background-color: var(--kaiba-blue);
    border: none;
    color: var(--kaiba-dark-primary);
    padding: 8px 15px;
    border-radius: 3px;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    margin-right: 15px;
    transition: all 0.2s ease-in-out;
}
input[type="file"]::file-selector-button:hover {
    box-shadow: 0 0 15px var(--kaiba-blue);
}

.form-check-input {
    background-color: var(--kaiba-input-bg);
    border: 1px solid var(--kaiba-input-border);
}
.form-check-input:checked {
    background-color: var(--kaiba-blue);
    border-color: var(--kaiba-blue);
}
.form-check-input:focus {
    border-color: var(--kaiba-blue);
    box-shadow: 0 0 0 0.25rem rgba(0, 170, 255, 0.25);
}
.form-check-label {
    color: var(--kaiba-text-light);
    font-size: 0.9em;
    margin-left: 0.5rem;
}

.form-text,
.invalid-feedback,
.valid-feedback {
    font-size: 0.85em;
    padding-left: 5px;
    margin-top: 5px;
}
.invalid-feedback {
    color: #ff6b6b !important;
}
.valid-feedback {
    color: #198754 !important;
}
.invalid-feedback.d-block {
    animation: fadeIn 0.5s ease-out;
}

/* --- Input Groups --- */
.input-group-text {
    background-color: var(--kaiba-input-group-bg);
    border: 1px solid var(--kaiba-input-border);
    border-right: none;
    color: var(--kaiba-blue);
    padding: 0.75rem 1rem;
    border-radius: 8px 0 0 8px;
    transition: all 0.3s ease-in-out;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

.input-group:focus-within .input-group-text {
    border-color: var(--kaiba-input-focus-border);
    box-shadow: var(--kaiba-input-focus-shadow);
    color: #ffffff;
}
.input-group:focus-within .form-control {
    transform: translateY(0); 
}


/* --- List Groups --- */
.list-group-item {
    background-color: rgba(1, 10, 20, 0.6);
    border-color: rgba(0, 170, 255, 0.4);
    color: var(--kaiba-text-light);
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.list-group-item:hover {
    background-color: rgba(8, 33, 62, 0.8);
    color: #ffffff;
}

.list-group-item strong {
    color: #ffffff;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.3);
}

.list-group-item small {
    color: var(--kaiba-text-muted);
}


/* ==========================================================================
   04. SECTIONS & PAGES
   ========================================================================== */

/* --- Header / Navbar --- */
.kaiba-navbar {
    background-color: var(--kaiba-dark-secondary);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-bottom: 2px solid var(--kaiba-blue);
    box-shadow: 0 4px 20px rgba(0, 170, 255, 0.4);
    padding: 0.5rem 1rem;
    animation: navbarFadeIn 0.8s ease-out forwards;
}

.kaiba-navbar .navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;
    transition: transform 0.3s ease-in-out;
}
.kaiba-navbar .navbar-brand:hover {
    transform: scale(1.02);
}
.kaiba-navbar .navbar-brand img {
    height: 45px;
    margin-right: 12px;
    filter: drop-shadow(0 0 5px rgba(0, 170, 255, 0.6));
}
.kaiba-navbar .navbar-brand .logo-text {
    font-family: 'Aldrich', sans-serif;
    color: var(--kaiba-gold);
    text-shadow: 0 0 10px var(--kaiba-gold-glow);
    font-size: 1.8rem;
    letter-spacing: 2px;
    white-space: nowrap;
}

.kaiba-navbar .nav-link {
    color: var(--kaiba-text-light);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.kaiba-navbar .nav-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 170, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: -1;
}
.kaiba-navbar .nav-link:hover {
    color: var(--kaiba-gold) !important;
    transform: translateY(-2px);
    text-shadow: 0 0 8px var(--kaiba-gold-glow);
}
.kaiba-navbar .nav-link:hover::before {
    width: 150%;
    height: 150%;
}
.kaiba-navbar .nav-link.active {
    color: var(--kaiba-gold) !important;
    background-color: rgba(0, 170, 255, 0.1);
    border: 1px solid var(--kaiba-blue);
    text-shadow: 0 0 8px var(--kaiba-gold-glow);
}

.kaiba-navbar .navbar-toggler {
    border: 1px solid var(--kaiba-blue);
    padding: 0.25rem 0.5rem;
    transition: all 0.3s ease;
}
.kaiba-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 170, 255, 0.5);
}
.kaiba-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%2300aaff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

@media (max-width: 991.98px) {
    .kaiba-navbar .navbar-brand img { height: 35px; }
    .kaiba-navbar .navbar-brand .logo-text { font-size: 1.4rem; }
    .kaiba-navbar .navbar-nav {
        margin-top: 10px;
        border-top: 1px solid rgba(0, 170, 255, 0.2);
        padding-top: 10px;
    }
    .kaiba-navbar .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(0, 170, 255, 0.1);
    }
}


/* --- Podium --- */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin: 60px auto 80px auto;
    height: 320px;
    position: relative;
    max-width: 900px;
}

.podium-step {
    position: relative;
    width: 33.3%;
    padding: 20px;
    text-align: center;
    color: white;
    animation: fadeInSlideUp 1s ease-out forwards;
    opacity: 0;
    transform-style: preserve-3d;
}
.podium-step::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 100%;
    background: linear-gradient(rgba(1, 10, 20, 0.9), rgba(8, 33, 62, 0.9));
    border: 2px solid;
    transform: skewY(-5deg);
    transform-origin: bottom left;
    border-radius: 8px;
    z-index: -1;
}
.podium-step::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 10%;
    width: 80%;
    height: 5px;
    filter: blur(5px);
    border-radius: 5px;
}

.podium-rank {
    font-size: 4em;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.podium-player {
    font-size: 1.6em;
    font-weight: bold;
    margin: 5px 0;
    word-wrap: break-word;
}

.podium-points {
    font-size: 1.1em;
    color: var(--kaiba-text-light);
    opacity: 0.8;
}

.podium-step.gold {
    height: 300px;
    animation-delay: 0.4s;
    order: 2; 
}
.podium-step.gold::before { border-color: var(--kaiba-gold); }
.podium-step.gold::after { background: var(--kaiba-gold); box-shadow: 0 0 20px var(--kaiba-gold); }
.podium-step.gold .podium-rank { color: var(--kaiba-gold); }

.podium-step.silver {
    height: 250px;
    animation-delay: 0.2s;
    order: 1; 
}
.podium-step.silver::before { border-color: var(--kaiba-silver); }
.podium-step.silver::after { background: var(--kaiba-silver); box-shadow: 0 0 20px var(--kaiba-silver); }
.podium-step.silver .podium-rank { color: var(--kaiba-silver); }

.podium-step.bronze {
    height: 200px;
    animation-delay: 0.6s;
    order: 3; 
}
.podium-step.bronze::before { border-color: var(--kaiba-bronze); }
.podium-step.bronze::after { background: var(--kaiba-bronze); box-shadow: 0 0 20px var(--kaiba-bronze); }
.podium-step.bronze .podium-rank { color: var(--kaiba-bronze); }


/* --- User Profile --- */
.profile-card {
    position: relative;
    background-color: var(--kaiba-dark-secondary);
    border: 2px solid var(--kaiba-blue);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 170, 255, 0.3);
    color: var(--kaiba-text-light);
    margin-top: 90px; 
}

.profile-header {
    height: 150px;
    background-image: linear-gradient(45deg, var(--kaiba-dark-secondary) 0%, var(--kaiba-blue) 100%);
}

.profile-picture {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 5px solid var(--kaiba-dark-primary);
    background-color: var(--kaiba-dark-primary);
    box-shadow: 0 0 20px var(--kaiba-blue-glow);
    padding: 5px;
}
.profile-picture img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-body {
    padding: 100px 30px 30px 30px;
    text-align: center;
}

.profile-name {
    font-size: 2.5em;
    font-weight: 900;
    color: #ffffff;
}

.join-date {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9em;
    color: var(--kaiba-text-light);
    opacity: 0.6;
    margin-top: -10px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
}
.stat-item .stat-value {
    font-size: 2em;
    font-weight: bold;
    color: var(--kaiba-gold);
}
.stat-item .stat-label {
    display: block;
    font-size: 0.9em;
    text-transform: uppercase;
    color: var(--kaiba-text-light);
    opacity: 0.7;
}

.profile-divider {
    border-color: rgba(0, 170, 255, 0.3);
    margin: 30px auto;
    width: 80%;
}

.profile-details {
    text-align: left;
    font-family: 'Exo 2', sans-serif;
    line-height: 1.8;
    margin: 20px 0;
}
.profile-details p {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 15px;
    border-bottom: 1px solid rgba(0, 170, 255, 0.1);
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.profile-details p strong {
    font-family: 'Orbitron', sans-serif;
    color: var(--kaiba-blue);
    opacity: 0.8;
}

.profile-form-container {
    margin-top: 30px;
    text-align: left;
    background: rgba(0, 4, 8, 0.5);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(0, 170, 255, 0.2);
}


/* --- Top Cut Bracket --- */
.top-cut-simple-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    gap: 40px;
    overflow-x: auto;
    min-height: 200px;
}

.top-cut-simple-round {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    min-width: 250px;
}

.top-cut-simple-title {
    color: var(--kaiba-gold);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    text-shadow: 0 0 5px var(--kaiba-gold-glow);
}

.top-cut-simple-matches {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    align-items: center;
}

.top-cut-simple-match {
    display: flex;
    flex-direction: column;
    background-color: var(--kaiba-dark-secondary);
    border: 1px solid var(--kaiba-blue);
    border-radius: 5px;
    padding: 8px 12px;
    width: 100%;
    max-width: 220px;
    box-shadow: 0 0 8px rgba(0, 170, 255, 0.2);
    transition: all 0.2s ease-in-out;
}
.top-cut-simple-match:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(0, 170, 255, 0.4);
}

.top-cut-simple-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    font-family: 'Aldrich', sans-serif;
    font-size: 0.9rem;
}
.top-cut-simple-player.winner {
    color: var(--kaiba-gold);
    font-weight: bold;
    text-shadow: 0 0 3px rgba(255, 215, 0, 0.4);
}
.top-cut-simple-player input[type="number"] {
    width: 45px;
    padding: 2px 5px;
    margin-left: 10px;
    background-color: var(--kaiba-input-bg);
    border: 1px solid var(--kaiba-blue);
    color: var(--kaiba-text-light);
    text-align: center;
    border-radius: 3px;
}
.top-cut-simple-player input[type="number"]::-webkit-outer-spin-button,
.top-cut-simple-player input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

@media (max-width: 768px) {
    .top-cut-simple-container {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
}


/* ==========================================================================
   05. UTILITIES
   ========================================================================== */

/* --- Bootstrap Text Color Overrides --- */
.text-primary { color: var(--kaiba-blue) !important; }
.text-secondary { color: var(--kaiba-text-light) !important; }
.text-success { color: #28a745 !important; }
.text-danger { color: #dc3545 !important; }
.text-warning { color: var(--kaiba-gold) !important; }
.text-info { color: #0dcaf0 !important; }
.text-light { color: #f8f9fa !important; }
.text-dark { color: #212529 !important; }
.text-body { color: var(--kaiba-text-light) !important; }
.text-muted { color: var(--kaiba-text-muted) !important; }

/* --- Custom Text Colors --- */
.text-kaiba-gold {
    color: var(--kaiba-gold) !important;
    text-shadow: 0 0 10px var(--kaiba-gold-glow);
}
.text-kaiba-blue {
    color: var(--kaiba-blue) !important;
    text-shadow: 0 0 5px rgba(0, 170, 255, 0.5);
}
.text-kaiba-light-muted {
    color: var(--kaiba-text-muted) !important;
}

/* --- Specific Helpers --- */
h1+p,
h2+p,
.tournament-detail-info {
    color: rgba(201, 209, 217, 0.8);
    font-family: 'Exo 2', sans-serif;
    margin-top: -10px;
}

.list-profile-pic {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid var(--kaiba-blue);
}

/* ==========================================================================
   06. ANIMATIONS
   ========================================================================== */

@keyframes navbarFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ==========================================================================
   04a. STANDINGS TABLE - AMÉLIORATIONS "WOUAAAH"
   ========================================================================== */

.standings-table {
    border: 1px solid var(--kaiba-blue);
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.4);
    text-align: center;
}

.standings-table thead th {
    font-family: 'Aldrich', sans-serif;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--kaiba-blue);
    text-shadow: 0 0 8px var(--kaiba-blue-glow);
}

.standings-table tbody td {
    /* Effet de texte holographique/métallique */
    background: linear-gradient(45deg, var(--kaiba-text-light), #ffffff); 
    -webkit-background-clip: text; 
    background-clip: text;
    color: transparent;
    text-shadow: none; 
    background: none; 
    -webkit-background-clip: unset;
    background-clip: unset;
    
    font-family: 'Exo 2', sans-serif;
    font-size: 1.1em;
    font-weight: 500;
    color: var(--kaiba-text-light); 
}

.standings-table .player-cell {
    text-align: left;
    font-weight: bold;
}
.standings-table .player-cell .list-profile-pic {
    width: 32px;
    height: 32px;
    border-width: 2px;
    margin-right: 12px;
}
.standings-table .player-cell a {
    text-decoration: none; 
}

.standings-table tbody th {
    font-family: 'Aldrich', sans-serif;
    font-size: 2.5em; 
    font-weight: 900;
    width: 120px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    border-right: 1px solid rgba(0, 170, 255, 0.4);
    vertical-align: middle;
    color: var(--kaiba-text-light); 
}

/* --- Mise en valeur du Podium (Top 3) directement dans le tableau --- */

/* Rang 1 : OR */
.standings-table tbody tr:first-child {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05) 50%, transparent 80%);
}
.standings-table tbody tr:first-child th {
    color: var(--kaiba-gold); 
    text-shadow: 0 0 15px var(--kaiba-gold-glow);
}
.standings-table tbody tr:first-child .player-cell a {
    color: var(--kaiba-gold); 
}

/* Rang 2 : ARGENT */
.standings-table tbody tr:nth-child(2) {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.15), rgba(192, 192, 192, 0.05) 50%, transparent 80%);
}
.standings-table tbody tr:nth-child(2) th {
    color: var(--kaiba-silver); 
    text-shadow: 0 0 15px rgba(192, 192, 192, 0.7);
}
.standings-table tbody tr:nth-child(2) .player-cell a {
    color: var(--kaiba-silver); 
}

/* Rang 3 : BRONZE */
.standings-table tbody tr:nth-child(3) {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.15), rgba(205, 127, 50, 0.05) 50%, transparent 80%);
}
.standings-table tbody tr:nth-child(3) th {
    color: var(--kaiba-bronze); 
    text-shadow: 0 0 15px rgba(205, 127, 50, 0.6);
}
.standings-table tbody tr:nth-child(3) .player-cell a {
    color: var(--kaiba-bronze); 
}
/* ==========================================================================
   04b. USER PROFILE - AMÉLIORATIONS "WOUAAAH"
   ========================================================================== */

.profile-card {
    position: relative;
    background-color: transparent; 
    border: none; 
    box-shadow: none; 
    margin-top: 90px;
    padding: 0; 
}

.profile-card::before,
.profile-card::after {
    content: '';
    position: absolute;
    left: -2px;
    top: -2px;
    background: linear-gradient(45deg, var(--kaiba-gold), var(--kaiba-blue), #00ffc8, #7a00ff, var(--kaiba-blue), var(--kaiba-gold));
    background-size: 400%;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    z-index: -1;
    animation: holographic-glow 20s linear infinite;
    border-radius: 15px;
}
.profile-card::after {
    filter: blur(20px); 
}

.profile-body {
    background: linear-gradient(145deg, var(--kaiba-dark-primary), var(--kaiba-dark-secondary));
    border-radius: 15px;
    padding: 100px 30px 30px 30px;
    text-align: center;
}

.profile-picture {
    width: 180px;
    height: 180px;
    border: 5px solid var(--kaiba-dark-primary); 
    box-shadow:
        0 0 15px 5px rgba(255, 255, 255, 0.2), 
        0 0 35px 10px var(--kaiba-blue-glow); 
}
.profile-picture img {
    border: 3px solid var(--kaiba-blue); 
}

.stat-item .stat-value {
    font-family: 'Aldrich', sans-serif;
    font-size: 3em; 
    text-shadow: 0 0 15px var(--kaiba-gold-glow);
}
.stat-item .stat-label {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

.profile-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--kaiba-blue), transparent);
    border: 0;
    opacity: 0.8;
}

.list-group-item.kaiba-list-item-tournament {
    background-color: rgba(0, 4, 8, 0.7);
    border-color: rgba(0, 170, 255, 0.2);
    transition: all 0.3s ease;
    padding: 1rem 1.5rem;
}
.list-group-item.kaiba-list-item-tournament:hover {
    background-color: rgba(0, 170, 255, 0.1);
    border-color: var(--kaiba-blue);
    transform: translateX(5px); 
}
.list-group-item.kaiba-list-item-tournament strong {
    font-family: 'Aldrich', sans-serif;
    font-size: 1.1em;
    color: #fff;
}
.badge.kaiba-badge-gold {
    background: linear-gradient(45deg, var(--kaiba-gold), #ffec80);
    color: #000;
    font-size: 1em;
    font-weight: bold;
    border: 1px solid var(--kaiba-gold);
    box-shadow: 0 0 10px var(--kaiba-gold-glow);
}

@keyframes holographic-glow {
    0% { background-position: 0 0; }
    50% { background-position: 400% 0; }
    100% { background-position: 0 0; }
}
/* ==========================================================================
   04c. PANTHEON TABLE
   ========================================================================== */

.pantheon-table {
    max-width: 800px;
    margin: 30px auto; 
    border: 1px solid var(--kaiba-blue);
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.3);
}

.pantheon-table thead th {
    font-family: 'Aldrich', sans-serif;
    color: var(--kaiba-blue);
    text-transform: uppercase;
    text-align: center;
}

.pantheon-table tbody td {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: var(--kaiba-text-light);
    text-shadow: none;
    font-size: 1.1em;
}

.pantheon-table tbody th {
    font-family: 'Aldrich', sans-serif;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--kaiba-text-light);
    text-align: center;
    border-right: 1px solid rgba(0, 170, 255, 0.4);
}

.pantheon-table .player-cell {
    text-align: left;
    font-weight: bold;
}
.pantheon-table .player-cell .list-profile-pic {
    width: 32px;
    height: 32px;
    border-width: 2px;
}
.pantheon-table .player-cell a {
    text-decoration: none;
    color: #fff;
}
.pantheon-table .player-cell a:hover {
    color: var(--kaiba-gold);
}

.pantheon-table .points-cell {
    font-family: 'Aldrich', sans-serif;
    font-size: 1.3em;
    font-weight: bold;
    color: var(--kaiba-gold);
    text-shadow: 0 0 8px var(--kaiba-gold-glow);
    text-align: center;
}
/* ==========================================================================
   04d. FINANCE PAGES
   ========================================================================== */

.finance-summary-card .stat-label {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    color: var(--kaiba-text-muted);
}
.finance-summary-card .stat-value {
    font-family: 'Aldrich', sans-serif;
    font-weight: 900;
}

.debit-cell, .credit-cell {
    font-family: 'Aldrich', sans-serif;
    font-weight: bold;
    font-size: 1.1em;
}
/* ==========================================================================
   04e. DASHBOARD HOME PAGE
   ========================================================================== */
.dashboard-hero {
    background: linear-gradient(rgba(10, 14, 20, 0.8), rgba(10, 14, 20, 0.8)), url("{% static 'img/kaiba_corp_background.jpg' %}") no-repeat center center;
    background-size: cover;
    border: 1px solid var(--kaiba-gold);
}

#countdown {
    font-family: 'Aldrich', sans-serif;
    font-size: 2.5em;
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--kaiba-gold);
    text-shadow: 0 0 15px var(--kaiba-gold-glow);
}
#countdown span {
    display: inline-block;
    padding: 0 10px;
}

.top-player-card {
    padding: 15px;
}
.top-player-rank {
    font-family: 'Aldrich', sans-serif;
    font-size: 2.5em;
    font-weight: 900;
    margin-bottom: -15px;
}
.top-player-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid;
    object-fit: cover;
    margin-bottom: 10px;
}
.top-player-name a {
    font-family: 'Aldrich', sans-serif;
    font-size: 1.2em;
    color: #fff;
    text-decoration: none;
}
.top-player-name a:hover {
    color: var(--kaiba-gold);
}
.top-player-points {
    font-family: 'Orbitron', sans-serif;
    color: var(--kaiba-text-muted);
}

.rank-1, .rank-badge.rank-1 { color: var(--kaiba-gold); border-color: var(--kaiba-gold); }
.rank-2, .rank-badge.rank-2 { color: var(--kaiba-silver); border-color: var(--kaiba-silver); }
.rank-3, .rank-badge.rank-3 { color: var(--kaiba-bronze); border-color: var(--kaiba-bronze); }
.rank-4 { color: var(--kaiba-blue); }

.rank-badge {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    font-weight: bold;
    font-family: 'Aldrich', sans-serif;
    border: 2px solid;
    margin-right: 10px;
}

.kpi-card {
    text-align: center;
    padding: 10px 0;
}
.kpi-value {
    font-family: 'Aldrich', sans-serif;
    font-size: 2.2em;
    font-weight: 700;
    color: #fff;
}
.kpi-label {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-size: 0.9em;
    color: var(--kaiba-text-muted);
}
/* ==========================================================================
   04f. PODIUM FINAL (AVEC AVATARS INTÉGRÉS)
   ========================================================================== */

.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin: 60px auto 80px auto;
    height: 320px;
    position: relative;
    max-width: 900px;
}

.podium-step {
    position: relative;
    width: 33.3%;
    text-align: center;
    color: white;
    animation: fadeInSlideUp 1s ease-out forwards;
    opacity: 0;
    transform-style: preserve-3d;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
}

.podium-step::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 100%;
    background: linear-gradient(rgba(1, 10, 20, 0.9), rgba(8, 33, 62, 0.9));
    border: 2px solid;
    transform: skewY(-5deg);
    transform-origin: bottom left;
    border-radius: 8px;
    z-index: -1;
}

.podium-step::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 10%;
    width: 80%;
    height: 5px;
    filter: blur(5px);
    border-radius: 5px;
}

.podium-rank {
    font-size: 4em;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    margin-bottom: 10px; 
}

.podium-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px; 
    border: 4px solid;
    z-index: 2; 
}

.podium-player {
    font-size: 1.6em;
    font-weight: bold;
    word-wrap: break-word;
    text-decoration: none;
    color: #fff;
}
.podium-player:hover {
    color: var(--kaiba-gold);
}

.podium-points {
    font-size: 1.1em;
    color: var(--kaiba-text-light);
    opacity: 0.8;
}

.podium-step.gold { height: 300px; animation-delay: 0.4s; order: 2; }
.podium-step.gold::before { border-color: var(--kaiba-gold); }
.podium-step.gold::after { background: var(--kaiba-gold); box-shadow: 0 0 20px var(--kaiba-gold); }
.podium-step.gold .podium-rank { color: var(--kaiba-gold); }
.podium-step.gold .podium-avatar { border-color: var(--kaiba-gold); }

.podium-step.silver { height: 250px; animation-delay: 0.2s; order: 1; }
.podium-step.silver::before { border-color: var(--kaiba-silver); }
.podium-step.silver::after { background: var(--kaiba-silver); box-shadow: 0 0 20px var(--kaiba-silver); }
.podium-step.silver .podium-rank { color: var(--kaiba-silver); }
.podium-step.silver .podium-avatar { border-color: var(--kaiba-silver); }

.podium-step.bronze { height: 200px; animation-delay: 0.6s; order: 3; }
.podium-step.bronze::before { border-color: var(--kaiba-bronze); }
.podium-step.bronze::after { background: var(--kaiba-bronze); box-shadow: 0 0 20px var(--kaiba-bronze); }
.podium-step.bronze .podium-rank { color: var(--kaiba-bronze); }
.podium-step.bronze .podium-avatar { border-color: var(--kaiba-bronze); }

.pantheon-table .list-profile-pic {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid var(--kaiba-blue);
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
    vertical-align: middle;
}
.pantheon-table .player-cell {
    display: flex;
    align-items: center;
}
/* ==========================================================================
   04g. TOURNAMENT LIST CARDS
   ========================================================================== */

.tournament-card {
    display: flex;
    flex-direction: column; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tournament-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 170, 255, 0.5);
}

.tournament-card.is-completed {
    opacity: 0.8; 
}

.tournament-card-header .card-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}
.tournament-card-header .card-title a:hover {
    color: var(--kaiba-gold);
}

.tournament-card-details p {
    margin-bottom: 0.75rem;
    font-family: 'Exo 2', sans-serif;
    color: var(--kaiba-text-light);
}
.tournament-card-details p i {
    color: var(--kaiba-blue);
    width: 20px; 
}
.tournament-card-details p strong {
    color: var(--kaiba-text-light);
    opacity: 0.8;
}

.tournament-card .card-body {
    flex-grow: 1;
}

.tournament-card .card-footer {
    background-color: rgba(8, 33, 62, 0.5);
    border-top: 1px solid rgba(0, 170, 255, 0.2);
}

.tier-badge {
    font-size: 0.9em;
    padding: 0.5em 0.75em;
    color: #000;
}
.tier-badge.tier-t1 { background-color: #6c757d; } 
.tier-badge.tier-t2 { background-color: var(--kaiba-bronze); } 
.tier-badge.tier-t3 { background-color: var(--kaiba-silver); } 
.tier-badge.tier-t4 { background-color: var(--kaiba-gold); } 
/* ==========================================================================
   04h. TOURNAMENT DETAIL PAGE
   ========================================================================== */

.tournament-header-card h1 {
    text-shadow: 0 0 15px var(--kaiba-gold-glow);
    color: var(--kaiba-gold);
}

.tournament-meta-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 30px; 
    font-family: 'Exo 2', sans-serif;
    color: var(--kaiba-text-light);
    margin-top: 15px;
}
.tournament-meta-details i {
    color: var(--kaiba-blue);
}

.status-badge {
    font-size: 1em;
    padding: 0.6em 0.9em;
    color: #fff;
}
.status-badge.status-upcoming { background-color: #0d6efd; } 
.status-badge.status-in_progress { background-color: #ffc107; color: #000; } 
.status-badge.status-completed { background-color: #198754; } 

/* Style pour les onglets */
.kaiba-nav-tabs .nav-link {
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--kaiba-text-muted);
    font-family: 'Aldrich', sans-serif;
    text-transform: uppercase;
}
.kaiba-nav-tabs .nav-link.active,
.kaiba-nav-tabs .nav-link:hover {
    color: var(--kaiba-blue);
    border-bottom: 3px solid var(--kaiba-blue);
}
/* ==========================================================================
   04i. TOURNAMENT MANAGE PAGE ACCORDION
   ========================================================================== */

.kaiba-accordion .accordion-item {
    background-color: rgba(1, 10, 20, 0.75);
    border: 1px solid rgba(0, 170, 255, 0.4);
    margin-bottom: 1rem;
    border-radius: 8px;
}

.kaiba-accordion .accordion-header {
    border-bottom: 1px solid rgba(0, 170, 255, 0.2);
}

.kaiba-accordion .accordion-button {
    background-color: transparent;
    color: var(--kaiba-text-light);
    font-family: 'Aldrich', sans-serif;
    font-size: 1.2em;
    box-shadow: none;
}

.kaiba-accordion .accordion-button:not(.collapsed) {
    color: var(--kaiba-gold);
    background-color: rgba(0, 170, 255, 0.1);
    box-shadow: inset 0 -2px 0 var(--kaiba-gold);
}

.kaiba-accordion .accordion-button:focus {
    box-shadow: 0 0 10px var(--kaiba-blue-glow);
}

.kaiba-accordion .accordion-body {
    background-color: var(--kaiba-dark-secondary);
    border-radius: 0 0 8px 8px;
}
/* ==========================================================================
   04j. OBJECTIVE WCQ PAGE
   ========================================================================== */
.wcq-progress-bar {
    background-color: var(--kaiba-dark-secondary);
    border: 1px solid var(--kaiba-blue);
    padding: 4px;
    border-radius: 8px;
}
.wcq-progress-bar .progress-bar {
    background: linear-gradient(45deg, var(--kaiba-blue), var(--kaiba-gold));
    font-size: 1.1em;
    font-family: 'Aldrich', sans-serif;
}
/* ==========================================================================
   04k. CHAMPIONS GALLERY
   ========================================================================== */

.champion-card-link {
    text-decoration: none;
    display: block;
    height: 100%;
}

.champion-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.champion-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 40px var(--kaiba-blue-glow);
}

.champion-card-img-container {
    height: 300px;
    background-color: var(--kaiba-dark-secondary);
}

.champion-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}
.champion-card-img.is-avatar {
    object-fit: contain; 
    padding: 1rem;
}

.champion-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Aldrich', sans-serif;
    font-size: 3rem;
    color: var(--kaiba-blue);
    opacity: 0.5;
}

.champion-card .card-body {
    text-align: center;
}

.champion-card .tournament-name {
    color: #fff;
    font-family: 'Aldrich', sans-serif;
}

.champion-card .card-footer {
    display: flex;
    align-items: center;
    background-color: rgba(8, 33, 62, 0.7);
    border-top: 1px solid rgba(0, 170, 255, 0.2);
}

.champion-card .winner-name {
    color: var(--kaiba-text-light);
    font-weight: bold;
}

.champion-card .deck-name {
    color: var(--kaiba-text-muted);
    font-size: 0.9em;
}
/* ==========================================================================
   PROFILE PAGE - PALMARES
   ========================================================================== */

.rank-badge-lg {
    display: inline-block;
    min-width: 40px;
    padding: 5px 10px;
    font-size: 1.2em;
    font-weight: bold;
    font-family: 'Aldrich', sans-serif;
    text-align: center;
    border-radius: 8px;
    border: 2px solid;
    color: var(--kaiba-text-light);
    border-color: var(--kaiba-blue);
}

.rank-badge-lg.rank-gold {
    color: var(--kaiba-gold);
    border-color: var(--kaiba-gold);
    box-shadow: 0 0 10px var(--kaiba-gold-glow);
}
.rank-badge-lg.rank-silver {
    color: var(--kaiba-silver);
    border-color: var(--kaiba-silver);
    box-shadow: 0 0 8px rgba(192, 192, 192, 0.7);
}
.rank-badge-lg.rank-bronze {
    color: var(--kaiba-bronze);
    border-color: var(--kaiba-bronze);
    box-shadow: 0 0 8px rgba(205, 127, 50, 0.6);
}
/* ==========================================================================
   PANTHEON - CORRECTION FINALE TAILLE TEXTE PODIUM
   ========================================================================== */

.podium-step.silver .podium-player,
.podium-step.bronze .podium-player {
    font-size: 1.1em; 
    line-height: 1.2; 
    word-wrap: break-word; 
}

.podium-step.silver .podium-rank,
.podium-step.bronze .podium-rank {
    font-size: 3.5em;
}

.podium-step.silver .podium-points,
.podium-step.bronze .podium-points {
    font-size: 0.9em;
}
/* ==========================================================================
   PANTHEON - AJUSTEMENT FINAL PODIUM BRONZE (TAILLE)
   ========================================================================== */

.podium-step.bronze .podium-rank {
    font-size: 2.1em; 
    margin-bottom: 5px;
}

.podium-step.bronze .podium-avatar {
    width: 70px; 
    height: 70px;
    border-width: 3px;
    margin-bottom: 10px;
}

.podium-step.bronze .podium-player {
    font-size: 1em; 
}

.podium-step.bronze .podium-points {
    font-size: 0.9em;
}
.table > tbody > tr > th {
    color: #e9ecef; 
    font-weight: normal; 
}
/* ============================================= */
/* --- STYLE AVANCÉ POUR LE GRAPHIQUE METAGAME --- */
/* ============================================= */

#metagameChart-container {
    position: relative;
}

#metagameChart {
    filter: drop-shadow(0 0 10px rgba(0, 150, 255, 0.3));
    transition: filter 0.3s ease-in-out;
}

#metagameChart:hover {
    filter: drop-shadow(0 0 20px rgba(0, 150, 255, 0.6));
}

/* --- Pagination Kaiba Corp --- */
.kaiba-pagination .page-item .kaiba-link {
    background-color: var(--kaiba-dark-secondary);
    border: 1px solid var(--kaiba-blue);
    color: var(--kaiba-text-light);
    transition: all 0.2s;
}

.kaiba-pagination .page-item.disabled .kaiba-link {
    opacity: 0.5;
}

.kaiba-pagination .page-item .kaiba-link:hover {
    background-color: rgba(0, 170, 255, 0.1);
    color: var(--kaiba-gold);
    box-shadow: 0 0 5px var(--kaiba-blue-glow);
}

.kaiba-pagination .page-item .kaiba-active-link {
    background-color: var(--kaiba-blue);
    border-color: var(--kaiba-blue);
    color: var(--kaiba-dark-primary); 
    font-weight: bold;
}
/* ============================================= */
/* === NOUVEAU STYLE POUR LE CAMEMBERT METAGAME === */
/* ============================================= */

.pie-chart-container {
    width: 350px;
    height: 350px;
    position: relative;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #00BCD4, #FF9800, #8BC34A, #FFC107, #9C27B0, #03A9F4, #E91E63, #00BCD4
    );
    overflow: hidden;
    border: 3px solid #182138;
    flex-shrink: 0;
}


/* Astuce pour les parts de plus de 180 degrés */
.pie-slice[style*="--angle: calc(180"] { /* un peu hacky mais fonctionne */
    clip-path: polygon(0 50%, 50% 50%, 50% 0, 100% 0, 100% 50%);
}


/* Légende personnalisée */
.pie-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    max-width: 100%;
    padding: 0 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #e9ecef;
}

.legend-color-box {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
/* AJOUTE CE STYLE POUR SÉPARER LES PARTS AVEC UNE LIGNE */
.pie-slice::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px; /* Épaisseur de la ligne de séparation */
    height: 50%;
    background: #182138; /* Couleur du fond de la carte */
    transform-origin: bottom center;
}
/* REMPLACE L'ANCIEN .pie-slice PAR CELUI-CI */
.pie-slice {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    transform-origin: center center;
    transform: rotate(var(--rotation));
    
    /* On utilise une découpe beaucoup plus simple et fiable */
    clip-path: polygon(50% 0%, 100% 0%, 100% 50%, 50% 50%);
}
/* ==========================================================================
   07. FOOTER
   ========================================================================== */

.site-footer {
    /* On utilise la couleur de fond de la navbar pour la cohérence */
    background-color: var(--kaiba-dark-secondary); 
    /* On utilise la couleur de bordure de la navbar */
    border-top: 2px solid var(--kaiba-blue);
    padding: 40px 0 20px 0;
    font-family: 'Exo 2', sans-serif; /* Police plus lisible pour les textes longs */
    font-size: 0.9rem;
    color: var(--kaiba-text-muted); /* Couleur de base pour les textes du footer */
}

.footer-heading {
    /* La couleur est déjà gérée par .text-kaiba-gold dans le HTML */
    font-family: 'Aldrich', sans-serif; /* On garde la police des titres */
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 20px;
    font-size: 1rem;
}

.copyright-text {
    margin-top: 20px;
    font-size: 0.8rem;
    opacity: 0.7;
}

.footer-links {
    list-style: none;
    padding-left: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a, .footer-bottom-bar a {
    color: var(--kaiba-text-light);
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links a:hover, .footer-bottom-bar a:hover {
    color: var(--kaiba-gold); /* Au survol, on utilise la couleur OR */
    padding-left: 5px; /* Petit effet de décalage au survol */
}
.footer-bottom-bar a:hover {
    padding-left: 0;
}

.social-links .social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    /* Couleur de fond subtile, inspirée des headers de cartes */
    background-color: rgba(8, 33, 62, 0.8);
    border: 1px solid var(--kaiba-blue);
    color: var(--kaiba-gold);
    font-size: 1.1rem;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.social-links .social-icon:hover {
    background-color: var(--kaiba-gold);
    color: var(--kaiba-dark-secondary);
    border-color: var(--kaiba-gold);
    box-shadow: 0 0 15px var(--kaiba-gold-glow);
}

.footer-bottom-bar {
    text-align: center;
    border-top: 1px solid rgba(0, 170, 255, 0.2); /* Ligne de séparation fine */
    padding-top: 20px;
    margin-top: 30px;
    font-size: 0.8rem;
}

.footer-bottom-bar span {
    margin: 0 15px;
    opacity: 0.5;
}
/* ==========================================================================
   08. STYLES SPÉCIFIQUES AUX PAGES
   ========================================================================== */

/* Améliore la lisibilité pour les pages avec beaucoup de texte */
.readable-text-content p, 
.readable-text-content li {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.05rem; /* Un peu plus grand pour le confort */
    line-height: 1.8;   /* Plus d'espace entre les lignes */
    color: var(--kaiba-text-light);
}

.readable-text-content a {
    text-decoration: underline; /* On souligne les liens dans le texte pour bien les voir */
}

.readable-text-content a:hover {
    color: var(--kaiba-gold);
}
/* ============================================= */
/* ==  Style Hologramme/Glitch pour le logo   == */
/* ============================================= */

/* --- Style du texte du logo "MDTS" --- */
.logo-text {
    /* Mise en forme du texte */
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 2.2rem; /* N'hésite pas à ajuster la taille */
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #e5faff; /* Un blanc-bleuté très clair */

    /* Positionnement et transition */
    position: relative; /* Indispensable pour l'effet glitch */
    transition: all 0.2s ease-in-out;
    
    /* On s'assure qu'il est bien aligné avec l'image */
    vertical-align: middle;

    /* --- EFFET HOLOGRAMME PAR DÉFAUT --- */
    text-shadow:
        0 0 5px rgba(255, 255, 255, 0.8),
        0 0 10px rgba(0, 170, 255, 0.7),
        0 0 20px rgba(0, 170, 255, 0.6);
}

/* --- PRÉPARATION DE L'EFFET GLITCH (caché par défaut) --- */
.logo-text::before,
.logo-text::after {
    content: attr(data-text); /* Copie le texte depuis l'attribut data-text */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Adapte la couleur de fond si la tienne est différente */
    background: #0d1a2e;
    overflow: hidden;
    opacity: 0; /* Les copies sont invisibles par défaut */
    transition: opacity 0.3s ease-in-out;
}

/* --- DÉCLENCHEMENT AU SURVOL DE LA SOURIS (HOVER) --- */
.logo-text:hover {
    /* On intensifie légèrement l'hologramme de base */
    text-shadow:
        0 0 6px rgba(255, 255, 255, 1),
        0 0 15px rgba(0, 225, 255, 0.8),
        0 0 30px rgba(0, 225, 255, 0.7);
}

.logo-text:hover::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1; /* Couleur du premier glitch (magenta) */
    opacity: 1;
    animation: glitch-effect 1.5s linear infinite reverse;
}

.logo-text:hover::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9; /* Couleur du second glitch (cyan) */
    opacity: 1;
    animation: glitch-effect 2s linear infinite reverse;
}

/* --- L'ANIMATION DU GLITCH --- */
@keyframes glitch-effect {
    0% { clip-path: inset(45% 0 52% 0); }
    5% { clip-path: inset(79% 0 1% 0); }
    10% { clip-path: inset(4% 0 35% 0); }
    15% { clip-path: inset(99% 0 1% 0); }
    20% { clip-path: inset(25% 0 45% 0); }
    25% { clip-path: inset(5% 0 95% 0); }
    30% { clip-path: inset(35% 0 5% 0); }
    35% { clip-path: inset(1% 0 99% 0); }
    40% { clip-path: inset(80% 0 10% 0); }
    45% { clip-path: inset(45% 0 52% 0); }
    50% { clip-path: inset(10% 0 70% 0); }
    55% { clip-path: inset(95% 0 2% 0); }
    60% { clip-path: inset(20% 0 80% 0); }
    65% { clip-path: inset(1% 0 99% 0); }
    70% { clip-path: inset(60% 0 30% 0); }
    75% { clip-path: inset(90% 0 5% 0); }
    80% { clip-path: inset(30% 0 60% 0); }
    85% { clip-path: inset(5% 0 95% 0); }
    90% { clip-path: inset(70% 0 10% 0); }
    95% { clip-path: inset(1% 0 90% 0); }
    100% { clip-path: inset(45% 0 52% 0); }
}
/* ============================================= */
/* ==       Style Page Metagame             == */
/* ============================================= */

.metagame-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem; /* Espace entre chaque archétype */
}

.metagame-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 10px;
    background-color: rgba(13, 26, 46, 0.6); /* Fond sombre transparent */
    border-radius: 8px;
    border: 1px solid #2a4d7a;
    transition: all 0.3s ease;
}

.metagame-item:hover {
    background-color: rgba(42, 77, 122, 0.7);
    border-color: #e0b21a; /* Bordure dorée au survol */
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 170, 255, 0.2);
}

.archetype-rank {
    font-size: 1.2rem;
    font-weight: bold;
    color: #e0b21a;
    min-width: 30px;
    text-align: center;
}

.archetype-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%; /* Image ronde */
    border: 2px solid #2a4d7a;
}

.archetype-info {
    flex-grow: 1; /* Prend tout l'espace restant */
}

.archetype-name {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #e9ecef;
}

.progress {
    background-color: #182138; /* Fond de la barre de progression */
    border: 1px solid #2a4d7a;
    border-radius: 5px; /* Coins arrondis */
}

.progress-bar {
    background: linear-gradient(90deg, #00BCD4, #007bff); /* Dégradé stylé */
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    font-size: 0.85rem;
}
