/* CARTES */
.card {
    background: #fff;
    border: 1px solid #E6DED2;
    border-radius: 10px;
    padding: 24px;
    margin: 28px 0;
}

.card h2 {
    color: #6B4E2E;
    font-size: 24px;
}

.card p {
    text-align: justify;
}

/* BOUTONS */
.button,
.button-secondary {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 15px;
}

.button {
    background: #6B4E2E;
    color: #fff;
}

.button-secondary {
    background: #F2E8D9;
    color: #6B4E2E;
}

.actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .actions-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* SCROLL */
.scroll-tools {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scroll-tools[hidden],
.scroll-tool-button[hidden] {
    display: none !important;
}

.scroll-tool-button {
    width: 42px;
    height: 42px;
    border: 1px solid #d8cbb8;
    border-radius: 50%;
    background: #ffffff;
    color: #6B4E2E;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.14);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-tool-button:hover {
    background: #f7f3ed;
}

@media (max-width: 640px) {
    .scroll-tools {
        right: 12px;
        bottom: 12px;
    }

    .scroll-tool-button {
        width: 42px;
        height: 42px;
        font-size: 24px;
    }
}

/* FLASH */
.flash {
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.flash-success {
    background: #edf7ed;
    border: 1px solid #b7ddb9;
}

.flash-error {
    background: #fff1f1;
    border: 1px solid #e4b9b9;
}

/* HERO */
.hero {
    text-align: center;
}

.hero-intro {
    max-width: 700px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.6;
    text-align: justify;
}

/* UTILS */
.intro-actions {
    text-align: center;
    margin-top: 20px;
}

.quote {
    text-align: center;
    color: #6B4E2E;
}


.steps .step {
    margin-bottom: 18px;
    text-align: justify;
    line-height: 1.6;
}

.steps .step strong {
    display: block;
    color: #6B4E2E;
    margin-bottom: 5px;
}

/* FILTRES */
.filters {
    margin-bottom: 24px;
    padding: 16px 18px;
    border: 1px solid #E6DED2;
    border-radius: 10px;
    background: #faf8f5;
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}

.filter {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 180px;
}

.filter label {
    font-size: 14px;
    margin-bottom: 6px;
    color: #6B4E2E;
    font-weight: bold;
}

.filter select {
    width: 100%;
}

.filters-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.filters-summary {
    color: #555555;
    font-size: 15px;
}

.filter-submit {
    display: flex;
    align-items: center;
    gap: 10px;
}

.button-reset {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    background: #ffffff;
    color: #6B4E2E;
    border: 1px solid #d8c4a8;
}

.button-reset:hover {
    background: #faf8f5;
}

@media (max-width: 640px) {
    .filters-row {
        flex-direction: column;
        gap: 12px;
    }

    .filter {
        min-width: 100%;
    }

    .filters-bottom {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-summary {
        text-align: center;
    }

    .filter-submit {
        flex-direction: column;
        gap: 12px;
    }

    .filter-submit .button-secondary,
    .filter-submit .button-reset {
        width: 100%;
        text-align: center;
    }
}

/* GRILLE DES ANNONCES */
.annonces-grid {
    display: flex;
    flex-wrap: wrap;
    margin-left: -12px;
    margin-right: -12px;
}

.annonces-grid > .annonce-card {
    width: calc(33.333% - 24px);
    margin-left: 12px;
    margin-right: 12px;
    margin-bottom: 24px;
}

/* CARTE ANNONCE */
.annonce-card {
    border: 1px solid #E6DED2;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.annonce-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.card-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3efe8;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    text-align: center;
}

.card-image-wrap picture {
    display: block;
    width: 100%;
    height: 100%;
}

.card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
}

/*
 * Pas de zoom au survol ici :
 * avec object-fit: contain, un scale() peut à nouveau rogner légèrement l'image.
 */
.annonce-card:hover .card-image-wrap img {
    transform: none;
}

.card-image-placeholder {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8d7a65;
    font-size: 18px;
    background: #f3efe8;
    padding: 20px;
    text-align: center;
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.badges {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
}

.badges .badge {
    margin-right: 7px;
    margin-bottom: 7px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    line-height: 1.2;
}

.badge-new {
    background: #fff3e8;
    color: #a5531b;
    border: 1px solid #f0c7a8;
}

.badge-progress {
    background: #fff1f1;
    color: #8a2f2f;
    border: 1px solid #e4b9b9;
}

.badge-event {
    background: #f4f0ff;
    color: #5b4790;
    border: 1px solid #cfc2f2;
}

.badge-category {
    background: #f7f3ee;
    color: #6B4E2E;
    border: 1px solid #E6DED2;
    font-weight: normal;
}

.badge-search {
    background: #eef4ff;
    color: #355c99;
    border: 1px solid #c9d8f2;
}

.badge-offer {
    background: #edf7ed;
    color: #245b2a;
    border: 1px solid #b7ddb9;
    font-weight: bold;
}

.card-title {
    font-size: 23px;
    margin: 0 0 12px;
    line-height: 1.3;
}

.card-title a {
    color: #333333;
    text-decoration: none;
}

.card-title a:hover {
    color: #6B4E2E;
}

.meta {
    font-size: 14px;
    color: #666666;
    line-height: 1.75;
    margin-bottom: 16px;
}

.description {
    line-height: 1.7;
    margin-bottom: 20px;
    color: #444444;
    flex-grow: 1;
    text-align: justify;
}

.contre-valeur {
    font-weight: bold;
    font-size: 18px;
    color: #6B4E2E;
    margin-bottom: 18px;
    line-height: 1.5;
}

.card-actions {
    margin-top: auto;
    text-align: center;
    padding-top: 6px;
}

/* ÉTAT VIDE */
.empty-state {
    border: 1px solid #E6DED2;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    color: #666666;
    line-height: 1.7;
}

/* PAGINATION */
.pagination {
    text-align: center;
    margin-top: 32px;
}

.pagination a,
.pagination span {
    display: inline-block;
    min-width: 38px;
    padding: 10px 12px;
    margin: 0 4px 8px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid #E6DED2;
    color: #6B4E2E;
    background: #ffffff;
}

.pagination .current {
    background: #6B4E2E;
    color: #ffffff;
    border-color: #6B4E2E;
}

@media (max-width: 980px) {
    .annonces-grid > .annonce-card {
        width: calc(50% - 24px);
    }
}

@media (max-width: 640px) {

    .filters-row > * {
        margin-left: 0;
        margin-right: 0;
    }

    .filter,
    .filter-submit {
        min-width: 100%;
    }

    .annonces-grid {
        margin-left: 0;
        margin-right: 0;
    }

    .annonces-grid > .annonce-card {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

/* PAGE DÉTAIL ANNONCE */
.meta-box {
    border: 1px solid #E6DED2;
    border-radius: 10px;
    background: #faf8f5;
    padding: 18px 20px;
    margin-bottom: 32px;
    color: #555555;
}

.meta-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.meta-row {
    display: flex;
    align-items: flex-start;
}

.meta-label {
    width: 150px;
    color: #6B4E2E;
    font-weight: bold;
    flex: 0 0 150px;
}

.meta-value {
    color: #333333;
    flex: 1 1 auto;
}

.gallery {
    margin-bottom: 32px;
}

.main-photo {
    border: 1px solid #E6DED2;
    border-radius: 10px;
    overflow: hidden;
    background: #f3efe8;
    text-align: center;
    margin-bottom: 14px;
}

.main-photo img {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    display: block;
    background: #f3efe8;
}

.main-photo-placeholder {
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8d7a65;
    font-size: 18px;
    padding: 20px;
}

.main-photo-caption {
    margin-top: 10px;
    padding: 0 4px;
    font-size: 14px;
    color: #666666;
    text-align: center;
    line-height: 1.6;
    min-height: 24px;
}

.main-photo-caption.is-empty {
    display: none;
}

.thumbs {
    display: flex;
    flex-wrap: wrap;
    margin-left: -5px;
    margin-right: -5px;
}

.thumbs .thumb {
    width: 96px;
    height: 96px;
    margin: 0 5px 10px;
    border: 1px solid #E6DED2;
    border-radius: 8px;
    overflow: hidden;
    background: #f3efe8;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    padding: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.thumbs .thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.thumbs .thumb:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(107, 78, 46, 0.18);
}

.thumbs .thumb.is-active {
    border: 2px solid #6B4E2E;
    box-shadow: 0 4px 10px rgba(107, 78, 46, 0.15);
}

.thumbs .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.content-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.box {
    border: 1px solid #E6DED2;
    border-radius: 10px;
    background: #ffffff;
    padding: 22px;
}

.box h2 {
    margin-top: 0;
    color: #6B4E2E;
    font-size: 24px;
}

.contre-valeur {
    font-size: 22px;
    font-weight: bold;
    color: #6B4E2E;
    line-height: 1.5;
    text-align: center;
}

.description-short {
    font-weight: bold;
    margin-bottom: 16px;
    color: #444444;
    line-height: 1.7;
    text-align: justify;
}

.description-long {
    line-height: 1.8;
    color: #333333;
    text-align: justify;
}

.description-long p {
    margin-top: 0;
    margin-bottom: 14px;
}

.description-long ul,
.description-long ol {
    padding-left: 20px;
    margin-top: 0;
    margin-bottom: 14px;
}

.description-long a {
    color: #6B4E2E;
}

.author-box p {
    margin-top: 0;
    margin-bottom: 14px;
    line-height: 1.7;
    text-align: justify;
}

.actions {
    text-align: center;
    margin-top: 18px;
}

.actions .button,
.actions .button-secondary {
    display: inline-block;
    width: auto;
    min-width: 220px;
    margin: 0 0 12px 12px;
    box-sizing: border-box;
    text-align: center;
}

.actions .button:first-child,
.actions .button-secondary:first-child {
    margin-left: 0;
}

@media (max-width: 640px) {
    .meta-row {
        display: block;
    }

    .meta-label {
        display: block;
        width: auto;
        margin-bottom: 4px;
    }

    .thumbs .thumb {
        width: 76px;
        height: 76px;
    }

    .main-photo-placeholder {
        min-height: 220px;
    }
}

/* FORMULAIRES / AUTH */
.form-card {
    max-width: 480px;
    margin: 30px auto 0;
    padding: 24px;
    border: 1px solid #E6DED2;
    border-radius: 8px;
    background: #fffdf9;
}

.form-intro {
    margin: 0 0 20px;
    color: #555555;
    text-align: justify;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.form-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #cfc6b8;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 18px;
    background: #ffffff;
}

.form-help {
    color: #666666;
    font-size: 14px;
    margin-top: -8px;
    margin-bottom: 18px;
}

.form-actions {
    text-align: center;
    margin-top: 8px;
}

.form-links {
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
}

.form-links a {
    color: #6B4E2E;
    text-decoration: none;
    font-size: 14px;
}

.form-links a:hover {
    text-decoration: underline;
}

.links {
    margin-top: 18px;
    font-size: 14px;
    text-align: center;
}

.links a {
    color: #6B4E2E;
    text-decoration: none;
}

.links a:hover {
    text-decoration: underline;
}

.footer-note {
    margin-top: 18px;
    color: #666666;
    font-size: 14px;
    text-align: center;
}

/* MESSAGES */
.message {
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 15px;
}

.message.error {
    background: #fdeaea;
    color: #8a1f1f;
    border: 1px solid #f1c0c0;
}

.message.success {
    background: #edf8ee;
    color: #216a2b;
    border: 1px solid #c7e5cc;
}

.message.info {
    background: #eef4fb;
    color: #234d77;
    border: 1px solid #c9d9ec;
}

/* PAGE COMPTE */
.page-title {
    font-size: 36px;
    color: #6B4E2E;
    margin: 0 0 10px;
}

.intro {
    margin: 0 0 26px;
    color: #555555;
    line-height: 1.7;
    text-align: justify;
    max-width: 820px;
}


/* MESSAGE D’ERREUR LISTE */
.message.error ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

/* BLOCS DE SECTION */
.section {
    border: 1px solid #E6DED2;
    border-radius: 12px;
    background: #ffffff;
    padding: 26px 28px;
    margin-bottom: 26px;
    box-sizing: border-box;
}

.section-title {
    margin: 0 0 16px;
    color: #6B4E2E;
    font-size: 24px;
}

/* GRILLE FORMULAIRE */
.grid {
    display: grid;
    grid-template-columns: 120px 1fr 1fr;
    gap: 18px;
}

.full {
    grid-column: 1 / -1;
}

.form-row {
    margin-bottom: 18px;
}

/* CHAMPS DE FORMULAIRE GÉNÉRIQUES */
label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="datetime-local"],
select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #cfc6ba;
    border-radius: 6px;
    font-size: 15px;
    background: #ffffff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="datetime-local"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #6B4E2E;
    box-shadow: 0 0 0 2px rgba(107, 78, 46, 0.15);
}

input[readonly] {
    background: #f7f4ef;
    color: #666666;
}

.field-help {
    margin-top: 6px;
    color: #666666;
    font-size: 13px;
    line-height: 1.5;
    text-align: justify;
}

.actions {
    text-align: right;
    margin-top: 20px;
}

/* TABLEAUX */
.table-wrap {
    overflow-x: auto;
    border: 1px solid #E6DED2;
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid #eee5d9;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

th {
    background: #faf8f5;
    color: #6B4E2E;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: #fcfaf7;
}

td:first-child {
    font-weight: bold;
}

.small-link {
    color: #6B4E2E;
    text-decoration: none;
}

.small-link:hover {
    text-decoration: underline;
}

/* BADGES DE STATUT */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    text-transform: capitalize;
}

.status-brouillon {
    background: #f4f0ff;
    color: #5b4790;
    border: 1px solid #cfc2f2;
}

.status-publiee {
    background: #edf7ed;
    color: #245b2a;
    border: 1px solid #b7ddb9;
}

.status-archivee {
    background: #f5f5f5;
    color: #666666;
    border: 1px solid #d8d8d8;
}

.status-retiree {
    background: #fff1f1;
    color: #8a2f2f;
    border: 1px solid #e4b9b9;
}

@media (max-width: 780px) {
    .page-title {
        font-size: 30px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .actions {
        text-align: center;
    }

    .actions .button,
    .actions .button-secondary {
        display: block;
        width: 100%;
        box-sizing: border-box;
        margin: 0 0 12px 0;
    }
}

.actions.actions-center {
    text-align: center;
}

.footer-tagline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 6px 0;
}

.footer-emoji {
    display: inline-block;
    font-size: 18px;
    animation: footerBlink 5s infinite ease-in-out;
}

@keyframes footerBlink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.08);
    }
}

