/* +--------------------------------------------------------------------------+
// ? 2002-2013 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: demand.css,v 1.1.4.2 2025/10/17 14:02:54 dgoron Exp $ */

/* ---------------------------------------------------------------------------*/
/* ---------------------------------------------------------------------------*/
/*                            Notes Dialogue                                  */
/* ---------------------------------------------------------------------------*/
/* ---------------------------------------------------------------------------*/

#dialog_wrapper {
    width: 100%;
    height: 350px;
    overflow: auto;
    padding-right: 15px;
    font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
    font-size: 14px;
}

.bulle {
    display: inline-block;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    position: relative;
    margin-left: 20px;
    margin-right: 20px;
    clear: both;
    max-width: 75%;
  }

.bulle::before {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-style: solid;
    border-width: 10px 10px 10px 0;
    border-color: transparent #ffffff transparent transparent;
}

.bulle_gest {
    background-color: #34C759; /* vert */
    color: #ffffff;
    align-self: flex-start;
}

.bulle_gest::before {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: -10px;
    border-style: solid;
    border-width: 10px 10px 10px 0;
    border-color: transparent #34C759 transparent transparent;
}

.bulle_opac {
    background-color: #56B3FA; /* bleu */
    color: #ffffff;
    align-self: flex-end;
}

.bulle_opac::before {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: -20px;
    border-style: solid;
    border-width: 10px 10px 10px 10px;
    border-color: transparent transparent transparent #56B3FA;
}

.bulle-texte {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 5px;
}

.bulle-heure {
    font-size: 12px;
    color: #444;
    margin-top: 5px;
}

.container_bulle {
    display: flex;
    flex-direction: column;
}

.entete_note {

}

#dialog_wrapper input[type="image"] {
    height: 16px;
    width: 16px;
    border: none;
}

.btn_note {
    float: right;
    top: 0px;
    font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
    font-size: 8px;
}

.btn_note input[type="image"] {
    box-shadow: 0px 0px 0px #734D2B inset;
}

.note_opac .btn_note {
    right: 16px;
}

.note_gest .btn_note {
    left: 16px;
}

.write_note {
    padding: 5px;
    display : flex;
    justify-content: space-between;
}

.note_add {
    display: grid;
    margin: 10px;
}

.add_action_list {
    display: flex;
    align-items: center;
    margin-top: 25px;
    margin-bottom: 25px;
}

form[name="modif_notes"], .modif_notes {
    height: 40%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 20px;
    background-color: #ffffff;
    margin-top: 20px;
    margin-bottom: 20px;
}

form[name="modif_notes"] textarea, .modif_notes textarea {
    float: left;
    margin-top: 10px;
    padding: 0;
    top: 0px;
    width: 75%;
}

form[name="modif_notes"] input, .modif_notes input {
    margin-top: 10px;
}

/* ---------------------------------------------------------------------------*/
/* ---------------------------------------------------------------------------*/
/*                               Refonte OPAC demandes                        */
/* ---------------------------------------------------------------------------*/
/* ---------------------------------------------------------------------------*/
.demande-details-link {
    float: right;
}
.demandes-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 1200px;
    margin: 0 auto;
}

.demande-item {
    border: 1px solid #ddd;
    margin-bottom: 1rem;
    border-radius: 4px;
    overflow: hidden;
}

.demande-header {
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.demande-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

.demande-link:hover,
.demande-link:focus {
    background-color: #e9e9e9;
    text-decoration: none;
}

.demande-ref {
    flex: 0 0 150px;
    color: #0066cc;
}

.demande-date {
    flex: 1;
    text-align: center;
}

.demande-status {
    flex: 0 0 250px;
    text-align: right;
    color: #e67e22;
    font-weight: normal;
}

.demande-arrow {
    margin-left: 1rem;
    transition: transform 0.3s ease;
    display: inline-block; /* S'assure que la rotation fonctionne */
}

.demande-link[aria-expanded="true"] .demande-arrow {
    transform: rotate(180deg);
}

.demande-content {
    padding: 1.5rem;
    background-color: #fff;
}

.demande-details {
    margin-bottom: 1.5rem;
}

.demande-details p {
    margin: 0.5rem 0;
}

.btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    background-color: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
    margin-right: 0.5rem;
}

