/* Style de base */
body {
    font-family: 'Roboto', Arial, sans-serif; /* Utilisation de Roboto, avec fallback */
    margin: 0;
    padding: 0;
    background-color: #F9F9F9;
    text-align: center;
    color: #333;
}

.login-body {
    font-family: 'Roboto', Arial, sans-serif; /* Utilisation de Roboto, avec fallback */
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    text-align: center;
    color: #333;
    touch-action: manipulation;  /* Prévention de certaines actions tactiles comme le zoom */
}

/* Titre principal */
.title {
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 700; /* Variante en gras */
    font-size: 2rem;
    color: #8a2121;
}

/* Sous-titre */
.subtitle {
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 400; /* Variante régulière */
    font-size: 1.2rem;
    color: #555;
}

/* Conteneur principal */
.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

/* Grille des boutons */
.button-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px auto;
    max-width: 100%;
}

/* Carte des boutons */
.button-card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* Icône */
.icon {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

/* Titre du bouton */
.button-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 5px 0;
}

/* Sous-titre du bouton */
.button-subtitle {
    font-size: 0.9rem;
    color: #888;
}

/* Conteneur des tableaux */
.table-container {
    width: 100%;
    overflow-x: auto; /* Défilement horizontal */
    margin-top: 20px;
    padding: 10px;
}

/* Tableaux */
table {
    border-collapse: collapse;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

table th, table td {
    padding: 15px;
    text-align: center;
    border: 1px solid #ddd;
    font-size: 1rem;
}

table th {
    background-color: #f4f4f4;
    font-weight: bold;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Produits (listes de cadeaux) */
.product {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 10px 0;
    background-color: #f5f5f5;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
}

.product span {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}

/* Boutons dans les produits */
.product button {
    background-color: #e0e0e0;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.product button:hover {
    background-color: #d6d6d6;
}

/* Bouton général */
button {
    padding: 10px 15px;
    margin: 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Bouton "Vendre" */
.sell-button {
    background-color: #28a745;
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
}

.sell-button:hover {
    background-color: #218838;
}

.sell-button:disabled {
    background-color: #d3d3d3;
    color: #a9a9a9;
    cursor: not-allowed;
}

/* Modale */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 60%;
    max-width: 400px;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 50%;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.open {
    display: block;
}

.modal-overlay.open {
    display: block;
}

.modal h3 {
    margin: 0;
    font-size: 1.5em;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.modal input[type="text"], 
.modal select {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
}

.modal-buttons {
    justify-content: space-between;
}

.modal .btn {
    padding: 10px 20px;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.btn:hover {
    background-color: #45a049;
}

.modal .btn-danger {
    background-color: #ff4d4d;
    color: white;
}

.modal .btn-danger:hover {
    background-color: #e60000;
}

.modal .btn-success {
    background-color: #28a745;
    color: white;
}

.modal .btn-success:hover {
    background-color: #218838;
}

.container {
    padding: 20px;
}

h1, .subtitle {
    text-align: center;
}

.title a {
    text-decoration: none;
    color: inherit;
}

.btn {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

/* Bouton de fermeture */
.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 25px;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Style du formulaire */
form input, form select {
    width: 80%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Responsivité */
@media screen and (max-width: 768px) {
    .title {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    table th, table td {
        font-size: 0.9rem;
        padding: 10px;
    }

    .sell-button {
        padding: 10px 20px;
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .table-container {
        padding: 5px;
    }

    table {
        font-size: 0.8rem;
    }

    table th, table td {
        padding: 8px;
    }

    .sell-button {
        padding: 8px 16px;
        font-size: 14px;
    }
}
