/* STYLE POUR LE SITE APE */

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

.header-flex-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tag-filters input {
    display: none;
}

.tag-filters input:checked + label {
    background-color: #1e6c93;
    color: white;
}

.tag-filters label {
    cursor: pointer;
    padding: 10px;
    margin-right: 5px;
    min-height: 30px;
}

.tag-filters {
    margin-right: 40px;
}

.tag {
    background-color: #f0f0f0;
    padding: 5px 10px;
    margin-right: 10px;
    border-radius: 5px;
    max-inline-size: 100%;
    cursor: default;
}

.tag:hover {
    background-color: #e0e0e0;
}

#label-search-bar {
    margin-left: 20px;
    margin-right: 5px;
}

#search-bar {
    width: 20%;
    padding: 7px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #f9f9f9;
    transition: width 0.3s ease-in-out;
    max-height: 50px;
}

#search-bar:focus {
    width: 30%;
}

#no-result, #no-command {
    justify-content: center;
    align-items: center;
    height: 100%;
    display: none;
}


/* Bloc des informations détaillées d'une commande */

.sous-cat {
    padding-left: 25px;
}

#mark-as-collected, #mark-as-not-collected, #declare-modification, #delete-order {
    cursor: pointer;
}

#declare-modification, #delete-order {
    margin-top: 15px;
}

#mark-as-collected, #mark-as-not-collected {
    margin-top: 20px;
}

#delete-order {
    color: rgba(255, 0, 38, 0.86);
}

#declare-modification {
    color: rgba(214, 126, 26, 0.86);
}

#send-reminder-email {
    margin-top: 20px;
}

blockquote {
    margin: 0;
}

blockquote p {
    padding: 5px;
    background: #FAFAD8F4;
    border-radius: 5px;
}

blockquote p::before {
    content: '\201C';
}

blockquote p::after {
    content: '\201D';
}

#dateRecup {
    font-style: italic;
    font-size: 0.9em;
    margin-top: 8px;
    margin-bottom: 0;
}


/* Fenêtre de rédaction de mail */
.modal {
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    margin: 20px auto auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: slideInFromTop 0.6s ease-in-out;
    text-align: unset !important;
}

.modal input[type="text"]:not(#alert-autre-text, #alert-paiement-text), .modal textarea, .modal input[type="email"] {
    width: 100% !important;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 16px;
    resize: none;
}

.modal textarea:focus {
    cursor: text;
}

.modal textarea {
    margin-top: 12px;
    margin-left: 0;
}

#history-modal .modal-content {
    max-width: 800px;
}

#edit-order-form {
    display: flex;
    flex-direction: column;
}

#edit-order-content {
    max-width: 450px;
}

#edit-order-form input[type="text"], #edit-order-form input[type="email"] {
    margin: 0;
}

#edit-order-form input[type="text"]:not(#alert-autre-text, #alert-paiement-text), #edit-order-form input[type="email"], #edit-order-form textarea {
    min-width: 100%;
}

#edit-order-form label:not(.checkbox-label) {
    margin-bottom: 5px;
}

input[type="radio"] {
    width: auto !important;
}


#alert-autre-text, #alert-paiement-text {
    /* S'affiche à côté du label comme une ligne à remplir (pas comme un input) */
    display: inline;
    margin-left: 5px;
    max-width: 50%;
    border-bottom: #3a3a3a 1px solid;
    padding: 2px;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    background-color: transparent;
    min-width: 50%;
    border-radius: 0;
    box-shadow: none;
}

#alert-autre-text:focus, #alert-paiement-text:focus {
    cursor: text;
}

#alert-paiement-text {
    max-width: 35%;
    min-width: 35%;
}


#recipient-name, #email-subject {
    min-width: 80%;
    margin-top: 6px;
}

.details-block input[type="date"],
.details-block input[type="time"] {
    margin: 0 5px;
    box-sizing: border-box;
}

.details-block input[type="date"] {
    max-width: 35%;
    min-width: 30%;
    width: 30%;
}

.details-block input[type="time"], .details-block input[type="number"] {
    max-width: 20%;
    min-width: 20%;
    width: 20%;
}

table {
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
}

th, td {
    word-wrap: break-word;
    padding: 8px;
    text-align: left;
}

.header-flex-container {
    width: 100%;
    box-sizing: border-box;
}

#liste {
    width: 100%;
    overflow-x: auto;
}

#filtres {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}


#settings-dates-distribution input[type="date"],
#settings-dates-distribution input[type="time"] {
    min-width: 80px;
    min-height: 40px;
    padding: 5px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

#settings-dates-distribution input[type="date"] {
    min-width: 130px;
    margin-top: 9px;
}

details {
    margin-top: 15px;
}


