:root {
    --bg-color: #f4f4f4;
    --text-dark: #1a1a1a;
    --accent-green: #005a32;
    --border-light: #e0e0e0;
    --font-serif: 'Roboto', sans-serif;
    --font-sans: 'Inter', sans-serif;
    --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --card-header-bg: #2d2d2d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    /* Empêche tout défilement horizontal parasite */
    width: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem 1.5rem;
}

/* --- Hero Section --- */
.hero-section {
    width: 100%;
    margin: 0;
    overflow: hidden;
    background-color: #000;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

.hero-credits {
    text-align: center;
    font-size: 0.65rem;
    color: #999;
    padding: 0.8rem 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-light);
    max-width: 1000px;
    margin: 0 auto;
}

/* --- Header & Intro --- */
header {
    text-align: center;
    margin-bottom: 5rem;
    border-bottom: 1px solid var(--text-dark);
    padding-bottom: 3rem;
    width: 100%;
}

.category {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: block;
}

h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 8vw, 4rem);
    line-height: 1.1;
    margin-bottom: 2rem;
    font-weight: 900;
    font-style: italic;
}

.intro-text {
    font-size: 1.25rem;
    color: #444;
    max-width: 750px;
    margin: 0 auto;
    font-family: var(--font-serif);
    line-height: 1.4;
}

/* --- Ranking List --- */
.ranking-list {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

.player-card {
    background: white;
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: var(--transition);
    width: 100%;
}

/* En-tête de la carte (Style Hockey) */
.player-header {
    display: grid;
    grid-template-columns: 80px 1fr 300px;
    cursor: pointer;
    background: var(--card-header-bg);
    color: white;
    min-height: 140px;
    position: relative;
    width: 100%;
}

.player-rank-container {
    background-color: var(--accent-green);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.player-rank-container::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 0;
    border-top: 70px solid transparent;
    border-bottom: 70px solid transparent;
    border-left: 20px solid var(--accent-green);
    z-index: 2;
}

.player-rank {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    z-index: 3;
}

.player-title-box {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.player-name {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.player-meta {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.player-meta .pos {
    color: var(--accent-green);
    background: white;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 0.85rem;
    margin-right: 1rem;
}

.player-meta .meta-club {
    opacity: 0.9;
}

.player-bio-line {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.6rem;
    letter-spacing: 1px;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    gap: 1.2rem;
    white-space: nowrap;
}

.player-bio-line span {
    display: flex;
    gap: 0.4rem;
}

.player-bio-line .label {
    color: rgba(255, 255, 255, 0.4);
}

.player-photo-container {
    width: 300px;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.player-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: var(--transition);
}

.player-card:hover .player-photo {
    transform: scale(1.05);
}

.player-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    max-height: 0;
    opacity: 0;
    transition: var(--transition);
    background: white;
    overflow: hidden;
    padding: 0 3rem;
}

.player-card.active .player-content {
    max-height: 2500px;
    opacity: 1;
    padding: 3rem;
    border-top: 1px solid var(--border-light);
}

.profile-section h3,
.skills-section h3 {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    color: #666;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.5rem;
}

.analysis-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.skill-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-label {
    font-weight: 500;
    font-size: 1.05rem;
    color: #1a1a1a;
}

.skill-value-text {
    font-weight: 700;
    font-size: 1rem;
    text-align: right;
    text-transform: capitalize;
}

.skill-bar-container {
    width: 100%;
    height: 4px;
    background: #eee;
    margin-top: 0.2rem;
    position: relative;
}

.skill-bar-fill {
    height: 100%;
    transition: width 1s ease-out;
}

.grade-elite {
    color: #005a32;
}

.grade-high {
    color: #2ecc71;
}

.grade-above {
    color: #27ae60;
}

.grade-average {
    color: #f39c12;
}

.fill-elite {
    background-color: #005a32;
}

.fill-high {
    background-color: #2ecc71;
}

.fill-above {
    background-color: #27ae60;
}

.fill-average {
    background-color: #f39c12;
}

.conclusion {
    margin-top: 5rem;
    padding: 4rem;
    background: white;
    border: 1px solid var(--border-light);
    text-align: center;
}

.conclusion h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.conclusion p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    color: #444;
}

.chevron {
    position: absolute;
    bottom: 10px;
    right: 15px;
    width: 24px;
    height: 24px;
    fill: white;
    transition: transform 0.3s;
}

.player-card.active .chevron {
    transform: rotate(180deg);
}

/* --- RESPONSIVITÉ --- */

@media (max-width: 1024px) {
    .player-header {
        grid-template-columns: 80px 1fr 200px;
    }

    .player-photo-container {
        width: 200px;
    }
}

/* Tablette (850px et moins) : Pas de photo dans le header */
@media (max-width: 850px) {
    .player-header {
        grid-template-columns: 80px 1fr;
    }

    .player-photo-container {
        display: none;
    }

    .player-rank-container::after {
        border-top: 50px solid transparent;
        border-bottom: 50px solid transparent;
    }

    .player-title-box {
        padding: 1.5rem;
    }

    .player-meta {
        font-size: 0.9rem;
        flex-direction: row;
        gap: 1rem;
    }

    .player-bio-line {
        display: flex;
        flex-wrap: wrap;
        white-space: normal;
    }

    .player-content {
        grid-template-columns: 1fr;
    }
}

/* Mobile (700px et moins) : Photo en haut */
@media (max-width: 700px) {
    .container {
        padding: 2rem 1.2rem;
    }

    header {
        margin-bottom: 3rem;
        padding-bottom: 2rem;
    }

    h1 {
        font-size: 2.4rem;
        text-align: left;
    }

    .intro-text {
        text-align: left;
        font-size: 1.1rem;
    }

    .player-header {
        display: flex;
        flex-direction: column;
    }

    .player-photo-container {
        display: block;
        width: 100%;
        height: 250px;
        order: -1;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .player-rank-container {
        width: 100%;
        height: 44px;
        justify-content: flex-start;
        padding-left: 1.2rem;
    }

    .player-rank-container::after {
        display: none;
    }

    .player-rank {
        font-size: 1.6rem;
    }

    .player-title-box {
        padding: 1.5rem 1.25rem;
    }

    .player-name {
        font-size: 1.8rem;
    }

    .player-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .player-bio-line {
        gap: 0.6rem;
        font-size: 0.7rem;
    }

    .conclusion {
        padding: 2.5rem 1.5rem;
    }

    .conclusion h2 {
        font-size: 1.8rem;
    }
}