.footer-emoji-left {
    animation-delay: 0s;
}

.footer-emoji-right {
    animation-delay: 2.5s;
}

@media (max-width: 640px) {
    .footer-tagline {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .footer-emoji {
        flex: 0 0 auto;
    }
}

/* BOÎTES DE FORMULAIRES / CONTEXTE */
.form-box {
    border: 1px solid #E6DED2;
    border-radius: 12px;
    background: #ffffff;
    padding: 26px 28px;
    box-sizing: border-box;
}

.context-box {
    border: 1px solid #E6DED2;
    border-radius: 10px;
    background: #faf8f5;
    padding: 24px;
    box-sizing: border-box;
    margin-bottom: 28px;
}

.context-box p {
    margin: 0 0 12px;
    line-height: 1.75;
    text-align: justify;
}

.context-box a {
    font-weight: bold;
    text-decoration: underline;
}

.form-row-checkbox {
    margin: 14px 0 18px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.98rem;
    line-height: 1.4;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

/* MESSAGES AVEC LISTES */
.message ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

.message.error strong {
    display: block;
    margin-bottom: 6px;
}

/* TEXTAREA */
textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #cfc6ba;
    border-radius: 6px;
    font-size: 15px;
    background: #ffffff;
}

textarea {
    min-height: 240px;
    resize: vertical;
    line-height: 1.7;
}

textarea:focus {
    outline: none;
    border-color: #6B4E2E;
    box-shadow: 0 0 0 2px rgba(107, 78, 46, 0.15);
}

/* PETITE AIDE FORMULAIRE */
.help {
    color: #666666;
    font-size: 14px;
    margin-top: 6px;
    text-align: justify;
}

/* ADMIN / OUTILS */
.admin-page-title {
    font-size: 34px;
    color: #6B4E2E;
    margin: 0 0 20px;
    line-height: 1.25;
}

.admin-box {
    border: 1px solid #E6DED2;
    border-radius: 10px;
    background: #ffffff;
    padding: 24px;
    margin-bottom: 24px;
    box-sizing: border-box;
}

.admin-box h2 {
    margin-top: 0;
    margin-bottom: 14px;
    color: #6B4E2E;
    font-size: 24px;
}

.status-ok {
    color: #245b2a;
    font-weight: bold;
}

.status-warn {
    color: #b57f00;
    font-weight: bold;
}

.admin-actions {
    margin-top: 18px;
    text-align: left;
}

.button-link {
    display: inline-block;
    padding: 10px 14px;
    border: 1px solid #d8c4a8;
    border-radius: 6px;
    text-decoration: none;
    background: #f5f1ea;
    color: #6B4E2E;
}

.button-link:hover {
    background: #ece3d4;
}

.admin-back-link {
    margin-top: 20px;
}

.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid #E6DED2;
    border-radius: 10px;
    background: #ffffff;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid #eee5d9;
    padding: 10px 12px;
    font-size: 13px;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    background: #faf8f5;
    color: #6B4E2E;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background: #fcfaf7;
}

