/**
 * OremiUp — design mobile-first (styles de base = mobile, enrichissement >= md/lg)
 */

:root {
    --oremi-touch: 2.75rem;
    --oremi-page-x: 1rem;
    --oremi-page-y: 1rem;
    --oremi-bottom-nav-h: 3.75rem;
    --oremi-safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body.oremi-app {
    overflow-x: hidden;
}

@media (max-width: 991.98px) {
    body.oremi-has-mobile-nav {
        padding-bottom: calc(var(--oremi-bottom-nav-h) + var(--oremi-safe-bottom) + 0.5rem);
    }
}

/* Typographie : mobile d’abord */
body {
    font-size: 0.9375rem;
    line-height: 1.5;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.125rem; }
.section-title { font-size: 1.125rem; }
.oremi-form-title { font-size: 1.2rem; }

@media (min-width: 768px) {
    body { font-size: 0.9rem; }
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.25rem; }
    .section-title { font-size: 1.35rem; }
    .oremi-form-title { font-size: 1.35rem; }
}

@media (min-width: 992px) {
    h1 { font-size: 1.9rem; }
}

/* Conteneurs & espacements — même largeur header / contenu / footer */
.page-shell {
    width: 100%;
    padding-left: var(--oremi-page-x);
    padding-right: var(--oremi-page-x);
    margin-left: auto;
    margin-right: auto;
}

.oremi-navbar > .page-shell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

@media (min-width: 768px) {
    :root {
        --oremi-page-x: 1.25rem;
    }

    .page-shell {
        max-width: 1240px;
    }
}

.oremi-main {
    padding-top: var(--oremi-page-y);
    padding-bottom: var(--oremi-page-y);
}

/* Zones tactiles (mobile / tablette uniquement) */
@media (max-width: 991.98px) {
    .btn:not(.btn-sm),
    .nav-link,
    .dropdown-item,
    .oremi-bottom-nav__link,
    .footer-link,
    .footer-social {
        min-height: var(--oremi-touch);
    }

    .btn.btn-sm {
        min-height: auto;
    }
}

.btn.oremi-btn-cta,
.btn.oremi-btn-submit.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: auto;
    min-height: auto;
    line-height: 1.25;
    vertical-align: middle;
}

.btn.oremi-btn-cta i,
.btn.oremi-btn-submit.btn-sm i {
    line-height: 1;
    flex-shrink: 0;
}

.btn.oremi-btn-submit:not(.btn-sm) {
    width: 100%;
    min-height: var(--oremi-touch);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

@media (min-width: 576px) {
    .btn.oremi-btn-submit:not(.btn-sm) {
        width: auto;
    }
}

/* Champs : 16px évite le zoom iOS */
.oremi-form-card .form-control,
.oremi-form-card .form-select,
.oremi-field,
.oremi-search input {
    font-size: 1rem;
}

@media (min-width: 768px) {
    .oremi-form-card .form-control,
    .oremi-form-card .form-select,
    .oremi-field {
        font-size: 0.9rem;
    }
    .oremi-search input {
        font-size: 0.85rem;
    }
}

/* Navbar mobile : 1re ligne logo + actions, 2e ligne recherche pleine largeur */
.oremi-navbar .navbar-toggler {
    min-width: var(--oremi-touch);
    min-height: var(--oremi-touch);
    padding: 0.5rem;
}

@media (max-width: 991.98px) {
    /* Grille : ligne 1 = logo + actions (toujours côte à côte), ligne 2 = recherche, ligne 3 = panneau — évite les retours à la ligne flex imprévisibles en prod */
    .oremi-navbar > .page-shell {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        column-gap: 0.5rem;
        row-gap: 0.65rem;
        align-items: center;
        justify-content: stretch;
    }

    .oremi-navbar > .page-shell > .navbar-brand {
        grid-column: 1;
        grid-row: 1;
        order: unset;
        margin-right: 0;
        margin-bottom: 0;
        max-width: none;
        min-width: 0;
    }

    .oremi-navbar > .page-shell > .oremi-nav-appbar-end {
        grid-column: 2;
        grid-row: 1;
        order: unset;
        margin-left: 0;
        justify-self: end;
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.45rem;
    }

    .oremi-navbar > .page-shell > .oremi-search-wrap {
        grid-column: 1 / -1;
        grid-row: 2;
        order: unset;
        width: 100%;
        max-width: none;
        min-width: 0;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .oremi-navbar > .page-shell > #navMain.navbar-collapse {
        grid-column: 1 / -1;
        grid-row: 3;
        order: unset;
        flex-basis: auto;
        flex-grow: unset;
        width: 100%;
        max-height: none;
        overflow: visible;
    }

    .oremi-navbar #navMain .dropdown-menu {
        z-index: 1055;
    }

    .oremi-mobile-menu-more a {
        -webkit-tap-highlight-color: transparent;
    }

    .oremi-mobile-menu-more a:active {
        background: rgba(18, 22, 45, 0.06);
    }
}

