html {
    height: 100%;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1 {
    color: #00a1df;
}

p {
    color: #e2e8f0;
}

header img {
    height: 75px;
    border-radius: 10px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #003351;
    color: #ffffff;
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
}

.burger span {
    width: 26px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: .3s;
}

.menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 1;
}

.menu a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

.menu a:hover {
    color: #00a1df;
}

.voiture {
    display: none;
}

main {
    flex: 1;
    background-color: #002033;
}

main div {
    position: relative;
    background-color: #0d1d2b; 
    width: 80%;
    font-family: "Barlow", sans-serif;
    font-weight: 400;
    font-style: normal;
    justify-self: center;
    border-radius: 15px;
    padding: 20px; 
    margin: 30px auto; 
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    overflow: hidden; 
}

main div h1 {
    color: #00a1df;
}

main div h2{
    color: #00a1df;   
}

main div p {
    color: #ffffff;
    line-height: 1.6;
    font-size: 1.05rem;
}

main div p strong {
    color: #00a1df;
    font-weight: 700;
}

main div ul li span, 
main div p em {
    color: #94a3b8;
    font-style: normal;
    font-weight: 400;
}

main div label {
    color: #ffffff;
}

main a {
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: #00a1df;
}

main a:hover {
    color: #ffffff;
}

main div ul {
    list-style-type: none;
}

main div ul li {
    color: #ffffff;
    margin-bottom: 12px;
    font-size: 1.05rem;
}

main div ul li a {
    color: #00a1df;
    font-weight: 700;
}

.voiture-img {
    float: left; 
    width: calc((100% - 40px) / 3); 
    margin-right: 20px; 
    height: 250px; 
    object-fit: cover; 
    object-position: center;
    border-radius: 8px;
}

.voiture-img:last-of-type {
    margin-right: 0;
}

.photo-moi {
    margin: 2vh;
    width: 20vh;
    height: 20vh;
    border-radius: 25%;
    border-color: black;
    border-style: solid;
}

.table-container {
    width: 100%;
    max-width: 1100px;
    margin: 30px auto;
    overflow-x: auto; 
    background-color: #0d1d2b; 
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.wec-table {
    width: 100%;
    border-collapse: collapse; 
    text-align: left;
    font-family: Arial, sans-serif;
    color: #f8fafc;
}

.wec-table th {
    padding: 20px;
    font-size: 1.1rem;
    text-transform: uppercase;
    font-weight: bold;
    background-color: #071522; 
    border-bottom: 3px solid #1c3d5a;
}

.th-hypercar { 
    color: #ff4d4d !important; 
} 

.th-gt3 { 
    color: #ffdd33 !important; 
}

.wec-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #1c3d5a; 
    vertical-align: top;
    line-height: 1.6;
    font-size: 0.95rem;
}

.wec-table tbody tr:nth-child(even) {
    background-color: #091724; 
}

.feature-title {
    font-weight: bold;
    color: #00a1df; 
    width: 22%; 
}

.highlight-hypercar {
    color: #ff6b6b;
    font-weight: bold;
}

.highlight-gt3 {
    color: #ffe066;
    font-weight: bold;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
}

.badge-hypercar {
    background-color: #ff3b30;
    color: #ffffff;
}

.badge-gt3 {
    background-color: #ffcc00;
    color: #000000;
}

footer {
    text-align: center;
    background-color: #003351;
    width: 100%;
    height: 28vh;
}

footer img {
    margin-top: 5vh;
    width: 35vh;
}

footer p {
    color: #94a3b8;
}

footer a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    color: #00a1df;
}