.log-success {
    color: #245b2a;
    font-weight: bold;
}

.log-fail {
    color: #8a2f2f;
    font-weight: bold;
}

.log-rate {
    color: #b36b00;
    font-weight: bold;
}

@media (max-width: 640px) {
    .admin-page-title {
        font-size: 30px;
    }
}

/* ADMIN BACKUPS / DOCUMENTATION */
.admin-intro {
    margin: 0 0 28px;
    color: #555555;
    line-height: 1.7;
    text-align: justify;
}

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 26px;
}

.admin-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}

.admin-card {
    border: 1px solid #E6DED2;
    border-radius: 10px;
    background: #ffffff;
    padding: 20px;
    box-sizing: border-box;
}

.admin-card h2,
.admin-section h2 {
    margin: 0 0 14px;
    color: #6B4E2E;
    font-size: 22px;
}

.admin-status-box {
    border: 1px solid #E6DED2;
    border-radius: 10px;
    background: #faf8f5;
    padding: 20px;
    margin-bottom: 28px;
}

.admin-status-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 10px;
}

.admin-status-ok {
    background: #edf7ed;
    color: #245b2a;
    border: 1px solid #b7ddb9;
}

.admin-status-warning {
    background: #fff6e6;
    color: #8a5b00;
    border: 1px solid #e3c985;
}