/* Barre de navigation basse (mobile / tablette) */
.oremi-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 0.15rem;
    min-height: var(--oremi-bottom-nav-h);
    padding: 0.35rem var(--oremi-page-x) calc(0.35rem + var(--oremi-safe-bottom));
    background: #fff;
    border-top: 1px solid var(--oremi-border, #ebe8f3);
    box-shadow: 0 -4px 24px rgba(18, 22, 45, 0.08);
}

.oremi-bottom-nav__link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.25rem 0.15rem;
    text-decoration: none;
    color: #5d4b75;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.1;
    border-radius: 0.5rem;
    max-width: 5rem;
}

.oremi-bottom-nav__link i {
    font-size: 1.15rem;
}

.oremi-bottom-nav__link:hover,
.oremi-bottom-nav__link:focus {
    color: var(--oremi-dark, #12162d);
    background: rgba(18, 22, 45, 0.04);
}

.oremi-bottom-nav__link.is-active {
    color: var(--oremi-primary, #ff7e00);
}

/* Cartes & grilles */
.event-card-cover {
    height: 120px;
}

@media (min-width: 576px) {
    .event-card-cover {
        height: 140px;
    }
}

.card-soft,
.oremi-form-card {
    border-radius: 0.85rem;
}

@media (min-width: 768px) {
    .card-soft,
    .oremi-form-card {
        border-radius: 1rem;
    }
}

/* Accueil — rail profils publics (style « stories ») */
.oremi-landing-profiles-dark {
    background: linear-gradient(165deg, #14141c 0%, #0c0c12 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Rail : scroll horizontal sans scrollbar overlay ; bouton hors du flux scroll (flex) */
.oremi-landing-profiles-rail {
    gap: 0.5rem;
    -webkit-overflow-scrolling: touch;
    /* Pas de scrollbar « overlay » sur l’axe X (Chrome / WebKit) */
    scrollbar-width: none;
}

.oremi-landing-profiles-rail::-webkit-scrollbar {
    display: none;
}

.oremi-landing-profiles-rail__next {
    text-decoration: none;
}

.oremi-landing-profiles-rail__next:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 2px;
    border-radius: 0.5rem;
}

.oremi-landing-profiles-rail__next-inner {
    width: 2.1rem;
    height: 2.1rem;
    background: rgba(8, 8, 12, 0.55);
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

@media (min-width: 768px) {
    .oremi-landing-profiles-rail__next-inner {
        width: 2.35rem;
        height: 2.35rem;
    }
}

.oremi-landing-profile-story {
    flex: 0 0 clamp(5.5rem, 24vw, 7.75rem);
    aspect-ratio: 9 / 16;
    max-height: 13rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.oremi-landing-profile-story--no-cover {
    background: linear-gradient(160deg, #2a2a38 0%, #16161f 55%, #0e0e14 100%);
}

.oremi-landing-profile-story__shade {
    height: 52%;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.2) 55%, transparent 100%);
}

.oremi-landing-profile-story__avatar {
    top: 0.4rem;
    left: 0.4rem;
    width: 1.85rem;
    height: 1.85rem;
    z-index: 1;
    background: rgba(255, 255, 255, 0.12);
}

.oremi-landing-profile-story__avatar--ring-verified {
    box-shadow: 0 0 0 3px #1b8cff, 0 0 0 5px rgba(27, 140, 255, 0.35);
}

.oremi-landing-profile-story__avatar--ring-default {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55);
}

.oremi-landing-profile-story__name {
    z-index: 1;
    font-size: 0.72rem;
    line-height: 1.25;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

@media (hover: hover) {
    .oremi-landing-profile-story:hover {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    }
}

/* Accueil — catégories populaires : mobile = rail horizontal (scroll-snap), desktop = grille */
.oremi-landing-categories-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.65rem;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0.15rem 0 0.5rem;
    margin-inline: calc(-1 * var(--oremi-page-x));
    padding-inline: var(--oremi-page-x);
    scrollbar-width: thin;
    touch-action: pan-x;
}

.oremi-landing-categories-grid::-webkit-scrollbar {
    height: 5px;
}

.oremi-landing-categories-grid::-webkit-scrollbar-thumb {
    background: rgba(18, 22, 45, 0.22);
    border-radius: 4px;
}

.oremi-landing-category-card {
    flex: 0 0 clamp(6.75rem, 40vw, 9.25rem);
    scroll-snap-align: start;
    min-height: 5.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.65rem 0.45rem;
    box-shadow: 0 4px 16px rgba(18, 22, 45, 0.06);
}

.oremi-landing-category-card:focus-visible {
    outline: 2px solid var(--oremi-primary, #ff7e00);
    outline-offset: 2px;
}

.oremi-landing-category-icon {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1rem;
    flex-shrink: 0;
}

.oremi-landing-category-label {
    font-size: 0.78rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    hyphens: auto;
}

@media (prefers-reduced-motion: reduce) {
    .oremi-landing-categories-grid {
        scroll-snap-type: none;
    }
}

@media (min-width: 768px) {
    .oremi-landing-categories-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        overflow-x: visible;
        flex-wrap: wrap;
        margin-inline: 0;
        padding-inline: 0;
        gap: 1rem;
        scroll-snap-type: none;
        padding-top: 0;
        padding-bottom: 0;
    }

    .oremi-landing-category-card {
        flex: none;
        scroll-snap-align: none;
        min-height: 0;
        padding: 1rem 0.85rem;
    }

    .oremi-landing-category-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.05rem;
    }

    .oremi-landing-category-label {
        font-size: 0.875rem;
        -webkit-line-clamp: 3;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .oremi-landing-categories-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .oremi-landing-categories-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* Tableaux défilables */
.oremi-table-scroll,
.admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.oremi-table-scroll table,
.admin-table-wrap table {
    min-width: 36rem;
}

/* Actions empilées sur mobile */
.oremi-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.oremi-actions-stack .btn {
    width: 100%;
}

@media (min-width: 576px) {
    .oremi-actions-stack {
        flex-direction: row;
        flex-wrap: wrap;
        width: auto;
    }
    .oremi-actions-stack .btn {
        width: auto;
    }
}

/* Pied de page */
.oremi-footer {
    margin-bottom: 0;
}

@media (max-width: 991.98px) {
    .oremi-footer {
        padding-top: 1rem !important;
        padding-bottom: calc(0.75rem + var(--oremi-safe-bottom)) !important;
    }
    .oremi-footer-legal {
        margin-top: 0 !important;
        padding-top: 0 !important;
        border-top: 0 !important;
    }
    .oremi-footer-legal .footer-link {
        font-size: 0.75rem;
        min-height: auto;
        padding: 0.15rem 0;
    }
}

@media (max-width: 991.98px) {
    body.oremi-has-mobile-nav .oremi-footer {
        padding-bottom: calc(0.5rem + var(--oremi-bottom-nav-h) + var(--oremi-safe-bottom));
    }
}

/* ——— Bureau (≥ lg) : rétablir la mise en page classique ——— */
@media (min-width: 992px) {
    body.oremi-has-mobile-nav {
        padding-bottom: 0;
    }

    body.oremi-has-mobile-nav .oremi-footer {
        padding-bottom: inherit;
    }

    .oremi-main {
        padding-top: 1.25rem;
        padding-bottom: 2rem;
    }

    .oremi-navbar > .page-shell {
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .oremi-navbar .navbar-brand {
        flex: 0 0 auto;
    }

    .oremi-navbar .oremi-search-wrap {
        flex: 1 1 0%;
        min-width: 12rem;
        max-width: none;
        width: auto;
        margin-left: 0.75rem !important;
        margin-right: 0.25rem !important;
    }

    .oremi-navbar #navMain.navbar-collapse {
        display: flex !important;
        flex: 0 0 auto;
        flex-basis: auto;
        width: auto;
        min-width: 0;
        max-height: none;
        overflow: visible;
        align-items: center;
        justify-content: flex-end;
        gap: 0.65rem;
    }

    .oremi-navbar .oremi-nav-appbar-end {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex: 0 0 auto;
        flex-shrink: 0;
        width: auto;
    }

    .oremi-navbar .oremi-nav-persistent {
        flex: 0 0 auto;
        flex-shrink: 0;
        width: auto;
    }

    .oremi-navbar .navbar-toggler {
        order: unset;
        margin-left: 0;
        display: none !important;
    }

    .oremi-navbar .oremi-search {
        width: 100%;
        min-width: 0;
    }

    .oremi-navbar .oremi-search .form-control {
        flex: 1 1 auto;
        min-width: 0;
        width: 1%;
    }

    .oremi-navbar .auth-account-toggle {
        width: auto;
        max-width: 14rem;
    }

    .oremi-navbar .auth-account-toggle #authProfileLabel,
    .oremi-navbar .auth-account-toggle > span:not(.visually-hidden) {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 9rem;
        display: inline-block;
        vertical-align: bottom;
    }

    .oremi-navbar .oremi-nav-account-slot {
        width: auto;
        flex-shrink: 0;
    }

    .oremi-footer {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    .oremi-footer-legal {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--oremi-border, #ebe8f3);
    }

    .oremi-footer-legal .footer-link {
        font-size: 0.8rem;
        min-height: auto;
        padding: 0;
    }

    .footer-link {
        min-height: auto;
    }

    .footer-social {
        min-height: auto;
        width: 1.9rem;
        height: 1.9rem;
    }

    .oremi-footer-nav .footer-link {
        min-height: auto;
        margin-bottom: 0.35rem;
    }
}

/* Admin mobile-first */
@media (max-width: 991.98px) {
    .admin-app {
        margin: 0;
    }

    .admin-sidebar-sticky {
        position: static;
    }

    .admin-sidebar .nav-link {
        min-height: var(--oremi-touch);
        display: flex;
        align-items: center;
    }

    .admin-page-title {
        font-size: 1.1rem;
    }

    .admin-hero {
        padding: 1rem !important;
    }

    .admin-table-wrap table {
        min-width: 40rem;
    }
}

.admin-nav-mobile-toggle {
    width: 100%;
    min-height: var(--oremi-touch);
}

/* Modales pleine largeur sur petit écran */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 0.5rem;
    }
}

/* Réduction des effets hover sur tactile */
@media (hover: none) {
    .event-card:hover,
    a.event-card-wrap:hover .event-card {
        transform: none;
        box-shadow: 0 8px 22px rgba(18, 22, 45, 0.06);
    }
}

/* Page détail sortie — grille : mobile = en-tête → tarif/CTA → contenu */
.outing-detail-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "hero"
        "aside"
        "body";
}

@media (max-width: 991.98px) {
    .outing-detail-main {
        display: contents;
    }

    .outing-detail-layout__hero {
        grid-area: hero;
        background: #fff;
        border-radius: 0.85rem;
        overflow: hidden;
        box-shadow: 0 8px 22px rgba(18, 22, 45, 0.06);
    }

    .outing-detail-layout__body {
        grid-area: body;
        background: #fff;
        border-radius: 0.85rem;
        box-shadow: 0 8px 22px rgba(18, 22, 45, 0.06);
    }

    .outing-detail-aside {
        grid-area: aside;
    }
}

@media (min-width: 992px) {
    .outing-detail-layout {
        grid-template-columns: minmax(0, 2fr) minmax(17rem, 1fr);
        grid-template-areas: "main aside";
        align-items: start;
        gap: 1.5rem;
    }

    .outing-detail-main {
        grid-area: main;
    }

    .outing-detail-aside {
        grid-area: aside;
    }

    .outing-detail-layout__hero .p-4 {
        padding-bottom: 0 !important;
    }

    .outing-detail-layout__body {
        padding-top: 1rem !important;
    }
}

.outing-breadcrumb .breadcrumb-item a {
    color: #5d4b75;
    text-decoration: none;
}

.outing-breadcrumb .breadcrumb-item a:hover {
    color: var(--oremi-primary, #ff7e00);
}

.outing-detail__media {
    background: linear-gradient(135deg, rgba(255, 126, 0, 0.12), rgba(18, 22, 45, 0.08));
}

.outing-detail__cover {
    height: 200px;
    border-radius: 0;
}

.outing-detail__cover-img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.outing-detail__gallery-img {
    height: 120px;
    object-fit: cover;
}

@media (min-width: 768px) {
    .outing-detail__cover {
        height: 260px;
    }

    .outing-detail__cover-img {
        height: 280px;
    }

    .outing-detail__gallery-img {
        height: 140px;
    }
}

.outing-detail__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--oremi-dark, #12162d);
    line-height: 1.25;
}

@media (min-width: 768px) {
    .outing-detail__title {
        font-size: 1.85rem;
    }
}

.outing-detail__facts li {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
    margin-bottom: 0.65rem;
    color: #4a3d5c;
    font-size: 0.9375rem;
}

.outing-detail__facts li:last-child {
    margin-bottom: 0;
}

.outing-detail__stat-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(18, 22, 45, 0.05);
    font-size: 0.8125rem;
    color: #5d4b75;
}

.outing-detail__section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--oremi-dark, #12162d);
    margin-bottom: 0.75rem;
}

