/* ===================== */
/* FORMULAIRE LOGIN / INPUTS */
/* ===================== */

.login-container {
    background: #fff;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    width: 100%;
    max-width: 450px;
    text-align: center;
    transition: all 0.3s ease;
}

.login-container:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.login-container h2 {
    margin-bottom: 35px;
    color: #222;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-form label {
    display: block;
    text-align: left;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.login-form input:hover {
    border-color: #bdbdbd;
    background: #fff;
}

.login-form input:focus {
    border-color: #4CAF50;
    outline: none;
    background: #fff;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.2);
}

.login-form button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-form button:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    box-shadow: 0 6px 15px rgba(76, 175, 80, 0.3);
    transform: translateY(-2px);
}

.login-form button:active {
    transform: translateY(0);
}

.signup-link {
    margin-top: 15px;
    font-size: 14px;
}

.signup-link a {
    color: #4CAF50;
    text-decoration: none;
}

.signup-link a:hover {
    text-decoration: underline;
}

/* Styles pour les messages de feedback */
#message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 30px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    min-height: 20px;
    max-width: 500px;
    z-index: 1000;
    animation: slideInCenter 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#message:empty {
    display: none;
}

@keyframes slideInCenter {
    from {
        opacity: 0;
        transform: translate(-50%, -55%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Message de succès (vert) */
#message.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

/* Message d'erreur (rouge) */
#message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Container centré type DB */
.db-container {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 500px;
    text-align: center;
    margin: 50px auto;
    transition: background 0.3s ease, color 0.3s ease;
}

.db-container h2 {
    margin-bottom: 20px;
    color: #333;
}

.db-info {
    text-align: left;
    margin-bottom: 10px;
    font-size: 16px;
    color: #555;
}

.db-info strong {
    color: #333;
}

/* Bouton retour / lien transformé */
.link-button {
    display: inline-block;
    margin-top: 15px;
    padding: 12px;
    background-color: #2196F3;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
    transition: background 0.3s ease;
}

.link-button:hover {
    background-color: #1976D2;
}

/*============================= */
/* Styles pour testSupabase.php */
/* ============================= */
.db-container {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 600px;
    text-align: center;
    margin: 50px auto;
    transition: background 0.3s ease, color 0.3s ease;
}

.db-container h2 {
    margin-bottom: 20px;
    color: #333;
    text-align: left;
}

.db-container pre,
.db-info {
    display: block;
    margin-bottom: 20px;
    width: 100%;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #333;
}

/* Boutons d’action pour testSupabase uniquement */
.db-container .action-buttons {
    margin-bottom: 30px;
    text-align: center;
}

.db-container .action-buttons button {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: none;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.db-container .action-buttons button:hover {
    background-color: #45a049;
}

/* Messages de succès et d'erreur */
.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

/* Styles spécifiques pour les champs de type number (PIN) */
input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Responsive pour testSupabase */
@media (max-width: 480px) {
    .db-container {
        padding: 20px;
        margin: 20px;
    }

    .db-container .action-buttons button {
        font-size: 14px;
        padding: 10px;
    }
}

/* ============================= */
/*         PROFILE FORMS         */
/* ============================= */

.profile_section {
    max-width: 600px;
    margin: 0 auto;
}

.login-form.group-form,
.login-form.profile-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#editGroupForm,
#changeGroupPinForm {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===================== */
/* GROUPE INFO DISPLAY */
/* ===================== */

.profile_section .group-info-display p {
    color: #f0f0f0 !important;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
}

.profile_section .group-info-display p strong {
    color: #ffffff !important;
    font-weight: 600;
}