.admin-status-error {
    background: #fff1f1;
    color: #8a2f2f;
    border: 1px solid #e4b9b9;
}

.admin-meta-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.admin-meta-list li {
    margin-bottom: 8px;
}

.admin-meta-label {
    font-weight: bold;
    color: #444444;
}

.admin-section {
    border: 1px solid #E6DED2;
    border-radius: 10px;
    background: #ffffff;
    padding: 22px;
    margin-bottom: 28px;
    box-sizing: border-box;
}

.admin-section h3 {
    margin: 22px 0 10px;
    color: #6B4E2E;
    font-size: 18px;
}

.admin-section p {
    margin: 0 0 14px;
    text-align: justify;
}

.admin-section ul {
    margin: 0 0 14px 20px;
    padding: 0;
}

.admin-section li {
    margin-bottom: 8px;
}

/* ==========================================================
   BO - STRUCTURE DE SECTIONS ET TABLEAUX NORMALISÉS
   ========================================================== */

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 16px;
}

.admin-section-header h2,
.admin-table-title h2 {
    margin: 0;
    color: #6B4E2E;
    font-size: 22px;
}

.admin-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #F2E8D9;
    color: #6B4E2E;
    border: 1px solid #d8c4a8;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.admin-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 14px;
}

.admin-table-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.admin-table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-table-select-col {
    width: 34px;
    text-align: center !important;
}

