:root {
    --orange: #F88D2A;
    --orange-light: #ffa85a;
    --orange-bg: rgba(248, 141, 42, 0.18);
    --green: #19954E;
    --green-light: #36b56b;
    --green-bg: rgba(25, 149, 78, 0.20);
    --teal: #00AB9A;
    --teal-light: #2bc4b3;
    --teal-bg: rgba(0, 171, 154, 0.18);
    --bg-card: #2d343c;
    --bg-soft: #262c33;
    --bg-hover: #353d46;
    --border: #3d454f;
    --text-main: #eef1f4;
    --text-soft: #b8bfc6;
    --text-mute: #7e858d;
    --gold: #f5cf5c;
    --silver: #cbd0d6;
    --bronze: #e89656;
    --red: #ff7a85;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(180deg, #1f2228 0%, #2a2d35 50%, #353841 100%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    padding: 20px 16px 60px;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--teal-light);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: all 0.2s;
}

.back-link:hover {
    border-color: var(--teal);
    background: var(--bg-hover);
    transform: translateX(-2px);
}

.header {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-soft) 100%);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 30px 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--orange) 0%, var(--orange) 33%, var(--teal) 33%, var(--teal) 66%, var(--green) 66%, var(--green) 100%);
}

.logo-img {
    max-width: 280px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 10px;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.08));
}

@media (max-width: 768px) {
    .logo-img {
        max-width: 200px;
    }
}

.header-title {
    margin-top: 16px;
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 700;
    letter-spacing: 1.5px;
}

.header-sub {
    color: var(--text-soft);
    font-size: 15px;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

.header-date {
    color: var(--orange-light);
    font-size: 13px;
    margin-top: 8px;
    font-weight: 600;
}

section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 26px 28px;
    margin-bottom: 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

h2 {
    color: var(--teal-light);
    font-size: 21px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

h2 .num {
    background: var(--orange);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    flex-shrink: 0;
}

h3 {
    color: var(--text-main);
    font-size: 16px;
    margin: 18px 0 10px;
    font-weight: 700;
}

p {
    color: var(--text-soft);
    margin-bottom: 12px;
    font-size: 14.5px;
}

p strong {
    color: var(--text-main);
    font-weight: 700;
}

p .accent-teal {
    color: var(--teal-light);
    font-weight: 700;
}

p .accent-orange {
    color: var(--orange-light);
    font-weight: 700;
}

p .accent-green {
    color: var(--green-light);
    font-weight: 700;
}

ul,
ol {
    color: var(--text-soft);
    margin: 8px 0 14px 28px;
}

li {
    margin-bottom: 5px;
    font-size: 14.5px;
}

.callout {
    background: linear-gradient(135deg, rgba(0, 171, 154, 0.10) 0%, rgba(248, 141, 42, 0.08) 100%);
    border-left: 4px solid var(--teal);
    border-radius: 8px;
    padding: 14px 18px;
    margin: 14px 0;
    font-size: 14px;
}

.callout.tip {
    border-left-color: var(--orange);
    background: rgba(248, 141, 42, 0.10);
}

.callout.highlight {
    border-left-color: var(--green);
    background: rgba(25, 149, 78, 0.12);
}

.callout-title {
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.callout.tip .callout-title {
    color: var(--orange-light);
}

.callout.highlight .callout-title {
    color: var(--green-light);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    font-size: 13.5px;
}

thead th {
    background: var(--bg-soft);
    color: var(--teal-light);
    font-weight: 700;
    padding: 10px 10px;
    text-align: center;
    border-bottom: 2px solid var(--teal);
    border-right: 1px solid var(--border);
    font-size: 12px;
    letter-spacing: 0.3px;
}

tbody td {
    padding: 9px 10px;
    text-align: center;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 13.5px;
}

tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02);
}

tbody tr:hover td {
    background: var(--bg-hover);
}

td.pos {
    font-weight: 800;
    color: var(--orange-light);
    background: rgba(248, 141, 42, 0.08) !important;
}

td.podium-1 {
    color: var(--gold);
    font-weight: 800;
}

td.podium-2 {
    color: var(--silver);
    font-weight: 800;
}

td.podium-3 {
    color: var(--bronze);
    font-weight: 800;
}

td.left {
    text-align: left;
}

td.long {
    color: var(--gold);
    font-weight: 700;
}

td.moyen {
    color: var(--silver);
    font-weight: 700;
}

td.court {
    color: var(--bronze);
    font-weight: 700;
}

.bareme-wrap {
    overflow-x: auto;
}

table.bareme {
    min-width: 600px;
    font-size: 12.5px;
}

table.bareme thead th {
    font-size: 11px;
    padding: 8px 6px;
}

table.bareme tbody td {
    padding: 6px 8px;
    font-size: 12.5px;
}

table.bareme .long-col {
    background: rgba(245, 207, 92, 0.07);
}

table.bareme .moyen-col {
    background: rgba(203, 208, 214, 0.05);
}

table.bareme .court-col {
    background: rgba(232, 150, 86, 0.05);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.stat {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    text-align: center;
}

.stat .v {
    font-size: 22px;
    font-weight: 800;
    color: var(--teal-light);
    line-height: 1;
}

.stat.orange .v {
    color: var(--orange-light);
}

.stat.green .v {
    color: var(--green-light);
}

.stat .l {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-mute);
    margin-top: 6px;
    font-weight: 600;
}

.bonus-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.bonus-card {
    background: var(--bg-soft);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    text-align: center;
}

.bonus-card.full {
    border-color: var(--orange);
    background: rgba(248, 141, 42, 0.10);
}

.bonus-card.half {
    border-color: var(--orange-light);
    background: rgba(248, 141, 42, 0.05);
}

.bonus-card .pts {
    font-size: 32px;
    font-weight: 900;
    color: var(--orange-light);
    line-height: 1;
}

.bonus-card.half .pts {
    color: var(--orange);
}

.bonus-card .label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 10px;
}

.bonus-card .desc {
    font-size: 12px;
    color: var(--text-mute);
    margin-top: 6px;
    line-height: 1.4;
}

a {
    color: var(--teal-light);
    text-decoration: none;
    border-bottom: 1px dotted var(--teal);
}

a:hover {
    color: var(--orange-light);
    border-bottom-color: var(--orange);
}

.footer {
    text-align: center;
    margin-top: 24px;
    padding: 20px;
    color: var(--text-mute);
    font-size: 12px;
    line-height: 1.7;
    border-top: 1px solid var(--border);
}

.footer .accent {
    color: var(--orange-light);
    font-weight: 700;
}

code {
    background: var(--bg-hover);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 12.5px;
    color: var(--orange-light);
    border: 1px solid var(--border);
}

/* ======== BOUTON SCROLL TOP ======== */
  #scrollTopBtn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--teal);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.25s, transform 0.25s, background 0.2s;
    pointer-events: none;
    z-index: 999;
  }
  #scrollTopBtn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  #scrollTopBtn:hover { background: var(--teal-light); }
  @media (max-width: 768px) {
    #scrollTopBtn { bottom: 16px; right: 16px; width: 40px; height: 40px; font-size: 17px; }
  }