/* Styles généraux pour le plugin CRM Ascomade */

.required-note {
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 15px;
}

.departement-helper,
.structure-helper {
    font-size: 0.9rem;
    font-style: italic;
    margin: 5px 0 10px;
}

.required {
    color: red;
}


/* Formulaire d'inscription */
.crm-ascomade-registration-form {
    max-width: 600px;
    margin: 0 auto;
}

.crm-ascomade-registration-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.crm-ascomade-registration-form input[type="text"],
.crm-ascomade-registration-form input[type="email"],
.crm-ascomade-registration-form input[type="password"],
.crm-ascomade-registration-form input[type="number"],
.crm-ascomade-registration-form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.crm-ascomade-registration-form textarea {
    height: 100px;
}

.crm-ascomade-registration-form input[type="submit"],
.crm-ascomade-registration-form button {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
    /* margin-top: 10px; */
}

.crm-ascomade-registration-form input[type="submit"]:hover,
.crm-ascomade-registration-form button:hover {
    background-color: #005177;
}

.crm-ascomade-registration-form .casquette-group {
    border: 1px solid #e5e5e5;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.crm-ascomade-registration-form .casquette-group h3 {
    margin-top: 0;
}

.crm-ascomade-registration-form .remove-casquette {
    background-color: #dc3232;
    margin-top: 10px;
}

.crm-ascomade-registration-form .remove-casquette:hover {
    background-color: #a60000;
}

.crm-ascomade-registration-form select {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #333;
    background-color: #fff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 35px;
    background: #fff url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2210px%22%20height%3D%2210px%22%20viewBox%3D%220%200%2010%2010%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpolyline%20fill%3D%22none%22%20stroke%3D%22%23333%22%20stroke-width%3D%221.5%22%20points%3D%220.75%202.25%205%206.25%209.25%202.25%22/%3E%3C/svg%3E) no-repeat right 10px center / 10px 10px;
}

.registation-button {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

/* Pour les navigateurs qui nécessitent un positionnement relatif pour l'icône */
.crm-ascomade-registration-form select::-ms-expand {
    display: none;
    /* Masque la flèche sur IE/Edge (anciennes versions) */
}

/* Profil utilisateur */
.crm-ascomade-user-profile h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.crm-ascomade-user-profile p {
    font-size: 16px;
    margin-bottom: 10px;
}

.crm-ascomade-user-profile strong {
    font-weight: bold;
}

.crm-ascomade-user-profile .casquette-group {
    margin-bottom: 20px;
}

.crm-ascomade-user-profile ul {
    list-style-type: disc;
    margin-left: 20px;
}

.crm-ascomade-user-profile ul li {
    margin-bottom: 5px;
}

/* Tableau dans l'administration */
.wp-list-table th {
    font-weight: bold;
}

.wp-list-table td {
    vertical-align: top;
}

.wp-list-table .button {
    margin-right: 5px;
}

/* Modales */
.crm-ascomade-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.crm-ascomade-modal .modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 4px;
    width: 80%;
    max-width: 600px;
}

.crm-ascomade-modal .modal-content h3 {
    margin-top: 0;
}

.crm-ascomade-modal .modal-content label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.crm-ascomade-modal .modal-content input[type="text"],
.crm-ascomade-modal .modal-content input[type="email"],
.crm-ascomade-modal .modal-content textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.crm-ascomade-modal .modal-content textarea {
    height: 80px;
}

.crm-ascomade-modal .modal-content .button {
    margin-right: 10px;
}