.admin-table-select-col input[type="checkbox"] {
    transform: translateY(1px);
}

.admin-table-id-col {
    width: 70px;
    white-space: nowrap;
}

/* ==========================================================
   BO - GRILLES AVANCÉES / FILTRES / TRI / PAGINATION
   ========================================================== */

.admin-grid-table th {
    white-space: nowrap;
}

.admin-sort-link {
    color: #6B4E2E;
    text-decoration: none;
    font-weight: 700;
}

.admin-sort-link:hover {
    text-decoration: underline;
}

.admin-table-filter-row th {
    background: #eef7fb;
    border-bottom: 1px solid #cfe4f1;
    vertical-align: top;
}

.admin-filter-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 6px 7px;
    border: 1px solid #b9d7ea;
    border-radius: 4px;
    background: #ffffff;
    font-size: 12px;
}

.admin-filter-date-range {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    min-width: 130px;
}

.admin-grid-filter-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 120px;
}

.admin-grid-filter-actions .button-secondary {
    text-align: center;
    padding: 7px 9px;
    font-size: 12px;
}

.admin-grid-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.admin-grid-bulk {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-grid-pagination-zone {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-grid-per-page {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #555555;
    font-size: 13px;
}

.admin-grid-per-page select {
    padding: 5px 7px;
    border: 1px solid #d8cec1;
    border-radius: 4px;
    background: #ffffff;
}

.admin-pagination {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.admin-pagination a,
.admin-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border: 1px solid #E6DED2;
    border-radius: 4px;
    background: #ffffff;
    color: #6B4E2E;
    text-decoration: none;
    font-size: 13px;
    box-sizing: border-box;
}

.admin-pagination a:hover {
    background: #f5f1ea;
}

.admin-pagination .is-current {
    background: #6B4E2E;
    color: #ffffff;
    border-color: #6B4E2E;
    font-weight: 700;
}

.admin-pagination .is-disabled {
    opacity: 0.45;
    cursor: default;
}

.admin-filter-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
}

.admin-filter-stack .admin-filter-input {
    display: block;
}

@media (max-width: 900px) {
    .admin-grid-footer,
    .admin-grid-pagination-zone {
        align-items: flex-start;
        justify-content: flex-start;
    }
}

/* ==========================================================
   BO - GRILLE AVANCÉE : DÉTAIL CONTEXTE JSON
   ========================================================== */

.admin-context-toggle {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.admin-context-toggle:hover {
    text-decoration: underline;
}

.admin-context-row td {
    background: #fcfaf7;
    padding-top: 0;
    padding-bottom: 14px;
}

.admin-context-code {
    margin: 10px 0 0;
    max-height: 360px;
    overflow: auto;
    white-space: pre;
    font-size: 12px;
    line-height: 1.45;
}

/* ==========================================================
   BO - BADGES NORMALISÉS
   ========================================================== */

.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    white-space: nowrap;
}

.admin-badge-success {
    background: #edf7ed;
    color: #245b2a;
    border: 1px solid #b7ddb9;
}

.admin-badge-warning {
    background: #fff6e6;
    color: #8a5b00;
    border: 1px solid #e3c985;
}

.admin-badge-danger {
    background: #fff1f1;
    color: #8a2f2f;
    border: 1px solid #e4b9b9;
}

.admin-badge-muted {
    background: #f3eee8;
    color: #6B4E2E;
    border: 1px solid #e0d4c4;
}

/* Compatibilité avec les anciennes classes déjà utilisées */
.admin-mini-badge.admin-mini-ok,
.admin-mini-ok {
    background: #edf7ed;
    color: #245b2a;
}

.admin-mini-badge.admin-mini-failed,
.admin-mini-failed {
    background: #fff1f1;
    color: #8a2f2f;
}

/* ==========================================================
   BO - ZONES SENSIBLES
   ========================================================== */

.admin-danger-zone {
    border: 1px solid #e4b9b9;
    border-radius: 10px;
    background: #fff8f8;
    padding: 18px;
    margin-top: 22px;
}

.admin-danger-zone-title {
    margin: 0 0 10px;
    color: #8a2f2f;
    font-size: 18px;
    font-weight: 700;
}

.admin-danger-zone p {
    margin: 0 0 12px;
    color: #5f3333;
    line-height: 1.6;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table-wide {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.admin-table-wide th,
.admin-table-wide td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #eee3d8;
    vertical-align: top;
    font-size: 14px;
}

.admin-table-wide th {
    color: #6B4E2E;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-mini-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.2;
    background: #f3eee8;
    color: #6B4E2E;
}

.admin-mini-ok {
    background: #edf7ed;
    color: #245b2a;
}

.admin-mini-failed {
    background: #fff1f1;
    color: #8a2f2f;
}

.admin-help-box {
    background: #faf8f5;
    border: 1px solid #E6DED2;
    border-radius: 10px;
    padding: 18px;
    margin-top: 16px;
}

.admin-code-textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 54px;
    padding: 10px 12px;
    border: 1px solid #d8cec1;
    border-radius: 6px;
    background: #fcfbf9;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    resize: vertical;
}

.admin-muted {
    color: #666666;
    font-size: 14px;
}

.admin-empty {
    color: #666666;
    font-style: italic;
}

.table-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12.5px;
    background: #F2E8D9;
    color: #6B4E2E;
    white-space: nowrap;
}

