/* ==========================================
   TYPE DE TARIF
========================================== */

#page-selection .actions-selection {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

/* ==========================================
   STYLE GÉNÉRAL DES BOUTONS
   PAGE MA SÉLECTION UNIQUEMENT
========================================== */

#page-selection button,
#page-selection .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;

    padding: 10px 16px;
    min-height: 40px;

    border: 1px solid #dce2e9;
    border-radius: 7px;

    font-family: 'Bitter', serif;
    font-size: clamp(14px, 1.1vw, 16px);
    font-weight: 400;
    line-height: 1.2;

    cursor: pointer;
    white-space: nowrap;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


#page-selection button:focus-visible,
#page-selection .button:focus-visible {
    outline: 3px solid rgba(52, 120, 200, 0.3);
    outline-offset: 2px;
}

#page-selection button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================
   BOUTON VIDER LA SÉLECTION
========================================== */

#page-selection button.vider-liste {
    background: #edf0f3;
    border-color: #dce2e9;
    color: #344054;
}

#page-selection button.vider-liste:hover {
    background: #dfe5eb;
    border-color: #cbd3dd;
}

/* ==========================================
   INTERRUPTEUR TARIF
========================================== */

#page-selection .switch-tarif {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;

    background: #fff;
    border: 2px solid #e0e4e9;
    border-radius: 10px;

    width: fit-content;
    box-shadow: 0 2px 2px rgba(0,0,0,0.04);
    margin: 0;
}

/* ==========================================
   INTERRUPTEUR
========================================== */

#page-selection .switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    flex-shrink: 0;
}

#page-selection .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

#page-selection .slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background-color: #ddd;
    border: 1px solid #000;
    border-radius: 24px;
    transition: background-color 0.2s ease;
}

#page-selection .slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    top: 2px;
    background-color: #000;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

#page-selection .switch input:checked + .slider {
    background-color: #d8e8f9;
}

#page-selection .switch input:checked + .slider::before {
    transform: translateX(22px);
}

/* ==========================================
   CONTENEUR DU TABLEAU
========================================== */

#page-selection #wishlistContainer {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e0e4e9;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.05);

}

/* ==========================================
   TABLEAU
========================================== */

#page-selection .table-selection {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

/* ==========================================
   CELLULES DU TABLEAU
========================================== */

#page-selection .table-selection th,
#page-selection .table-selection td {

    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
}

/* En-têtes */
#page-selection .table-selection th,
#page-selection .table-selection tfoot th
{
    background: #ccc;
    color: #000;
    padding-top: 10px;
    padding-bottom: 10px;
    
}

/* Cellules du contenu */
#page-selection .table-selection td {
    border-bottom: 1px solid #e8ebef;
}

/* ==========================================
   CORPS DU TABLEAU
========================================== */

/* Hauteur des lignes et cellules */
#page-selection .table-selection tbody tr,
#page-selection .table-selection tbody td {
    height: clamp(30px, 7vw, 100px);
}

/* Alternance des couleurs */
#page-selection .table-selection tbody tr:nth-child(even) {
    background: #eee;
}

/* ==========================================
   LARGEUR DES COLONNES
========================================== */

/* 1 - Nom du jeu */
#page-selection .table-selection th:nth-child(1),
#page-selection .table-selection td:nth-child(1) {
    width: 25%;
}

/* 2 - Photo */
#page-selection .table-selection th:nth-child(2),
#page-selection .table-selection td:nth-child(2) {
    width: 15%;
}

/* 3 - Option */
#page-selection .table-selection th:nth-child(3),
#page-selection .table-selection td:nth-child(3) {
    width: 25%;
}

/* 4 - Tarif */
#page-selection .table-selection th:nth-child(4),
#page-selection .table-selection td:nth-child(4) {
    width: 15%;
}

/* 5 - Caution */
#page-selection .table-selection th:nth-child(5),
#page-selection .table-selection td:nth-child(5) {
    width: 15%;
}

/* 6 - Suppression */
#page-selection .table-selection th:nth-child(6),
#page-selection .table-selection td:nth-child(6) {
    width: 15%;
}

/* ==========================================
   NOM DU JEU
========================================== */

#page-selection .table-selection td:nth-child(1) {
    font-weight: 600;
}

#page-selection .table-selection td:nth-child(1) a {
    color: #000;
    text-decoration: none;
}

/* ==========================================
   PHOTO DU JEU
========================================== */

#page-selection .table-selection td:nth-child(2) img {
    width: 95%;
    height: 95%;
    max-width: 95%;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    display: block;
    margin: auto;
    transition: transform 0.2s ease;
}


/* ==========================================
   LISTES DÉROULANTES
========================================== */

#page-selection select {
    padding: 10px 12px;
    border: 1px solid #ccd3dc;
    border-radius: 7px;
    background: #fff;
    color: #344054;
    font-family: 'Bitter', serif;
    cursor: pointer;
    max-width: 100%;
}

#page-selection select:focus {
    outline: none;
    border-color: #3478c8;
    box-shadow: 0 0 0 3px rgba(52,120,200,0.12);
}

#page-selection select:disabled {
    background: #f0f1f3;
    color: #999;
    cursor: not-allowed;
}

/* ==========================================
   BOUTON SUPPRIMER
   COULEUR ROUGE
========================================== */

#page-selection .table-selection td button {

    /* Dimensions */
    width: 70%;
    aspect-ratio: 1 / 1;
    height: auto;
    min-height: 0;
    max-height: 40px;
    max-width: 40px;

    /* Suppression du style général */
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    margin: 0;

    /* Apparence */
    background: #fce8e8;
    border: 1px solid #f5d0d0;
    border-radius: 8px;

    /* Texte */
    color: #b42318;
    line-height: 1;

    cursor: pointer;
    white-space: nowrap;
    box-shadow: none;
    transform: none;
}

#page-selection .table-selection td button:hover {
    background: #f8d7d7;
    border-color: #e9baba;
    color: #912018;
}







/* ==========================================
   AJOUTER UN JEU
   BOUTON GRIS
========================================== */

#page-selection .ajout-jeu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 15px 0;
}

#page-selection .ajout-jeu label {
    font-weight: 600;
    color: #344054;
}

#page-selection #select-jeu,
#page-selection #select-jeu-option {
    margin: 0;
    min-width: 180px;
}

#page-selection .ajout-jeu button {
    background: #edf0f3;
    border-color: #dce2e9;
    color: #344054;
}

#page-selection .ajout-jeu button:hover {
    background: #dfe5eb;
    border-color: #cbd3dd;
}

/* ==========================================
   ADAPTATION MOBILE
========================================== */

@media (max-width: 700px) {


    /* Masquer complètement la colonne photo */
    #page-selection .table-selection th:nth-child(2),
    #page-selection .table-selection td:nth-child(2) {
        display: none;
    }

}
