* { box-sizing: border-box; }

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Poppins','Inter','Roboto', system-ui, -apple-system, Segoe UI, Arial, sans-serif;
    background: #f5f7fa;
    color: #222;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #1A5DB5;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

main {
    max-width: 1100px;
    min-height: 100%;
    margin: 24px auto;
    padding: 24px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

h1, h2, h3 { color: #173f7e; letter-spacing: .2px; }
h1 { text-align:center; font-size: clamp(1.6rem, 1rem + 2vw, 2.2rem); margin-bottom: 16px; }
h2 { font-size: clamp(1.4rem, .9rem + 1.5vw, 1.8rem); margin: 24px 0 12px; }
h3 { font-size: 1.2rem; margin: 18px 0 8px; }

p { margin: 0 0 12px; }
img { max-width: 100%; height: auto; }

header {
    background: #ffffff;
    border-bottom: 3px solid #1A5DB5;
    box-shadow: 0 3px 14px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
}

.logo {
    display: block;
    height: 56px;
    width: auto;
    max-width: 260px;
    object-fit: contain;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

nav ul li { position: relative; }

nav ul li > a {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #173f7e;
    background: transparent;
    transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
    will-change: transform;
    outline: none;
}

nav ul li > a:hover,
nav ul li > a.active {
    background: #FFCB38;
    color: #1A5DB5;
    box-shadow: 0 4px 12px rgba(26,93,181,0.18);
    transform: translateY(-1px);
}

.submenu {
    display: none;
    position: absolute;
    left: 0;
    min-width: 220px;
    padding: 8px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e9eef5;
    box-shadow: 0 14px 32px rgba(0,0,0,0.12);
    z-index: 1001;
}

li:hover > .submenu { display: block; }

.submenu li { width: 100%; }
.submenu li a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #173f7e;
    background: transparent;
    transition: background .2s ease, color .2s ease;
    white-space: nowrap;
}

.submenu li a:hover {
    background: #f3f6fb;
    color: #1A5DB5;
}

button, .btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    background: #FFCB38;
    color: #1A5DB5;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
button:hover, .btn:hover {
    transform: translateY(-1px);
    background: #1A5DB5;
    color: #fff;
    box-shadow: 0 8px 20px rgba(26,93,181,0.25);
}

input, textarea, select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #cfd8e3;
    background: #fff;
    font: inherit;
    transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #1A5DB5;
    box-shadow: 0 0 0 4px rgba(26,93,181,0.18);
}

label { font-weight: 600; color: #333; }

.success {
    color: green;
    text-align: center;
    font-weight: bold;
    margin: 20px 0;
}

.alert {
    color: red;
    text-align: center;
    font-weight: bold;
    margin: 20px 0;
}

footer {
    margin-top: 32px;
    background: #1A5DB5;
    color: #fff;
    text-align: center;
    padding: 24px 16px;
}
footer a { color: #FFCB38; font-weight: 600; }
footer a:hover { text-decoration: underline; }


@media (max-width: 980px) {
    header { flex-wrap: wrap; justify-content: center; gap: 10px; }
    .logo { height: 52px; margin: 0 auto; }
    nav ul { flex-wrap: wrap; justify-content: center; }
    .submenu { position: absolute; left: 50%; transform: translateX(-50%); }
}

@media (max-width: 640px) {
    main { padding: 16px; margin: 16px; }
    .logo { height: 46px; }
    nav ul { gap: 6px; }
    nav ul li > a { padding: 8px 12px; font-size: .95rem; }
    li:hover > .submenu {
        left: 0; right: 0;
        transform: none;
        min-width: unset;
    }
}


/* Galerie */
    .galerie {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .photo img {
        width: 100%;
        height: auto;
        border-radius: 10px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.15);
        transition: transform 0.3s ease;
        cursor: pointer;
    }

    .photo img:hover {
        transform: scale(1.05);
    }

    #lightbox {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.8);
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 9999;
    }

    #lightbox img {
        max-width: 90vw;
        max-height: 90vh;
        border-radius: 10px;
        box-shadow: 0 0 20px black;
    }

    #lightbox .prev,
    #lightbox .next {
        position: absolute;
        top: 50%;
        font-size: 50px;
        color: white;
        font-weight: bold;
        cursor: pointer;
        transform: translateY(-50%);
        padding: 10px;
        user-select: none;
    }

    #lightbox .prev { left: 30px; }
    #lightbox .next { right: 30px; }

    #lightbox .prev:hover,
    #lightbox .next:hover {
        color: #ccc;
    }

    #lightbox .close {
        position: absolute;
        top: 30px;
        right: 40px;
        font-size: 40px;
        color: white;
        cursor: pointer;
        font-weight: bold;
        z-index: 10001;
        transition: color 0.3s ease;
    }

    #lightbox .close:hover {
        color: #ccc;
    }