.table-action:hover {
    background: #eadcc6;
}

.admin-code-block {
    background: #fcfbf9;
    border: 1px solid #e6ded2;
    border-radius: 8px;
    padding: 14px;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 12px 0 16px;
}

.admin-note {
    background: #faf8f5;
    border: 1px solid #E6DED2;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 14px;
}

@media (max-width: 980px) {
    .admin-cards {
        grid-template-columns: 1fr;
    }
}

/* ADMIN ANNONCES */
.admin-actions-top {
    text-align: center;
    margin-bottom: 24px;
}

.admin-empty-state {
    padding: 30px;
    text-align: center;
    color: #666666;
    border: 1px solid #E6DED2;
    border-radius: 10px;
    background: #ffffff;
}

/* FORMULAIRE ADMIN */
.admin-form-box {
    border: 1px solid #E6DED2;
    border-radius: 10px;
    background: #ffffff;
    padding: 24px;
    box-sizing: border-box;
}

.admin-form-box-spaced {
    margin-top: 24px;
}

.admin-section-block {
    margin-bottom: 28px;
}

.admin-section-title {
    margin: 0 0 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid #E6DED2;
    color: #6B4E2E;
    font-size: 20px;
}

.admin-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.admin-full {
    grid-column: 1 / -1;
}

.admin-checkbox-row {
    padding-top: 30px;
}

.admin-checkbox-row label {
    display: inline;
    font-weight: normal;
    margin-left: 8px;
}

.admin-mini-actions {
    margin-top: 8px;
}

.admin-mini-button {
    display: inline-block;
    background: #F2E8D9;
    color: #6B4E2E;
    border: 1px solid #d8c4a8;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
}

.admin-mini-button:hover {
    background: #eadcc6;
}

/* PHOTOS */
.admin-photo-subtitle {
    margin: 0 0 14px;
    color: #6B4E2E;
    font-size: 18px;
}

.admin-photo-separator {
    margin: 26px 0;
    border: 0;
    border-top: 1px solid #E6DED2;
}

.admin-photo-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.admin-photo-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 18px;
    border: 1px solid #E6DED2;
    border-radius: 10px;
    padding: 16px;
    background: #fcfaf7;
}