.outing-detail__description {
    line-height: 1.65;
    font-size: 0.9375rem;
    white-space: pre-line;
}

/* Texte issu de textarea / champs multilignes : respecter les retours à la ligne */
.oremi-pre-line {
    white-space: pre-line;
}

.outing-detail__price {
    color: var(--oremi-primary, #ff7e00);
    font-weight: 700;
}

.outing-detail-aside .card-soft {
    border: 1px solid rgba(18, 22, 45, 0.06);
}

@media (min-width: 992px) {
    .outing-detail-aside {
        position: sticky;
        top: 1rem;
    }
}

.outing-detail__organizer-avatar {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    overflow: hidden;
}

.outing-detail__organizer-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.outing-detail__guest-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background: rgba(255, 126, 0, 0.06);
    border: 1px solid rgba(255, 126, 0, 0.12);
}

.outing-detail__comment {
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background: rgba(18, 22, 45, 0.03);
    border: 1px solid rgba(18, 22, 45, 0.06);
}

.outing-detail__comment-avatar {
    width: 2rem;
    height: 2rem;
}

.outing-detail-skeleton {
    padding: 2rem 0;
    text-align: center;
}

/* Profil organisateur public */
.oremi-media-frame {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid rgba(18, 22, 45, 0.08);
    border-radius: 0.75rem;
    background: rgba(18, 22, 45, 0.04);
    overflow: hidden;
    cursor: zoom-in;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.oremi-media-frame:hover {
    border-color: rgba(255, 126, 0, 0.35);
    box-shadow: 0 4px 14px rgba(18, 22, 45, 0.08);
}

.oremi-media-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.oremi-media-frame--avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
}