/* Sur ordinateur */
@media (min-width: 768px) {
    #boutonsAccueil a {
        margin-right: 30px;
    }
}


/* Sur téléphone */
@media (max-width: 768px) {
    .header-flex-container {
        flex-direction: column;
    }

    #boutonsAccueil {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin-left: 0;
    }

    #filtres {
        flex-direction: column;
        align-items: center;
    }

    .tag-filters {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        margin: 0;
    }

    #search-bar {
        width: 100%;
        text-align: center;
        margin-left: 0;
    }

    #label-search-bar {
        display: none;
    }
}

tr td img {
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    margin: 0;
}


/* Site d'inscription des volontaires */

#calendar {
    display: grid;
    gap: 10px;
    grid-auto-rows: minmax(50px, auto);
}

.header {
    text-align: center;
    font-weight: bold;
    padding: 10px;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ccc;
}

.slot {
    background-color: white;
    margin: 5px 0;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center;
    position: relative;
    color: black;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.slot.selected {
    border-color: black;
}

.slot.full {
    cursor: not-allowed;
    opacity: 0.5;
}

.bloc-infos {
    background-color: #d7f0ff;
    border: 1px solid #67c8ff;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}


/* Ecran de chargement */

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    border: 16px solid #f3f3f3;
    border-top: 16px solid #3498db;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* Flex container for form elements */
.modal-content form {
    display: flex;
    flex-direction: column;
}

/* Flex container for each form group */
.modal-content form .form-group {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

/* Labels */
.modal-content form .form-group label {
    flex: 0 0 150px; /* Fixed width for labels */
    margin-right: 10px;
}

/* Inputs */
.modal-content form .form-group input,
.modal-content form .form-group select,
.modal-content form .form-group textarea {
    flex: 1; /* Take up the remaining space */
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    resize: none;
}


.groupe {
    display: inline-block;
    padding: 2px 7px;
    margin: 1px;
    border: 1px solid rgba(58, 135, 251, 0.99);
    border-radius: 12px;
    color: rgba(58, 135, 251, 0.99);
    background-color: #f6fafa;
    font-size: 14px;
}

.add-group, .delete-group {
    cursor: pointer;
}

/* Bouton actions */
#actions {
    display: flex;
    align-items: center;
}

#actions-label {
    margin-left: 20px;
    position: relative;
    cursor: pointer;
    min-height: 30px;
}

#actions-label:hover #actions-dropdown {
    display: block;
}

#actions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 100;
}

#actions-dropdown div {
    padding: 10px;
    white-space: nowrap;
}

#actions-dropdown > div:hover {
    background-color: #f0f0f0;
}

#group-dropdown {
    position: absolute;
    top: 0;
    left: 100%;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 100;
}

#assign-group:hover #group-dropdown {
    display: block;
}

#group-dropdown div {
    padding: 10px;
    white-space: nowrap;
}

#group-dropdown div:hover {
    background-color: #f0f0f0;
}

.disabled {
    cursor: not-allowed !important;
    opacity: 0.6;
}


#group-dropdown-details {
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 100;
}

#group-dropdown-details div {
    padding: 10px;
    white-space: nowrap;
}

#group-dropdown-details div:hover {
    background-color: #f0f0f0;
}

.hidden {
    display: none;
}

#intro-nouvelle-campagne {
    text-align: justify;
    margin: 15px 0 15px 15px;
    list-style-type: disc;
}

#intro-nouvelle-campagne li {
    margin-top: 7px;
}

#nb-volontaires-creneau table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

#nb-volontaires-creneau table tr td {
    vertical-align: middle;
}

#nb-volontaires-creneau table tr td input {
    margin: 0;
}

#nb-volontaires-creneau table tr td a {
    margin: 4px;
}

#header-droite {
    display: flex;
    align-items: center;
}

.centre-notifications {
    position: relative;
    border: 1px solid #ccc;
}

.email-container {
    padding: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ccc;
    gap: 13px;
}

.email-partie-droite {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.email-partie-centrale {
    flex: 1;
}

#icone-notif-container {
    position: absolute;
    top: 130px;
    right: 20px;
    z-index: 2;
}

#notif {
    cursor: pointer;
}

#notif-icon-count {
    background-color: #ff0000;
    color: white;
    border-radius: 50%;
    padding: 2px;
    font-size: 6px;
    display: inline-block;
    text-align: center;
    margin-left: 3px;
    width: 12px;
    height: 12px;
}


.form-group {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.form-group input {
    width: 100% !important;
}

.form-group label {
    flex: 0 0 150px;
    margin-right: 10px;
}

#gestionnaires-list table tr td {
    vertical-align: middle;
    text-align: center;
}

.icone-admin {
    color: #e6b800;
    margin-left: 8px;
    cursor: help;
    font-size: 0.9em;
}