/* --------------------------------------------------------------
   GLOBAL
-------------------------------------------------------------- */
body {
    font-family: Arial, sans-serif;
    background: #e9edf0;
    margin: 0;
    padding: 20px;
    color: #222;
    overflow-x: hidden;
}

h1 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 30px;
    color: #003366;
    font-weight: bold;
}

h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #003c80;
    text-align: center;
}


/* --------------------------------------------------------------
   CONTAINER + BLOCS RESPONSIVE
-------------------------------------------------------------- */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 35px;
    width: 100%;
}

.box {
    background: #ffffff;
    width: 600px;
    max-width: 95%;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0px 4px 14px rgba(0,0,0,0.20);
    transition: 0.2s;
}


/* --------------------------------------------------------------
   FORMULAIRE
-------------------------------------------------------------- */
label {
    font-weight: bold;
    font-size: 18px;
}

input, select {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    margin-bottom: 18px;
    border: 2px solid #aaa;
    border-radius: 8px;
    background: #f5f7fa;
    font-size: 18px;
}

button {
    width: 100%;
    padding: 15px;
    background: #0078ff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
}

button:hover {
    background: #005fcc;
}


/* --------------------------------------------------------------
   RESULTAT RECHERCHE
-------------------------------------------------------------- */
.result {
    background: #e3f1ff;
    border-left: 5px solid #0078ff;
    padding: 14px;
    border-radius: 6px;
}

.error {
    color: red;
    font-weight: bold;
}


/* --------------------------------------------------------------
   PASTILLES
-------------------------------------------------------------- */
.dot {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #222;
    margin-right: 8px;
}

.dot-split {
    display: inline-block;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #222;
    margin-right: 8px;
}

.dot-split .left,
.dot-split .right {
    width: 50%;
    height: 100%;
    float: left;
}


/* --------------------------------------------------------------
   TABLEAU RESPONSIVE + SCROLL MOBILE
-------------------------------------------------------------- */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-radius: 10px;
    border: 2px solid #000;
    margin-top: 15px;
}

/* Tableau principal */
.color-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
}

/* En-têtes */
.color-table th {
    background: #ffffff;
    color: #000;
    font-size: 22px;
    padding: 14px;
    border: 3px solid #000;
    text-align: center;
    letter-spacing: 1px;
}

/* Cellules */
.color-table td {
    border: 2px solid #000;
    height: 55px;               /* ✅ plus haut */
    min-width: 80px;            /* ✅ plus large */
    font-size: 22px;            /* ✅ plus lisible */
    font-weight: bold;
    text-align: center;
    vertical-align: middle;
    padding: 6px;
    border-radius: 6px;
}

/* contraste auto */
.color-table td.light-text { color: #000 !important; }
.color-table td.dark-text  { color: #fff !important; }

/* Hover PC */
@media (hover: hover) {
    .color-table td:hover {
        filter: brightness(1.15);
        cursor: pointer;
    }
}


/* --------------------------------------------------------------
   RESPONSIVE TABLETTE
-------------------------------------------------------------- */
@media (max-width: 900px) {

    .box {
        width: 90%;
        padding: 22px;
    }

    .color-table td {
        min-width: 70px;
        height: 50px;
        font-size: 20px;
    }

    .color-table th {
        font-size: 20px;
        padding: 10px;
    }
}


/* --------------------------------------------------------------
   RESPONSIVE MOBILE
-------------------------------------------------------------- */
@media (max-width: 600px) {

    h1 { font-size: 26px; }
    h2 { font-size: 20px; }

    input, select, button {
        font-size: 16px;
        padding: 12px;
    }

    .dot,
    .dot-split {
        width: 18px;
        height: 18px;
    }

    .color-table td {
        min-width: 55px;
        font-size: 16px;
        height: 40px;
        padding: 4px;
        border-radius: 4px;
    }

    .color-table th {
        font-size: 16px;
        padding: 8px;
    }

    .table-frame {
        height: 500px;
    }
}


/* --------------------------------------------------------------
   RESPONSIVE MINI-MOBILE (iPhone SE)
-------------------------------------------------------------- */
@media (max-width: 400px) {

    .color-table td {
        min-width: 45px;
        font-size: 14px;
        height: 34px;
    }

    .color-table th {
        font-size: 14px;
        padding: 6px;
    }
}