.oremi-media-frame--space-avatar {
    width: 88px;
    height: 88px;
    border-radius: 0.75rem;
}

.oremi-media-frame--gallery {
    height: 140px;
}

.oremi-media-frame--gallery-sm {
    height: 90px;
}

.user-profile-avatar--placeholder {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    background: rgba(18, 22, 45, 0.06);
    color: #5d4b75;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
}

.space-avatar-block {
    position: relative;
    width: 88px;
    flex-shrink: 0;
}

.space-avatar-edit {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.oremi-lightbox-body {
    min-height: 200px;
    max-height: min(80vh, 720px);
}

.oremi-lightbox-img {
    max-width: 100%;
    max-height: min(75vh, 680px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.user-profile-outing-row:hover {
    background: rgba(255, 126, 0, 0.04);
}

.user-profile-comment {
    background: rgba(18, 22, 45, 0.02);
}

.user-profile-actions .btn.oremi-btn-submit.btn-sm {
    min-width: 10.5rem;
    padding: 0.4rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 0.5rem;
}

.user-profile-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
}

.user-profile-badge i {
    line-height: 1;
}

.user-profile-details__row {
    display: grid;
    grid-template-columns: minmax(7rem, 38%) 1fr;
    gap: 0.35rem 0.75rem;
    align-items: baseline;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(18, 22, 45, 0.06);
}

.user-profile-details__row:last-of-type {
    border-bottom: 0;
}

.user-profile-details dt {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--oremi-dark, #12162d);
    margin: 0;
}

.user-profile-details dd {
    font-size: 0.875rem;
    color: var(--oremi-dark, #12162d);
}

/* ——— Confort & accessibilité (global) ——— */
#oremi-main-content {
    scroll-margin-top: 5.5rem;
}

body.oremi-admin-page #oremi-main-content {
    scroll-margin-top: 4.75rem;
}

.oremi-alert-banner {
    animation: oremi-alert-in 0.28s ease-out;
}

@keyframes oremi-alert-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .oremi-alert-banner {
        animation: none;
    }
}

