/* -------------------------------------------------------------------------
   CNEOC — overrides légers (sticky footer + rafraîchissement UI)
--------------------------------------------------------------------------- */

:root {
    --cneoc-primary: #2250fc;
    --cneoc-primary-dark: #1a3fd4;
    --cneoc-text: #333;
    --cneoc-text-muted: #666;
    --cneoc-border: #e8e8e8;
    --cneoc-surface: #f7f8fa;
    --cneoc-radius: 4px;
    --cneoc-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}

html {
    height: 100%;
}

body {
    min-height: 100%;
    color: var(--cneoc-text);
}

body .body-inner {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1 0 auto;
    width: 100%;
}

#footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* -------------------------------------------------------------------------
   Topbar
--------------------------------------------------------------------------- */

#topbar {
    border-bottom: 1px solid var(--cneoc-border);
    font-size: .85rem;
}

#topbar .topbar-link {
    color: var(--cneoc-text-muted);
    text-decoration: none;
    font-weight: 500;
}

#topbar .topbar-link:hover,
#topbar .topbar-link:focus {
    color: var(--cneoc-primary);
    text-decoration: none;
}

#topbar .social-icons {
    margin: 0;
}

/* -------------------------------------------------------------------------
   Page title
--------------------------------------------------------------------------- */

#page-title {
    padding: 48px 0 40px;
    background:
        linear-gradient(180deg, #f4f6fb 0%, var(--cneoc-surface) 100%);
    border-bottom: 1px solid var(--cneoc-border);
}

#page-title .page-title > h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -.01em;
    margin-bottom: .65rem;
}

#page-title .breadcrumb {
    opacity: .85;
}

#page-title .breadcrumb a {
    color: var(--cneoc-text-muted);
}

#page-title .breadcrumb a:hover {
    color: var(--cneoc-primary);
}

/* -------------------------------------------------------------------------
   Sections & typography helpers
--------------------------------------------------------------------------- */

.page-section {
    padding-top: 48px;
    padding-bottom: 72px;
}

.page-section-tight {
    padding-top: 48px;
    padding-bottom: 32px;
}

.page-intro {
    margin-bottom: 40px;
}

.page-intro .lead {
    margin-bottom: 0;
    color: var(--cneoc-text-muted);
}

.heading-text.heading-section h2 {
    font-weight: 600;
}

.heading-text.heading-section p,
.heading-text.heading-section .lead {
    color: var(--cneoc-text-muted);
}

/* -------------------------------------------------------------------------
   Buttons
--------------------------------------------------------------------------- */

.btn {
    border-radius: var(--cneoc-radius);
    font-weight: 600;
    letter-spacing: .01em;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.btn-primary {
    background-color: var(--cneoc-primary);
    border-color: var(--cneoc-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--cneoc-primary-dark);
    border-color: var(--cneoc-primary-dark);
}

.btn-outline {
    border-width: 1px;
}

.btn-outline:hover,
.btn-outline:focus {
    box-shadow: 0 4px 14px rgba(34, 80, 252, .12);
}

/* -------------------------------------------------------------------------
   Call to action blocks
--------------------------------------------------------------------------- */

.call-to-action {
    padding-top: 56px !important;
    padding-bottom: 56px !important;
}

.call-to-action h3 {
    font-weight: 600;
}

/* -------------------------------------------------------------------------
   Home shortcuts
--------------------------------------------------------------------------- */

.home-shortcuts {
    background: var(--cneoc-surface);
    border-top: 1px solid var(--cneoc-border);
    border-bottom: 1px solid var(--cneoc-border);
}

.home-shortcut {
    display: block;
    height: 100%;
    padding: 1.75rem 1.5rem;
    background: #fff;
    border: 1px solid var(--cneoc-border);
    border-radius: var(--cneoc-radius);
    color: inherit;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.home-shortcut:hover,
.home-shortcut:focus {
    color: inherit;
    text-decoration: none;
    border-color: #cfd4da;
    box-shadow: var(--cneoc-shadow);
    transform: translateY(-2px);
}

.home-shortcut-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 1rem;
    border-radius: var(--cneoc-radius);
    background: #eef2ff;
    color: var(--cneoc-primary);
    font-size: 1.25rem;
}

.home-shortcut h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 .5rem;
}