/* Partenaires */
    .partenaires {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
        align-items: center;
        margin-top: 30px;
    }

    .partenaire {
        text-align: center;
        width: 200px;
        height: 200px;
    }

    .partenaire img {
        max-width: 150px;
        height: auto;
        margin-bottom: 10px;
        transition: transform 0.3s;
    }

    .partenaire img:hover {
        transform: scale(1.1);
    }

    .partenaire p {
        margin: 0;
        font-weight: bold;
        color: #333;
    }
    
/* Table */
    table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 20px;
    }

    th, td {
        border: 1px solid #ccc;
        padding: 10px;
        text-align: center;
    }

    th {
        background: #eee;
    }

/* CLASSEMENT */
    .Classement {
        width: 80%;
        margin: 20px auto;
        border-collapse: collapse;
        font-size: 14px;
        background-color: #ffffff;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        overflow: hidden;
    }

    .Classement thead th {
        background-color: #FFCB38 !important;
        color: white;
        text-align: center;
        font-weight: bold;
        font-size: 16px;
        text-transform: uppercase;
    }

    .Classement thead th {
        padding: 10px;
        border-bottom: 1px solid #dddddd;
    }

    @media (max-width: 768px) {
        .Classement {
            width: auto;
            font-size: 11px;
        }
        
        .Classement thead {
            font-size: 13px;
        }

        .Classement thead th, .Classement tbody tr td {
            padding: 5px;
        }

        .Classement .detail-col {
            display: none;
            transition: all 0.3s ease-in-out;
        }
    }

    @media (max-width: 500px) {
        .Classement {
            width: auto;
            font-size: 10px;
        }
        
        .Classement thead {
            font-size: 11px;
        }

        .Classement thead th, .Classement tbody tr td {
            padding: 2px;
        }

        .Classement .detail-col {
            display: none;
            transition: all 0.3s ease-in-out;
        }
    }

    .Classement tbody tr {
        text-align: center;
    }

    .Classement tbody tr td {
        padding: 10px;
        border-bottom: 1px solid #dddddd;
        color: #333;
    }

    .Classement tbody tr:nth-child(odd) {
        background-color: #f9f9f9;
    }

    .Classement tbody tr:nth-child(even) {
        background-color: #ffffff;
    }

    .Classement tbody tr td img {
        height: 16px;
        width: 24px;
        vertical-align: middle;
    }

    .Classement tbody tr:hover {
        background-color: #f1f1f1;
    }

    .Classement tbody tr td:nth-child(1),
    .Classement tbody tr td:nth-child(8),
    .Classement tbody tr td:nth-child(9) {
        font-weight: bold;
        color: #FFCB38;
    }

    .Classement th:first-child,
    .Classement td:first-child {
        border-top-left-radius: 8px;
        border-bottom-left-radius: 8px;
    }

    .Classement th:last-child,
    .Classement td:last-child {
        border-top-right-radius: 8px;
        border-bottom-right-radius: 8px;
    }

    .classPartenaire {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        margin-right: 10%;
        font-size: 18px;
    }

    .classPartenaire img {
        max-height: 50px;
        margin-left: 10px;
    }

/* PALMARES */
    .palmares-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .card {
        background: #fff;
        border-radius: 1rem;
        padding: 1.5rem;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
        text-align: center;
        transition: transform 0.25s ease, box-shadow 0.25s ease;
        position: relative;
    }

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    }

    .year {
        position: absolute;
        top: 1rem;
        left: 1rem;
        background: #111;
        color: #fff;
        padding: 0.3rem 0.8rem;
        border-radius: 999px;
        font-weight: bold;
        font-size: 0.85rem;
    }

    .winner {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 1rem;
    }

    .winner img {
        width: 50px;
        height: auto;
        border-radius: 50%;
        margin-bottom: 0.6rem;
        box-shadow: 0 0 6px rgba(0,0,0,0.1);
    }

    .winner h2 {
        font-size: 1.3rem;
        margin: 0;
        color: #222;
    }

    .podium {
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
        color: #444;
        font-size: 0.9rem;
    }