.btn-modifier {
    background-color: #0066cc;
    color: white;
    border-color: #0055aa;
}

.btn-annuler {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Améliorations d'accessibilité */
.demande-link:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .demande-arrow {
        transition: none;
    }
}

/* Style pour l'état actif/ouvert */
[aria-expanded="true"] + .demande-content {
    display: block;
}

/* Styles pour la section des actions */
.actions-header-demandes {
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.actions-title-demandes {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.actions-list-demandes {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.action-item-demandes {
    display: flex;
    flex-wrap: wrap;
    padding: 0.75rem 0;
    border-bottom: 1px dashed #e0e0e0;
    align-items: center;
}

.action-item-demandes:last-child {
    border-bottom: none;
}

.action-date-demandes {
    flex: 0 0 120px;
    color: #666;
    font-size: 0.85rem;
    padding: 0.25rem 0;
}

.action-type-demandes {
    flex: 0 0 150px;
    display: flex;
    align-items: center;
    padding: 0.25rem 0;
    font-weight: 500;
}

.action-icon-demandes {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

.action-details-demandes {
    flex: 1;
    min-width: 0;
    padding: 0.25rem 0;
}

.action-description-demandes {
    margin: 0 0 0.25rem;
    line-height: 1.4;
}

.demande-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
    .action-item-demandes {
        flex-direction: column;
    }

    .action-date-demandes,
    .action-type-demandes {
        margin-bottom: 0.5rem;
    }

    .demande-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn {
        width: 100%;
    }
}
.action-type-demandes-awaiting {
    color: #FDF6E1;
}

.action-type-demandes-opened {
    color : #E3F9E5 ;
}

.action-type-demandes-closed {
    color : #FDE2E1;
}
.card {
    margin : 5px;
}
.status-card {
    margin-bottom: 1rem;
    border: 2px solid;
    border-radius: 4px;
    overflow: hidden;
}

.status-card .card-body {
    padding: 0.5rem;
}

.status-card .card-title {
    margin-bottom: 0.25rem;
}

.status-card .card-text {
}

.status-awaiting {
    background-color: #FDF6E1;
    color : #BF6D00;
}

.status-opened {
    background-color: #E3F9E5 ;
    color: #2E654B;
}

.status-closed {
    background-color: #FDE2E1;
    color: #B23A48;
}
.status-todo,
.status-classified {
    background-color: #FDF6E1;
    color : #BF6D00;
}
.status-validate,
.status-finished {
    background-color: #E3F9E5;
    color: #2E654B;
}
.status-refused,
.status-givenup {
    background-color: #FDE2E1;
    color: #B23A48;
}

.actions-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.action-item {
    margin-bottom: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.action-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f5f5f5;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.action-header:hover,
.action-header:focus {
    background-color: #e9e9e9;
    outline: 2px solid #0066cc;
    outline-offset: -2px;
}

.action-header[aria-expanded="true"] .action-arrow {
    transform: rotate(180deg);
}

.action-arrow {
    transition: transform 0.2s ease;
    font-size: 0.8em;
    margin-left: 1rem;
}

.action-title {
    flex: 1;
    font-weight: bold;
}

.action-date {
    margin: 0 1rem;
    color: #666;
}

.action-details {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.action-details[aria-hidden="false"] {
    padding: 1rem;
    max-height: 100%;
}

.action-content-notes {
    padding: 0 1rem;
    max-height: 500px;
    overflow-y: auto;
}

.edit-action {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: #0066cc;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.edit-action:hover,
.edit-action:focus {
    background-color: #004d99;
    outline: 2px solid #003366;
}

@media (max-width: 600px) {
    .action-header {
        flex-wrap: wrap;
    }

    .action-date {
        width: 100%;
        margin: 0.5rem 0 0 0;
        order: 2;
    }
}
.action-type-awaiting {
    color: #FDF6E1;
}

.action-type-opened {
    color : #E3F9E5 ;
}

.action-type-closed {
    color : #FDE2E1;
}

.demande-title {
    margin-block: 0 !important;
}