/* Messages d'erreur et de succès */
.crm-ascomade-message {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.crm-ascomade-message.error {
    background-color: #f8d7da;
    color: #721c24;
}

.crm-ascomade-message.success {
    background-color: #d4edda;
    color: #155724;
}

/* Styles pour le tableau des comptes approuvés */
.crm-ascomade-approved-table {
    width: 100%;
    border-collapse: collapse;
}

.crm-ascomade-approved-table th,
.crm-ascomade-approved-table td {
    border: 1px solid #ddd;
    padding: 8px;
}

.crm-ascomade-approved-table th {
    background-color: #f1f1f1;
    text-align: left;
}

/* Styles spécifiques pour les boutons dans l'administration */
.button.open-approve-modal {
    background-color: #28a745;
    color: #fff;
}

.button.open-approve-modal:hover {
    background-color: #218838;
}

.button.open-reject-modal {
    background-color: #dc3545;
    color: #fff;
}

.button.open-reject-modal:hover {
    background-color: #c82333;
}

.button.open-edit-modal {
    background-color: #17a2b8;
    color: #fff;
}

.button.open-edit-modal:hover {
    background-color: #138496;
}

/* Responsive */
@media (max-width: 600px) {

    .crm-ascomade-registration-form,
    .crm-ascomade-user-profile {
        padding: 0 15px;
    }

    .crm-ascomade-modal .modal-content {
        width: 95%;
        margin-top: 20%;
    }
}


/* Pastille Autorisation Forums */

.crm-access-badge {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 5px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    vertical-align: middle;
}

.crm-access-badge.has-access {
    background-color: #28a745;
    /* Vert */
    color: #fff;
}

.crm-access-badge.no-access {
    background-color: #dc3545;
    /* Rouge */
    color: #fff;
}

/* CSS LISTE */

/* Styles pour les cartes */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    width: calc(33.333% - 20px);
    box-sizing: border-box;
}

.card-header {
    background: #f1f1f1;
    padding: 10px;
    border-bottom: 1px solid #ccd0d4;
}

.card-body {
    padding: 10px;
}

.search-box {
    width: 100%;
    margin-bottom: 10px;
}

.checkbox-group {
    max-height: 200px;
    overflow-y: auto;
}

/* Styles pour le modal */
#crm-edit-list-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    overflow: auto;
    /* Permettre le défilement si le contenu dépasse */
}

#crm-edit-list-modal .modal-content {
    background: #fff;
    padding: 20px;
    margin: 5% auto;
    width: 80%;
    max-height: 90%;
    /* Limiter la hauteur maximale */
    overflow: auto;
    /* Activer le défilement à l'intérieur du modal */
    position: relative;
    box-sizing: border-box;
}

#crm-edit-list-modal .close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
}

/* Styles pour les cartes à l'intérieur du modal */
#crm-edit-list-modal .card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

#crm-edit-list-modal .card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    width: calc(33.333% - 20px);
    box-sizing: border-box;
}

#crm-edit-list-modal .card-header {
    background: #f1f1f1;
    padding: 10px;
    border-bottom: 1px solid #ccd0d4;
}

#crm-edit-list-modal .card-body {
    padding: 10px;
}

#crm-edit-list-modal .search-box {
    width: 100%;
    margin-bottom: 10px;
}

#crm-edit-list-modal .checkbox-group {
    max-height: 150px;
    /* Limiter la hauteur pour permettre le défilement */
    overflow-y: auto;
}

/* Styles pour les onglets */
.modal-tabs {
    overflow: hidden;
    background-color: #f1f1f1;
    margin-bottom: 10px;
}

.modal-tabs button {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 10px 16px;
    transition: 0.3s;
    font-size: 16px;
}

.modal-tabs button:hover {
    background-color: #ddd;
}

.modal-tabs button.active {
    background-color: #ccc;
}

.tabcontent {
    display: none;
    padding: 6px 12px;
    border-top: none;
}

.tabcontent.active {
    display: block;
}


.user-search-input {
    margin-bottom: 10px;
    width: 100%;
    max-width: 300px;
    padding: 5px;
}


/* ANNUAIRE UTILISATEURS */

.casquette-item {
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.casquette-item h3 {
    margin-top: 0;
}

.remove-casquette {
    background-color: #dc3232;
    color: #fff;
    margin-bottom: 10px;
}

/* #add-casquette {
    margin-bottom: 20px;
} */

.wp-list-table .button-danger {
    background-color: #dc3232;
    color: #fff;
    border-color: #a00;
}

.wp-list-table .button-danger:hover {
    background-color: #a00;
    border-color: #700;
}