/* ======================================= */
/* TITRES DES SECTIONS */
/* ======================================= */

.colonne > h2
.section-toggle-header > h2 {
    margin: 0;
    margin-bottom: 20px;
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1.2;
    color: #334155;
}

.onakasaider-section + .onakasaider-section {
    margin-top: 80px;
}

/* ========================= */
/* WRAPPER */
/* ========================= */

.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px;
    background: #f8fafc;
}

/* ========================= */
/* TITRE */
/* ========================= */

h1 {
    margin: 0 0 28px;
    font-size: 2.2rem;
    font-weight: 300;
    color: #334155;
    line-height: 1.2;
}

/* ========================= */
/* PAGE */
/* ========================= */

.demande-page {
    width: 100%;
}

/* ========================= */
/* FILTRES */
/* ========================= */

.filtre-demandes {
    margin-bottom: 35px;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #edf2f7;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}

.filtre-demandes form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.filtre-ligne {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filtre-bloc {
    display: flex;
    flex-direction: column;
    min-width: 240px;
}

.filtre-bloc label {
    font-size: .75rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #0f766e;
}

.filtre-bloc select {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #dbe2ea;
    background: #fff;
    font-size: .92rem;
    color: #334155;
}

/* ========================= */
/* GRID */
/* ========================= */

.demande-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    align-items: flex-start;
}

.demande-item {
    width: 480px;
    flex: 0 0 480px;
}

/* ========================= */
/* CARD */
/* ========================= */

.demande-item {
    display: flex;
    flex-direction: column;
    background: #f8f8f8;
    border-radius: 18px;
    overflow: hidden;

    border: 1px solid #d1d9e6; /* plus visible */
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);

    transition: all .25s ease;
}

.demande-item:hover {
    transform: translateY(-4px);
    border-color: #cbd5e1;
    box-shadow:
        0 18px 34px rgba(15, 23, 42, 0.11),
        0 6px 12px rgba(15, 23, 42, 0.05);
}

/* ========================= */
/* IMAGE */
/* ========================= */

.demande-item__image {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #f1f5f9;
}

.demande-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========================= */
/* BADGE SUR IMAGE */
/* ========================= */

.badge-category {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    background: #6d5bd0;
    color: white;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
}

/* ========================= */
/* BODY */
/* ========================= */

.demande-item__body {
    padding: 18px;
}

/* ========================= */
/* HEADER */
/* ========================= */

.demande-item__header {
    padding: 0;
    margin-bottom: 12px;
}

.demande-item__header h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: #1e293b;
}

/* neutralisation anciens statuts */
.demande-item.status-action-benevole .demande-item__header,
.demande-item.status-action-terminee .demande-item__header,
.demande-item.status-action-annulee .demande-item__header {
    background: transparent;
}

/* ========================= */
/* META PILLS */
/* ========================= */

.demande-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.meta-pill {
    background: #f1f5f9;
    color: #475569;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 600;
}

/* ========================= */
/* DESCRIPTION */
/* ========================= */

.demande-description {
    margin: 0;
    font-size: .92rem;
    line-height: 1.55;
    color: #64748b;
    min-height: 58px;
}

/* ========================= */
/* SEPARATEUR */
/* ========================= */

.demande-item__body hr {
    border: none;
    border-top: 1px solid #edf2f7;
    margin: 16px 0;
}

/* ========================= */
/* DATES */
/* ========================= */

.demande-dates {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    font-size: .88rem;
    color: #475569;
}

.demande-dates p {
    margin: 0;
}

/* ========================= */
/* BADGES STATUT */
/* ========================= */

.badge-statut {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    margin: 0;
    line-height: 1;
    letter-spacing: 0.5px;
    color: #fff;
}

.statut-disponible {
    background: #dcfce7;
    color: #15803d;
}

.statut-prise {
    background: #ffedd5;
    color: #ea580c;
}

.statut-assigné {
    background: #ffe4e6;
    color: #e11d48;
}

/* ========================= */
/* BOUTONS */
/* ========================= */

.btn-benevole {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    padding: 0 18px;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    font-size: .92rem;
    line-height: 1;
    box-sizing: border-box;
    transition: all .25s ease;
}

.btn-benevole--take {
    background: #fff;
    color: #02797E;
    border: 2px solid #02797E;
}

.btn-benevole--take:hover {
    background: #0f9a94;
    color: #fff;
}

.btn-benevole--success {
    background: #fff;
    color: #27ae60;
    border: 2px solid #27ae60;
}

.btn-benevole--success:hover {
    background: #16a34a;
    color: #fff;
}

.btn-benevole--danger {
    background: #fff;
    color: #904C8F;
    border: 2px solid #904C8F;
}

.btn-benevole--danger:hover {
    background: #7c3aed;
    color: #fff;
}

/* ========================= */
/* FORMULAIRES */
/* ========================= */