/* Focus clavier : anneau lisible sur toute l’app */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible,
.nav-link:focus-visible,
.dropdown-toggle:focus-visible,
.navbar-toggler:focus-visible {
    outline: 3px solid rgba(255, 126, 0, 0.45);
    outline-offset: 2px;
}

.footer-link:focus-visible,
.footer-social:focus-visible,
.oremi-bottom-nav__link:focus-visible {
    outline: 3px solid rgba(255, 126, 0, 0.45);
    outline-offset: 2px;
}

/* Cartes formulaire : conserver l’anneau interne du layout (évite double contour) */
.oremi-form-card .form-control:focus-visible,
.oremi-form-card .form-select:focus-visible {
    outline: none;
}

/* Pagination — couleur marque (rouge / orange OremiUp) */
.pagination .page-link {
    color: var(--oremi-primary, #ff7e00);
    border-color: var(--oremi-border, #ebe8f3);
    background-color: #fff;
}

.pagination .page-link:hover {
    color: #fff;
    background-color: var(--oremi-primary, #ff7e00);
    border-color: var(--oremi-primary, #ff7e00);
}

.pagination .page-link:focus {
    color: var(--oremi-primary, #ff7e00);
    box-shadow: 0 0 0 0.2rem rgba(255, 126, 0, 0.28);
}

.pagination .page-item.active .page-link {
    z-index: 1;
    color: #fff;
    background-color: var(--oremi-primary, #ff7e00);
    border-color: var(--oremi-primary, #ff7e00);
}

.pagination .page-item.active .page-link:hover {
    color: #fff;
    background-color: var(--oremi-primary-dark, #e35f00);
    border-color: var(--oremi-primary-dark, #e35f00);
}

.pagination .page-item.disabled .page-link,
.pagination .page-item.disabled .page-link:hover {
    color: #9a8fb0;
    background-color: #f3f1f8;
    border-color: var(--oremi-border, #ebe8f3);
}

/* Admin : aligner sur la primaire console si différente */
body.oremi-admin-page .pagination .page-link {
    color: var(--admin-primary, var(--oremi-primary, #ff7e00));
}

body.oremi-admin-page .pagination .page-link:hover,
body.oremi-admin-page .pagination .page-item.active .page-link {
    color: #fff;
    background-color: var(--admin-primary, var(--oremi-primary, #ff7e00));
    border-color: var(--admin-primary, var(--oremi-primary, #ff7e00));
}

body.oremi-admin-page .pagination .page-item.active .page-link:hover {
    color: #fff;
        background-color: #e35f00;
        border-color: #e35f00;
}
