/* =============================================================================
   Owner Portal Navigation — extranet propriétaire
   Menu horizontal responsive, réutilisable sur toutes les pages de l'extranet.
   Variables --b24c-* partagées avec owner-portal.css (avec fallback).
   ============================================================================= */

.b24c-owner-nav {
    width: 100%;
    background: var(--b24c-color-surface, #ffffff);
    border: 1px solid var(--b24c-color-border, #e2e8f0);
    border-radius: var(--b24c-radius, 12px);
    margin: 0 0 24px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.b24c-owner-nav__inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 10px 16px;
}

/* --- Marque / lien racine --- */
.b24c-owner-nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: var(--b24c-font-size-sm, 14px);
    color: var(--b24c-color-text, #1e293b);
    white-space: nowrap;
}

.b24c-owner-nav__brand-icon {
    font-size: 18px;
    line-height: 1;
}

/* --- Liste des onglets --- */
.b24c-owner-nav__list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
}

.b24c-owner-nav__item {
    margin: 0;
    padding: 0;
}

.b24c-owner-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: var(--b24c-font-size-xs, 13px);
    font-weight: 600;
    color: var(--b24c-color-text-muted, #64748b);
    white-space: nowrap;
    transition: background var(--b24c-transition, .15s ease),
                color      var(--b24c-transition, .15s ease);
}

.b24c-owner-nav__link:hover,
.b24c-owner-nav__link:focus {
    background: var(--b24c-color-neutral-bg, #f1f5f9);
    color: var(--b24c-color-text, #1e293b);
    outline: none;
}

.b24c-owner-nav__link:focus-visible {
    outline: 2px solid var(--b24c-color-accent, #2563eb);
    outline-offset: 1px;
}

/* --- Onglet actif --- */
.b24c-owner-nav__link.is-active {
    background: var(--b24c-color-text, #1e293b);
    color: #ffffff;
}

.b24c-owner-nav__link.is-active:hover,
.b24c-owner-nav__link.is-active:focus {
    background: var(--b24c-color-text, #1e293b);
    color: #ffffff;
}

.b24c-owner-nav__icon {
    font-size: 15px;
    line-height: 1;
}

/* --- Onglet avec actions à compléter (ex. Mon compte) : fond orange + pastille rouge --- */
.b24c-owner-nav__link.has-attention {
    background: #fff7ed;
    color: #9a3412;
    box-shadow: inset 0 0 0 1px #fdba74;
}
.b24c-owner-nav__link.has-attention:hover,
.b24c-owner-nav__link.has-attention:focus {
    background: #ffedd5;
    color: #9a3412;
}
.b24c-owner-nav__link.has-attention.is-active {
    background: #ea580c;
    color: #ffffff;
    box-shadow: none;
}
.b24c-owner-nav__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

/* --- Onglet en construction : grisé + libellé "bientôt" --- */
.b24c-owner-nav__link.is-soon {
    color: #94a3b8;
    background: #f1f5f9;
    opacity: .85;
}
.b24c-owner-nav__link.is-soon:hover,
.b24c-owner-nav__link.is-soon:focus {
    background: #e2e8f0;
    color: #64748b;
}
.b24c-owner-nav__soon {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: #64748b;
    background: #e2e8f0;
    border-radius: 999px;
    padding: 2px 6px;
    line-height: 1;
}

/* --- Bouton hamburger (mobile) --- */
.b24c-owner-nav__toggle {
    display: none;
    margin-left: auto;
    width: 40px;
    height: 36px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    background: var(--b24c-color-neutral-bg, #f1f5f9);
    border: 1px solid var(--b24c-color-border, #e2e8f0);
    border-radius: 8px;
    cursor: pointer;
}

.b24c-owner-nav__toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--b24c-color-text, #1e293b);
    border-radius: 2px;
}

/* =============================================================================
   Placeholder "Module en cours de développement"
   ============================================================================= */
.b24c-owner-module-placeholder {
    border: 1px dashed var(--b24c-color-border, #cbd5e1);
    border-radius: var(--b24c-radius, 12px);
    background: var(--b24c-color-neutral-bg, #f8fafc);
    padding: 32px 24px;
    text-align: center;
    color: var(--b24c-color-text-muted, #64748b);
}

.b24c-owner-module-placeholder__title {
    margin: 0 0 6px;
    font-size: var(--b24c-font-size-md, 16px);
    font-weight: 700;
    color: var(--b24c-color-text, #1e293b);
}

.b24c-owner-module-placeholder__text {
    margin: 0;
    font-size: var(--b24c-font-size-sm, 14px);
}

/* =============================================================================
   Modules extranet (Réservations / Hébergements) — base partagée
   ============================================================================= */
.b24c-extranet { margin: 0 0 24px; color: var(--b24c-color-text, #1e293b); }

.b24c-extranet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}
.b24c-extranet__title { margin: 0; font-size: var(--b24c-font-size-lg, 20px); font-weight: 700; }
.b24c-extranet__count { margin: 8px 0 14px; color: var(--b24c-color-text-muted, #64748b); font-size: var(--b24c-font-size-sm, 14px); }

.b24c-extranet-notice {
    padding: 18px;
    border: 1px dashed var(--b24c-color-border, #cbd5e1);
    border-radius: var(--b24c-radius, 12px);
    background: var(--b24c-color-neutral-bg, #f8fafc);
    color: var(--b24c-color-text-muted, #64748b);
}

/* Boutons / liens communs */
.b24c-extranet-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid var(--b24c-color-border, #e2e8f0);
    border-radius: 8px;
    background: var(--b24c-color-neutral-bg, #f1f5f9);
    color: var(--b24c-color-text, #1e293b);
    font-size: var(--b24c-font-size-xs, 13px);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.b24c-extranet-btn:hover,
.b24c-extranet-btn:focus { background: var(--b24c-color-border, #e2e8f0); }
.b24c-extranet-btn--primary { background: var(--b24c-color-text, #1e293b); color: #fff; border-color: var(--b24c-color-text, #1e293b); }
.b24c-extranet-link { color: var(--b24c-color-accent, #2563eb); text-decoration: none; font-weight: 600; font-size: var(--b24c-font-size-xs, 13px); }
.b24c-extranet-link:hover { text-decoration: underline; }

/* Filtres */
.b24c-extranet-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--b24c-color-border, #e2e8f0);
    border-radius: var(--b24c-radius, 12px);
    background: var(--b24c-color-surface, #fff);
    margin-bottom: 16px;
}
.b24c-extranet-filters__field { display: flex; flex-direction: column; gap: 4px; }
.b24c-extranet-filters__label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--b24c-color-text-muted, #64748b); }
.b24c-extranet-filters__select,
.b24c-extranet-filters__input {
    padding: 7px 10px;
    border: 1px solid var(--b24c-color-border, #e2e8f0);
    border-radius: 8px;
    font-size: var(--b24c-font-size-sm, 14px);
    background: #fff;
    min-width: 160px;
}
.b24c-extranet-filters__actions { display: flex; gap: 8px; align-items: center; }

/* Tableau réservations */
.b24c-extranet__table-wrap { overflow-x: auto; }
.b24c-extranet-table { width: 100%; border-collapse: collapse; font-size: var(--b24c-font-size-sm, 14px); }
.b24c-extranet-table th,
.b24c-extranet-table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--b24c-color-border, #e2e8f0); vertical-align: top; }
.b24c-extranet-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--b24c-color-text-muted, #64748b); background: var(--b24c-color-neutral-bg, #f8fafc); white-space: nowrap; }
.b24c-extranet-table tbody tr:hover { background: var(--b24c-color-neutral-bg, #f8fafc); }
.b24c-extranet-table__actions { display: flex; flex-direction: column; gap: 6px; white-space: nowrap; }
.b24c-extranet-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--b24c-color-neutral-bg, #f1f5f9); border: 1px solid var(--b24c-color-border, #e2e8f0); font-size: 12px; font-weight: 600; }
.b24c-extranet-details summary { cursor: pointer; color: var(--b24c-color-accent, #2563eb); font-weight: 600; }
.b24c-extranet-details ul { margin: 8px 0 0; padding-left: 16px; font-size: 12px; color: var(--b24c-color-text-muted, #64748b); }

/* Badges de statut colorés */
.b24c-extranet-badge.b24c-badge--ok    { background: #dcfce7; border-color: #86efac; color: #166534; }
.b24c-extranet-badge.b24c-badge--info  { background: #dbeafe; border-color: #93c5fd; color: #1e40af; }
.b24c-extranet-badge.b24c-badge--warn  { background: #fef9c3; border-color: #fde047; color: #854d0e; }
.b24c-extranet-badge.b24c-badge--muted { background: #e2e8f0; border-color: #cbd5e1; color: #334155; }

/* En-têtes de colonne triables */
.b24c-extranet-sort { color: inherit; text-decoration: none; }
.b24c-extranet-sort:hover { color: var(--b24c-color-accent, #2563eb); text-decoration: underline; }

/* Barre de statistiques (Réservations) */
.b24c-extranet-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
    margin: 4px 0 14px;
}
.b24c-extranet-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 110px;
    min-width: 110px;
    padding: 10px 14px;
    border: 1px solid var(--b24c-color-border, #e2e8f0);
    border-radius: 10px;
    background: var(--b24c-color-neutral-bg, #f8fafc);
}
.b24c-extranet-stat__value { font-size: 20px; font-weight: 800; }
.b24c-extranet-stat__label { font-size: 11px; color: var(--b24c-color-text-muted, #64748b); }
.b24c-extranet-stat--chips { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; background: transparent; border: none; padding: 0; min-width: 0; }

/* Préréglages de période */
.b24c-extranet-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex-basis: 100%; margin-top: 4px; }
.b24c-extranet-presets__label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--b24c-color-text-muted, #64748b); }
.b24c-extranet-chip {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid var(--b24c-color-border, #e2e8f0);
    border-radius: 999px;
    background: var(--b24c-color-neutral-bg, #f1f5f9);
    color: var(--b24c-color-text, #1e293b);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}
.b24c-extranet-chip:hover { background: var(--b24c-color-border, #e2e8f0); }

/* Pagination */
.b24c-extranet-pager { display: flex; align-items: center; gap: 12px; justify-content: center; margin-top: 16px; }
.b24c-extranet-pager__info { font-size: 13px; color: var(--b24c-color-text-muted, #64748b); }

/* Barre d'occupation (Mes biens) */
.b24c-heberg-occbar { height: 8px; border-radius: 999px; background: var(--b24c-color-border, #e2e8f0); overflow: hidden; }
.b24c-heberg-occbar__fill { height: 100%; background: var(--b24c-color-accent, #2563eb); border-radius: 999px; transition: width .2s ease; }

/* Grille de cartes hébergements */
.b24c-hebergements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.b24c-heberg-card {
    border: 1px solid var(--b24c-color-border, #e2e8f0);
    border-radius: var(--b24c-radius, 12px);
    overflow: hidden;
    background: var(--b24c-color-surface, #fff);
    display: flex;
    flex-direction: column;
}
.b24c-heberg-card__media { aspect-ratio: 16 / 10; background: var(--b24c-color-neutral-bg, #f1f5f9); }
.b24c-heberg-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.b24c-heberg-card__noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 42px; }
.b24c-heberg-card__body { padding: 14px; display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; }
.b24c-heberg-card__title { margin: 0; font-size: var(--b24c-font-size-md, 16px); font-weight: 700; }
.b24c-heberg-card__meta { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 12px; }
.b24c-heberg-card__meta li { display: flex; justify-content: space-between; gap: 8px; }
.b24c-heberg-card__meta span { color: var(--b24c-color-text-muted, #64748b); }
.b24c-heberg-card__stats { display: flex; gap: 10px; }
.b24c-heberg-stat { flex: 1; text-align: center; padding: 8px; border-radius: 8px; background: var(--b24c-color-neutral-bg, #f8fafc); }
.b24c-heberg-stat__value { display: block; font-size: 18px; font-weight: 800; }
.b24c-heberg-stat__label { display: block; font-size: 11px; color: var(--b24c-color-text-muted, #64748b); }
.b24c-heberg-card__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }

/* Responsive tableau → cartes empilées sous 640px */
@media (max-width: 640px) {
    .b24c-extranet-table thead { display: none; }
    .b24c-extranet-table,
    .b24c-extranet-table tbody,
    .b24c-extranet-table tr,
    .b24c-extranet-table td { display: block; width: 100%; }
    .b24c-extranet-table tr { border: 1px solid var(--b24c-color-border, #e2e8f0); border-radius: 10px; margin-bottom: 12px; padding: 6px 10px; }
    .b24c-extranet-table td { border: none; padding: 5px 0; display: flex; justify-content: space-between; gap: 12px; }
    .b24c-extranet-table td::before { content: attr(data-label); font-weight: 700; color: var(--b24c-color-text-muted, #64748b); }
    .b24c-extranet-table__actions { align-items: flex-end; }
}

/* =============================================================================
   Responsive — sous 782px : menu repliable (hamburger)
   ============================================================================= */
@media (max-width: 782px) {
    .b24c-owner-nav__toggle {
        display: flex;
    }

    .b24c-owner-nav__list {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        flex-basis: 100%;
        gap: 2px;
        margin-top: 8px;
    }

    .b24c-owner-nav__list.is-open {
        display: flex;
    }

    .b24c-owner-nav__link {
        width: 100%;
        padding: 12px 14px;
        font-size: var(--b24c-font-size-sm, 14px);
    }
}