.admin-photo-thumb {
    border: 1px solid #E6DED2;
    border-radius: 8px;
    overflow: hidden;
    background: #f3efe8;
    height: 180px;
}

.admin-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-photo-fields {
    min-width: 0;
}

.admin-photo-meta {
    font-size: 13px;
    color: #666666;
    margin-top: 6px;
    word-break: break-word;
}

.admin-photo-delete {
    margin-top: 12px;
}

.admin-mini-button-danger {
    background: #fff1f1;
    color: #8a2f2f;
    border: 1px solid #e4b9b9;
}

.admin-mini-button-danger:hover {
    background: #fbe1e1;
}

@media (max-width: 780px) {
    .admin-grid-2 {
        grid-template-columns: 1fr;
    }

    .admin-checkbox-row {
        padding-top: 0;
    }

    .admin-photo-item {
        grid-template-columns: 1fr;
    }

    .admin-photo-thumb {
        height: 220px;
    }
}

#description_courte {
    min-height: 110px;
}

#description_longue {
    min-height: 180px;
}

.admin-photo-meta {
    display: none;
}

/* ==========================================================
   BACK-OFFICE GENERAL
   ========================================================== */

.admin-body {
    margin: 0;
    background: #f5f1ea;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #f5f1ea;
}

/* SIDEBAR */

.admin-sidebar {
    width: 270px;
    flex: 0 0 270px;
    background: #3f2f1f;
    color: #ffffff;
    min-height: 100vh;
    height: 100vh;
    box-sizing: border-box;
    padding: 18px 16px;

    /*
     * BO : menu gauche fixe pendant le scroll de la page.
     */
    position: sticky;
    top: 0;
    align-self: flex-start;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.admin-sidebar-brand {
    padding: 8px 8px 18px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.admin-sidebar-brand a {
    color: #ffffff;
    text-decoration: none;
}

.admin-sidebar-title {
    display: block;
    font-size: 22px;
    font-weight: bold;
    line-height: 1.2;
}

.admin-sidebar-subtitle {
    display: block;
    margin-top: 4px;
    color: #e8d8c2;
    font-size: 13px;
}

.admin-nav-group {
    margin-bottom: 18px;
}

.admin-nav-group-title {
    margin: 0 0 7px;
    padding: 0 8px;
    color: #d8c4a8;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-nav-link {
    display: block;
    padding: 9px 10px;
    border-radius: 7px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.35;
}

.admin-nav-link:hover {
    background: rgba(255, 255, 255, 0.10);
}

.admin-nav-link.is-active {
    background: #F2E8D9;
    color: #3f2f1f;
    font-weight: bold;
}

.admin-nav-link.is-disabled {
    color: rgba(255, 255, 255, 0.45);
    cursor: default;
}

.admin-nav-link.is-disabled:hover {
    background: transparent;
}

/* ==========================================================
   BO - SIDEBAR ACCORDÉON
   ========================================================== */

.admin-nav-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 7px;
    padding: 0 8px;
    border: 0;
    background: transparent;
    color: #d8c4a8;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.admin-nav-group-toggle .admin-nav-group-title {
    margin: 0;
    padding: 0;
}

.admin-nav-group-icon {
    flex: 0 0 auto;
    color: #d8c4a8;
    font-size: 12px;
    line-height: 1;
    transition: transform 0.18s ease;
}

.admin-nav-group.is-closed .admin-nav-group-icon {
    transform: rotate(-90deg);
}

/* ==========================================================
   BO - SIDEBAR ACCORDÉON : TRIANGLES PLUS LISIBLES
   ========================================================== */

.admin-nav-group-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
    color: #f2e8d9;
    transition: transform 0.18s ease, color 0.18s ease;
}

.admin-nav-group-toggle:hover .admin-nav-group-icon {
    color: #ffffff;
}

.admin-nav-group.is-closed .admin-nav-group-icon {
    transform: rotate(-90deg);
}

/*
 * Sans JavaScript, le contenu reste ouvert.
 * La fermeture ne s’applique que lorsque JS ajoute .is-enhanced sur .admin-nav.
 */
.admin-nav.is-enhanced .admin-nav-group.is-closed .admin-nav-group-content {
    display: none;
}

.admin-nav-group.is-current .admin-nav-group-toggle {
    color: #ffffff;
}

.admin-nav-group.is-current .admin-nav-group-title {
    color: #ffffff;
}

.admin-nav-group-toggle:hover .admin-nav-group-title,
.admin-nav-group-toggle:hover .admin-nav-group-icon {
    color: #ffffff;
}

/* STRUCTURE DROITE */