.inline-form-container {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.inline-form {
    flex: 1;
}

.inline-form--block {
    width: 100%;
}

/* ========================= */
/* MESSAGE */
/* ========================= */

.message-non-benevole {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 14px;
    border-radius: 12px;
    font-size: .9rem;
    color: #475569;
}

/* ========================= */
/* STATUS */
/* ========================= */

.demande-item.status-publish,
.demande-item.status-action-benevole,
.demande-item.status-action-terminee,
.demande-item.status-action-annulee {
    border-left: none;
}

/* ========================= */
/* RESPONSIVE */
/* ========================= */

@media (max-width: 768px) {
    .page-wrapper {
        padding: 20px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .demande-grid {
        grid-template-columns: 1fr;
    }

    .filtre-ligne {
        flex-direction: column;
        align-items: stretch;
    }

    .filtre-bloc {
        width: 100%;
        min-width: unset;
    }

    .demande-dates {
        flex-direction: column;
    }

    .inline-form-container {
        flex-direction: column;
    }
}


.demandes-history {
    margin-top: 20px;
}

.demandes-history summary {
    cursor: pointer;
    padding: 14px 18px;
    border-radius: 12px;
    background: #f5f7fa;
    font-weight: 600;
    list-style: none;
    transition: background 0.2s ease;
}

.demandes-history summary:hover {
    background: #edf1f5;
}

.demandes-history summary::-webkit-details-marker {
    display: none;
}

.demandes-history[open] summary {
    margin-bottom: 20px;
}

.demandes-history__content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Grid des cartes */
.demandes-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, 480px);
    gap: 24px;
    justify-content: start;
    align-items: start;
}

/* Empêche les cartes de prendre toute la largeur */
.demandes-grid-cards .demande-item {
    width: 480px;
    max-width: 480px;
    margin: 0;
}

/* ======================================= */
/* LAYOUT GLOBAL MES DEMANDES / MISSIONS */
/* ======================================= */

.onakasaider-section {
    width: 100%;
    margin-top: 40px;
}

.section-toggle-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}


.toggle-history-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 18px;
    border: none;
    border-radius: 999px;
    background: #02797E;
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s ease;
}

.toggle-history-btn:hover {
    opacity: .92;
    transform: translateY(-1px);
}

.history-content {
    display: none;
    width: 100%;
}

.history-content.is-open {
    display: block;
}

/* uniformise les actions des cartes */
.card__actions {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card__actions form {
    margin: 0;
}

.card__actions .btn-benevole {
    margin: 0;
}


.toggle-history-btn,
.toggle-history-btn:visited,
.toggle-history-btn:hover,
.toggle-history-btn:focus,
.toggle-history-btn:active {
    background: #02797E;
    color: #fff !important;
    text-decoration: none;
}

.toggle-history-btn.is-open {
    background: #02797E;
    color: #fff !important;
}

.bloc-statut-mission {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 15px 0 20px;
}

.btn-voir-mission {
    font-size: 0.9rem;
    font-weight: 600;
    color: #02797E;
    text-decoration: none;
    transition: .2s ease;
}

.btn-voir-mission:hover {
    color: #015d61;
    text-decoration: underline;
}

.mission-contact {
    background: #f8fafc;
    padding: 14px;
    border-radius: 10px;
    margin: 14px 0;
    border: 1px solid #e8edf2;
}

.mission-contact p {
    margin: 0 0 8px;
    line-height: 1.4;
}

.note-privee {
    margin-top: 15px;
    padding: 14px;
    background: #fff8e8;
    border-left: 4px solid #f39c12;
    border-radius: 8px;
    font-size: 0.92rem;
    line-height: 1.5;
}

.card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.btn-voir-mission {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    border: 2px solid #02797E;
    color: #02797E;
    background: #fff;
    transition: all 0.25s ease;
    margin-left: 0;
}

.btn-voir-mission:hover {
    background: #02797E;
    color: #fff;
    transform: translateY(-2px);
}

.action-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.demande-item__image--preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 14px;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,.08);
}

.demande-item__image--preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform .25s ease;
}

.demande-item__image--preview img:hover {
    transform: scale(1.08);
}

.image-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.image-lightbox.is-open {
    display: flex;
}

.image-lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
}

.image-lightbox-close {
    position: absolute;
    top: 25px;
    right: 35px;
    font-size: 42px;
    color: white;
    cursor: pointer;
}


/* ========================= */
/* IMAGE PREUVE BÉNÉFICIAIRE */
/* ========================= */

.demande-preuve-image {
    margin: 14px 0 18px;
}

.demande-preuve-image a {
    display: inline-block;
}

.demande-preuve-image img {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
    transition: transform .25s ease, box-shadow .25s ease;
    cursor: pointer;
}

.demande-preuve-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
}






@media (max-width: 768px) {
    .demandes-grid-cards {
        grid-template-columns: 1fr;
    }

    .demandes-grid-cards .demande-item {
        width: 100%;
        max-width: 100%;
    }
}
