/* --- Conteneur général --- */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* --- Titres centrés --- */
h1,
h2,
h3,
h4 {
    text-align: center;
    width: 100%;
}

/* --- Formulaire --- */
form {
    width: 100%;
    max-width: 500px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
}

/* --- Labels et Inputs --- */
label,
input,
select,
#return_reason_container {
    width: 100%;
    margin-top: 10px;
}

/* --- Boutons principaux --- */
button {
    display: block;
    width: 200px;
    min-width: 120px;
    max-width: 250px;
    margin: 15px auto 0 auto;
    padding: 10px 15px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0056b3;
}

/* --- Masquer motif de retour par défaut --- */
#return_reason_container {
    display: none;
}

/* --- Tableaux --- */
table {
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
    background: #fff;
}

table th,
table td {
    padding: 10px;
    border: 1px solid #ccc;
    text-align: center;
}

table th {
    background-color: #007bff;
    color: #fff;
}

table tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* --- Supprimer flèches sur input number --- */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

input[type=number]::-ms-clear,
input[type=number]::-ms-reveal {
    display: none;
    width: 0;
    height: 0;
}

/* --- Logout bouton --- */
.logout-container {
    position: absolute;
    top: 15px;
    right: 15px;
}

.logout-btn {
    background: none;
    border: none;
    color: #c0392b;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    transition: color 0.2s;
}

.logout-btn:hover {
    color: #e74c3c;
}

/* --- Logos transporteurs --- */
.transporter-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.transporter-logos button {
    width: 160px;
    height: 160px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.transporter-logos button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.transporter-logos button:hover img {
    transform: scale(1.3);
}

/* --- Groupes de boutons --- */
.button-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    align-items: stretch;
    /* forcer les boutons à avoir la même hauteur */
}

.button-group button {
    flex: 1;
    /* tous les boutons prennent la même largeur */
    min-width: 150px;
    max-width: 250px;
    padding: 10px;
    box-sizing: border-box;
    white-space: normal;
    /* permet le retour à la ligne à l'intérieur du bouton */
}

/* ========================= */
/* ===== VERSION MOBILE ==== */
/* ========================= */
@media (max-width: 600px) {

    .page-content {
        padding: 20px 10px 10px 10px;
        margin: 0 10px;
        align-items: center;
        justify-content: flex-start;
    }

    h2 {
        font-size: 26px;
    }

    form {
        width: 100%;
    }

    input,
    select {
        width: 95%;
        padding: 12px;
        font-size: 16px;
    }

    button {
        font-size: 16px;
        padding: 16px;
    }

    .logout-container {
        top: 10px;
        right: 10px;
    }

    .logout-btn {
        font-size: 12px;
    }

    /* logos plus gros sur mobile */
    .transporter-logos button {
        width: 220px;
        height: 220px;
    }

    /* boutons empilés et mêmes dimensions */
    .button-group {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .button-group button {
        width: 100%;
        flex: none;
    }
}

/* Créneau livraison */
.slot-group {
    width: 100%;
    margin-top: 15px;
}

.slot-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.slot-label {
    margin-right: 25px;
    cursor: pointer;
}

.slot-row input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}