.admin-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: #ffffff;
    border-bottom: 1px solid #E6DED2;
    padding: 18px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.admin-header-kicker {
    color: #8d7a65;
    font-size: 13px;
    margin-bottom: 4px;
}

.admin-header-title {
    margin: 0;
    color: #6B4E2E;
    font-size: 28px;
    line-height: 1.25;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-environment {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.admin-environment.is-production {
    background: #edf7ed;
    color: #245b2a;
    border: 1px solid #b7ddb9;
}

.admin-environment.is-maintenance {
    background: #fff1f1;
    color: #8a2f2f;
    border: 1px solid #e4b9b9;
}

.admin-header-user {
    color: #444444;
    font-size: 14px;
    font-weight: bold;
}

.admin-header-link {
    display: inline-block;
    padding: 8px 10px;
    border: 1px solid #d8c4a8;
    border-radius: 6px;
    color: #6B4E2E;
    background: #ffffff;
    text-decoration: none;
    font-size: 13px;
}

.admin-header-link:hover {
    background: #faf8f5;
}

.admin-content {
    flex: 1 1 auto;
    padding: 28px;
    box-sizing: border-box;
}

/* DASHBOARD */

.admin-dashboard-intro {
    border: 1px solid #E6DED2;
    border-radius: 12px;
    background: #ffffff;
    padding: 20px 22px;
    margin-bottom: 24px;
}

.admin-dashboard-intro p {
    margin: 0;
    color: #444444;
    line-height: 1.7;
    text-align: justify;
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}

.admin-dashboard-card {
    border: 1px solid #E6DED2;
    border-radius: 12px;
    background: #ffffff;
    padding: 22px;
    box-sizing: border-box;
    min-height: 210px;
    display: flex;
    flex-direction: column;
}

.admin-dashboard-card-title {
    color: #6B4E2E;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
}

.admin-dashboard-card-value {
    color: #333333;
    font-size: 30px;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 12px;
}

.admin-dashboard-card-text {
    color: #555555;
    line-height: 1.6;
    font-size: 14px;
    flex: 1 1 auto;
}

.admin-dashboard-card-actions {
    margin-top: 18px;
}

.button-secondary.is-disabled,
.button.is-disabled {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}

.admin-check-list {
    margin: 0;
    padding-left: 20px;
}

.admin-check-list li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* TABLETTE ACCEPTABLE */

@media (max-width: 1100px) {
    .admin-sidebar {
        width: 230px;
        flex-basis: 230px;
    }

    .admin-dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .admin-layout {
        display: block;
    }

    .admin-sidebar {
        width: auto;
        min-height: auto;
        height: auto;
        position: static;
        overflow: visible;
    }

    .admin-header {
        display: block;
    }

    .admin-header-actions {
        justify-content: flex-start;
        margin-top: 12px;
    }

    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   BO - FOOTER
   ========================================================== */

.admin-footer {
    margin-top: 36px;
    padding: 16px 0 0;
    border-top: 1px solid #E6DED2;
    color: #777777;
    font-size: 13px;
    line-height: 1.6;
}

.admin-footer-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.admin-footer-separator {
    color: #b5a897;
}

.admin-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.admin-footer-links a {
    color: #6B4E2E;
    text-decoration: none;
}

.admin-footer-links a:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .admin-footer-main,
    .admin-footer-links {
        justify-content: center;
        text-align: center;
    }
}

/* ==========================================================
   BO - SESSIONS PERSISTANTES
   ========================================================== */

.remember-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 22px;
}

.remember-summary .summary-card {
    padding: 12px 16px;
    border: 1px solid #e3d9c9;
    background: #faf8f5;
    border-radius: 8px;
    min-width: 180px;
}

.remember-summary .summary-label {
    display: block;
    font-size: 0.92rem;
    color: #6b6b6b;
    margin-bottom: 4px;
}

.remember-summary .summary-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #6B4E2E;
}

.remember-table .small {
    display: block;
    font-size: 0.82rem;
    color: #666666;
    margin-top: 4px;
    line-height: 1.35;
}

.remember-table .mono {
    font-family: Consolas, Monaco, monospace;
    font-size: 0.82rem;
    word-break: break-all;
}

.remember-table .status-expired {
    color: #9b2c2c;
    font-weight: 700;
}

.remember-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 170px;
}

.remember-actions form {
    margin: 0;
}

.button-danger {
    display: inline-block;
    padding: 8px 12px;
    background: #fff2f2;
    color: #8a2f2f;
    border: 1px solid #e4b9b9;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.button-danger:hover {
    background: #fde7e7;
}

.badge-current-device {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 6px;
    font-size: 0.75rem;
    border-radius: 4px;
    background: #dff5e1;
    color: #2d7a32;
}