@media(max-width:759px) {
    body.open {
        overflow: hidden;
    }

    body.open main, 
    body.open footer {
        opacity: 0 !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    .menu {
        position: fixed;
        top: 75px; 
        left: 0;
        width: 100%;
        height: calc(100vh - 75px);
        background: #003351;
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        box-sizing: border-box;
        transform: translateX(100%);
        transition: transform .3s ease;
        z-index: 9999;
    }

    .menu.open {
        transform: translateX(0);
    }
    
    .burger {
        display: flex;
    }

    .menu {
        position: fixed;
        inset: 64px 0 0 0;
        background: #003351;
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        transform: translateX(100%);
        transition: transform .3s ease;
    }

    .menu.open {
        transform: translateX(0);
    }

    .burger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px,5px);
    }

    .burger.active span:nth-child(2) {
        opacity: 0;
    }

    .burger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px,-6px);
    }

    .test {
        display: none;
    }

    .voiture {
        display: initial;
    }

    .voiture ul {
        list-style: none;
        justify-items: center;
    }

    main div {
        width: 95%;
        padding: 10px;
        box-sizing: border-box;
    }

    .voiture-img {
        float: none;
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .voiture-img:last-of-type {
        margin-bottom: 0;
    }

    /* === RESTRUCTURATION DU TABLEAU RESPONSIVE SANS AUCUN DÉBORDEMENT === */
    .table-container {
        margin: 15px auto;
        box-shadow: none;
        background-color: transparent;
        width: 100%;
        overflow-x: hidden; /* Coupe définitivement tout débordement horizontal */
    }

    .wec-table thead {
        display: none; /* Cache l'en-tête général qui écrase tout */
    }

    .wec-table, 
    .wec-table tbody, 
    .wec-table tr, 
    .wec-table td {
        display: block; /* Tout s'empile verticalement pour s'adapter à 100% de l'écran */
        width: 100%;
        box-sizing: border-box;
    }

    /* Chaque ligne du tableau devient une carte d'information isolée */
    .wec-table tr {
        background-color: #0d1d2b !important;
        margin-bottom: 25px;
        padding: 15px;
        border-radius: 12px;
        border: 1px solid #1c3d5a;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    /* Titre de la caractéristique en haut de la carte */
    .wec-table td.feature-title {
        font-size: 1.1rem;
        color: #00a1df !important; /* Bleu officiel WEC */
        border-bottom: 2px solid #1c3d5a;
        padding: 0 0 8px 0;
        margin-bottom: 12px;
        font-weight: bold;
    }

    /* Styles pour les zones de texte Hypercar et LMGT3 */
    .wec-table td:not(.feature-title) {
        padding: 10px 0;
        font-size: 0.95rem;
        border-bottom: none;
        white-space: normal; /* Force le retour à la ligne automatique */
        word-break: break-word; /* Coupe les mots si l'écran est minuscule */
    }

    /* Séparation visuelle intermédiaire entre l'info Hypercar et LMGT3 */
    .wec-table td:nth-child(2) {
        border-bottom: 1px dashed #1c3d5a;
        padding-bottom: 14px;
        margin-bottom: 6px;
    }

    /* --- TITRES INDICATEURS ET COULEURS IDENTIQUES AU PC --- */
    .wec-table td:not(.feature-title)::before {
        display: block;
        font-weight: bold;
        font-size: 0.8rem;
        text-transform: uppercase;
        margin-bottom: 4px;
        letter-spacing: 0.05em;
    }

    /* Version Mobile Hypercar : Titre Rouge */
    .wec-table td:nth-child(2)::before {
        content: "🏎️ Hypercar";
        color: #ff4d4d; /* Même rouge pétant que sur PC */
    }

    /* Version Mobile LMGT3 : Titre Jaune */
    .wec-table td:nth-child(3)::before {
        content: "🚗 LMGT3";
        color: #ffdd33; /* Même jaune vif que sur PC */
    }

    /* Ajustement des badges de couleur pour mobile */
    .badge {
        padding: 6px 10px;
        font-size: 0.8rem;
        display: inline-block;
        white-space: normal;
        text-align: center;
    }

    footer {
        height: auto;
        padding: 20px 0;
    }
}