.home-shortcut p {
    margin: 0;
    font-size: .9rem;
    color: var(--cneoc-text-muted);
    line-height: 1.5;
}

.home-shortcut-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--cneoc-primary);
}

/* -------------------------------------------------------------------------
   Footer
--------------------------------------------------------------------------- */

#footer.inverted .footer-content {
    padding-top: 48px;
    padding-bottom: 28px;
}

#footer .widget-title {
    font-size: .8rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

#footer .widget p {
    color: rgba(255, 255, 255, .7);
    font-size: .9rem;
    line-height: 1.55;
}

#footer .list li {
    margin-bottom: .4rem;
}

#footer .copyright-content {
    padding-top: 18px;
    padding-bottom: 18px;
}

/* -------------------------------------------------------------------------
   Projects — cards
--------------------------------------------------------------------------- */

.project-card {
    display: block;
    height: 100%;
    background: #fff;
    border: 1px solid var(--cneoc-border);
    border-radius: var(--cneoc-radius);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.project-card:hover,
.project-card:focus {
    color: inherit;
    text-decoration: none;
    border-color: #cfd4da;
    box-shadow: var(--cneoc-shadow);
    transform: translateY(-2px);
}

.project-card-image {
    position: relative;
    height: 180px;
    background: var(--cneoc-surface);
    overflow: hidden;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: .35rem .65rem;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .02em;
    border-radius: 2px;
    background: rgba(255, 255, 255, .92);
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.project-card-body {
    padding: 1.25rem 1.35rem 1.5rem;
}

.project-card-body h3 {
    font-size: 1.05rem;
    margin: 0 0 .5rem;
    line-height: 1.35;
}

.project-card-body p {
    margin: 0;
    font-size: .9rem;
    color: var(--cneoc-text-muted);
    line-height: 1.5;
}

.project-card-link {
    display: inline-block;
    margin-top: .85rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--cneoc-primary);
}

/* -------------------------------------------------------------------------
   Projects — members carousel
--------------------------------------------------------------------------- */

.project-members-section {
    padding-top: 48px;
    padding-bottom: 48px;
}

.project-members-heading {
    text-align: center;
    margin-bottom: 1.75rem;
}

.project-members-heading h2 {
    font-size: 1.85rem;
    font-weight: 600;
    margin: 0 0 .5rem;
}

.project-members-heading p {
    margin: 0;
    font-size: 1.05rem;
    color: var(--cneoc-text-muted);
}

.project-members-carousel {
    max-width: 920px;
    margin: 0 auto;
}

.project-members-viewport {
    overflow: hidden;
}

.project-members-track {
    display: flex;
    transition: transform .45s ease;
    will-change: transform;
}

.project-members-slide {
    flex: 0 0 100%;
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 1.5rem;
    padding: .25rem 0 .5rem;
}

.project-member {
    flex: 0 0 auto;
    width: 150px;
    text-align: center;
    color: inherit;
    text-decoration: none;
}

.project-member:hover,
.project-member:focus {
    color: inherit;
    text-decoration: none;
}

.project-member img {
    display: block;
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto .65rem;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.project-member:hover img,
.project-member:focus img {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .1);
}

.project-member-name {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: .15rem;
}

.project-member-meta {
    display: block;
    font-size: .75rem;
    color: var(--cneoc-text-muted);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-members-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .55rem;
    margin-top: 1.25rem;
}

.project-members-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #cfd4da;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}

.project-members-dot:hover,
.project-members-dot:focus {
    background: #9aa3ad;
    outline: none;
}

.project-members-dot.is-active {
    background: var(--cneoc-primary);
    transform: scale(1.15);
}

@media (max-width: 575.98px) {
    .project-members-slide {
        gap: 1rem;
    }

    .project-member {
        width: 120px;
    }

    .project-member img {
        width: 120px;
        height: 120px;
    }
}

/* -------------------------------------------------------------------------
   Projects — show
--------------------------------------------------------------------------- */

.project-show-content {
    font-size: 1.02rem;
    line-height: 1.7;
    color: #444;
}

.project-show-content > *:first-child {
    margin-top: 0;
}

.project-show-content img {
    max-width: 100%;
    height: auto;
}

.project-people-title {
    font-size: 1.1rem;
    margin: 0 0 1.25rem;
}

.project-meta {
    background: #fff;
    border: 1px solid var(--cneoc-border);
    border-radius: var(--cneoc-radius);
    overflow: hidden;
    position: sticky;
    top: 100px;
}

.project-meta-image {
    background: var(--cneoc-surface);
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.project-meta-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-meta-body {
    padding: 1.35rem 1.5rem 1.5rem;
}

.project-meta-row {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: 1.1rem;
}

.project-meta-label {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #888;
}

.project-meta-status {
    display: inline-block;
    align-self: flex-start;
    padding: .35rem .7rem;
    font-size: .85rem;
    font-weight: 600;
    border-radius: 2px;
    background: var(--cneoc-surface);
    color: #333;
}

.project-meta-status.bg-info,
.project-meta-status.bg-primary,
.project-meta-status.bg-warning,
.project-meta-status.bg-success,
.project-meta-status.bg-dark {
    color: #fff;
}

.project-meta-status.bg-warning {
    color: #212529;
}

/* -------------------------------------------------------------------------
   CNU — document list
--------------------------------------------------------------------------- */

.document-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.document-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: .75rem;
    background: #fff;
    border: 1px solid var(--cneoc-border);
    border-radius: var(--cneoc-radius);
    color: inherit;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.document-item:hover,
.document-item:focus {
    color: inherit;
    text-decoration: none;
    border-color: #cfd4da;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .05);
}

.document-item-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--cneoc-radius);
    background: var(--cneoc-surface);
    font-size: 1.35rem;
    color: #555;
}

.document-item-body {
    flex: 1 1 auto;
    min-width: 0;
}

.document-item-body h3 {
    font-size: 1rem;
    margin: 0 0 .25rem;
    line-height: 1.35;
}

.document-item-body p {
    margin: 0;
    font-size: .875rem;
    color: var(--cneoc-text-muted);
    line-height: 1.45;
}

.document-item-action {
    flex: 0 0 auto;
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--cneoc-primary);
}

@media (max-width: 767.98px) {
    .document-item {
        flex-wrap: wrap;
    }

    .document-item-action {
        width: 100%;
        margin-left: calc(48px + 1.25rem);
    }
}

/* -------------------------------------------------------------------------
   Empty / help / coming soon
--------------------------------------------------------------------------- */

.empty-state,
.help-panel {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--cneoc-surface);
    border: 1px solid var(--cneoc-border);
    border-radius: var(--cneoc-radius);
}

.help-panel {
    text-align: left;
    margin-top: 2.5rem;
}

.help-panel h3,
.empty-state h3 {
    font-size: 1.15rem;
    margin-bottom: .75rem;
    font-weight: 600;
}

.empty-state p {
    color: var(--cneoc-text-muted);
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 1.25rem;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--cneoc-primary);
    font-size: 1.5rem;
}

/* -------------------------------------------------------------------------
   Events
--------------------------------------------------------------------------- */

.event-card {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    background: #fff;
    border: 1px solid var(--cneoc-border);
    border-radius: var(--cneoc-radius);
}

.event-card-meta {
    flex: 0 0 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .65rem;
}

.event-card-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 72px;
    min-height: 72px;
    padding: .5rem;
    background: var(--cneoc-surface);
    border: 1px solid var(--cneoc-border);
    border-radius: var(--cneoc-radius);
    text-align: center;
}

.event-card-day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--cneoc-primary);
}

.event-card-month {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--cneoc-text-muted);
}

.event-card-type {
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--cneoc-text-muted);
    text-align: center;
}

.event-card-body {
    flex: 1 1 auto;
    min-width: 0;
}

.event-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 .35rem;
    line-height: 1.35;
}

.event-card-period {
    margin: 0 0 .85rem;
    font-size: .875rem;
    color: var(--cneoc-text-muted);
}

.event-card-content {
    font-size: .98rem;
    line-height: 1.65;
    color: #444;
}

.event-card-content > *:first-child {
    margin-top: 0;
}

.event-card-content > *:last-child {
    margin-bottom: 0;
}

.events-pagination .pagination {
    margin-bottom: 0;
    justify-content: center;
}

.events-sidebar {
    position: sticky;
    top: 70px;
}

.events-calendar,
.events-sidebar-panel {
    background: #fff;
    border: 1px solid var(--cneoc-border);
    border-radius: var(--cneoc-radius);
    padding: 1.15rem 1.2rem 1.25rem;
    margin-bottom: 1rem;
}

.events-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .85rem;
}

.events-calendar-title {
    font-size: .95rem;
    font-weight: 600;
    text-transform: capitalize;
}

.events-calendar-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--cneoc-radius);
    color: var(--cneoc-text-muted);
    text-decoration: none;
}

.events-calendar-nav:hover,
.events-calendar-nav:focus {
    color: var(--cneoc-primary);
    background: var(--cneoc-surface);
    text-decoration: none;
}

.events-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}

.events-calendar-weekday {
    font-size: .7rem;
    font-weight: 600;
    color: #999;
    padding: .25rem 0;
}

.events-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    border-radius: 3px;
    color: var(--cneoc-text);
}

.events-calendar-day.is-outside {
    color: #ccc;
}

.events-calendar-day.is-today {
    font-weight: 700;
    box-shadow: inset 0 0 0 1px var(--cneoc-primary);
}

.events-calendar-day.has-events {
    background: #eef2ff;
    color: var(--cneoc-primary);
    font-weight: 700;
}

.events-calendar-legend {
    list-style: none;
    margin: .9rem 0 0;
    padding: .85rem 0 0;
    border-top: 1px solid var(--cneoc-border);
}

.events-calendar-legend li {
    font-size: .8rem;
    line-height: 1.4;
    margin-bottom: .45rem;
    color: var(--cneoc-text-muted);
}

.events-calendar-legend li:last-child {
    margin-bottom: 0;
}

.events-calendar-legend strong {
    color: var(--cneoc-text);
    margin-right: .25rem;
}

.events-calendar-empty {
    margin-top: .85rem;
    padding-top: .85rem;
    border-top: 1px solid var(--cneoc-border);
    font-size: .8rem;
    color: var(--cneoc-text-muted);
}

.events-sidebar-title {
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin: 0 0 .85rem;
}

.events-upcoming-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.events-upcoming-list li {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .65rem 0;
    border-bottom: 1px solid var(--cneoc-border);
    font-size: .9rem;
}

.events-upcoming-list li:first-child {
    padding-top: 0;
}

.events-upcoming-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.events-upcoming-list time {
    font-size: .75rem;
    font-weight: 600;
    color: var(--cneoc-primary);
}

.events-sidebar-slot {
    border-style: dashed;
    background: var(--cneoc-surface);
}

.events-sidebar-muted {
    margin: 0;
    font-size: .9rem;
    color: var(--cneoc-text-muted);
}

@media (max-width: 991.98px) {
    .events-sidebar {
        position: static;
    }
}

@media (max-width: 575.98px) {
    .event-card {
        flex-direction: column;
    }

    .event-card-meta {
        flex-direction: row;
        align-items: center;
        flex: none;
    }
}

/* -------------------------------------------------------------------------
   Alerts — lisibilité (fond clair, texte foncé, liens contrastés)
--------------------------------------------------------------------------- */

.alert {
    border: 1px solid transparent;
    border-radius: var(--cneoc-radius);
    border-left-width: 4px;
    color: var(--cneoc-text);
}

.alert a {
    font-weight: 600;
    text-decoration: underline;
}

.alert a:hover,
.alert a:focus {
    text-decoration: underline;
}

.alert.alert-info {
    background-color: #eef4ff;
    border-color: #c9d8f5;
    border-left-color: #3b6fd9;
    color: #1a3358;
}

.alert.alert-info a {
    color: #1a4db3;
}

.alert.alert-info a:hover,
.alert.alert-info a:focus {
    color: #123a8a;
}

.alert.alert-success {
    background-color: #eef8f0;
    border-color: #c6e6cc;
    border-left-color: #2f9e44;
    color: #1e3f24;
}

.alert.alert-success a {
    color: #1f7a32;
}

.alert.alert-warning {
    background-color: #fff8e8;
    border-color: #f0e0b8;
    border-left-color: #d4a017;
    color: #5c4510;
}

.alert.alert-warning a {
    color: #8a6508;
}

.alert.alert-danger {
    background-color: #fdf0f1;
    border-color: #efc4c8;
    border-left-color: #c82333;
    color: #5c1a20;
}

.alert.alert-danger a {
    color: #a71d2a;
}
