.container {
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.nav-hamburger:hover {
  background: rgba(0, 90, 124, 0.08);
}

.nav-hamburger span {
  display: block;
  height: 2.5px;
  background: #005a7c;
  border-radius: 2px;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
  transform-origin: center;
}

.nav-hamburger--open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.nav-hamburger--open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-hamburger--open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-hamburger {
    display: flex;
    order: 3;
  }

  header nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(234, 245, 251, 0.98);
    backdrop-filter: blur(8px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    font-size: 1.5rem;
    z-index: 9999;
    padding: 60px 20px 40px;
  }

  header nav.nav--open {
    display: flex;
  }

  header nav a {
    font-size: 1.4rem;
    font-weight: 600;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition:
      border-color 0.2s,
      color 0.2s;
    width: 100%;
    text-align: center;
  }

  header nav a:hover {
    border-bottom-color: #005a7c;
    text-decoration: none;
  }

  header .container {
    padding: 0 16px;
    height: 64px;
    flex-wrap: nowrap;
  }

  header .logo img {
    height: 52px;
  }

  header .user-block {
    order: 2;
    gap: 6px;
  }

  header .user-block img {
    height: 36px;
    width: 36px;
  }

  header .container {
    position: relative;
    z-index: 10000;
  }

  .nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: 2px solid #005a7c;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    color: #005a7c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
      background 0.2s,
      color 0.2s;
  }

  .nav-close:hover {
    background: #005a7c;
    color: #fff;
  }
}

@media (max-width: 640px) {
  .site-footer .container {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px 16px;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }

  .footer-logo img {
    height: 52px;
  }
}

@media (max-width: 768px) {
  .carousel-btn {
    display: none;
  }

  .carousel-wrapper {
    width: 100%;
  }

  .carousel-container {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .carousel-container::-webkit-scrollbar {
    display: none;
  }

  .carousel {
    overflow: visible !important;
    gap: 20px;
    padding: 10px 16px;
  }

  .carousel li {
    scroll-snap-align: start;
  }

  .carousel a {
    width: 120px;
  }

  .carousel img {
    width: 110px;
    height: 110px;
  }

  .assos-list .container h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .actus-list .container .actus-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .actu_item {
    height: auto !important;
    width: auto !important;
  }

  .actu_item img {
    height: 130px;
  }

  actuhead {
    flex-wrap: wrap;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .actus-list .container .actus-container {
    grid-template-columns: 1fr;
  }

  .actu_item img {
    height: 180px;
  }
}

@media (max-width: 768px) {
  .assos-list .container {
    padding: 0 12px;
  }

  .asso-item {
    height: auto !important;
    min-height: 120px;
  }

  .asso-item a {
    flex-direction: row;
    align-items: center;
  }

  .asso-logo,
  .asso-logo--placeholder {
    height: 90px !important;
    width: 90px !important;
    margin: 12px !important;
    font-size: 2.8rem !important;
  }

  .asso-content {
    padding: 10px 12px 10px 0;
    gap: 4px;
  }

  .asso-content h3 {
    font-size: 1.2rem;
  }

  .asso-content p {
    font-size: 0.88rem;
    -webkit-line-clamp: 2;
  }

  .asso-tagline {
    display: none;
  }

  .result-head {
    flex-wrap: wrap;
    gap: 8px;
    height: auto;
    padding-bottom: 12px;
  }
}

@media (max-width: 480px) {
  .asso-logo,
  .asso-logo--placeholder {
    height: 72px !important;
    width: 72px !important;
    margin: 10px !important;
    font-size: 2.2rem !important;
  }

  .asso-content h3 {
    font-size: 1.05rem;
  }
}

@media (max-width: 768px) {
  assohead {
    padding: 24px 0;
  }

  .assohead-inner {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
  }

  .assohead-logo,
  .assohead-logo--placeholder {
    width: 120px !important;
    height: 120px !important;
    font-size: 3rem !important;
  }

  assohead infos h2 {
    font-size: 1.8rem;
  }

  assohead infos {
    align-items: center;
  }

  .assohead-campus {
    margin: 0 auto;
  }

  .assodetails-menu {
    gap: 10px;
    padding: 8px 16px !important;
    justify-content: flex-start !important;
    scroll-padding-left: 16px;
  }

  .assodetails-menu li {
    width: 120px;
  }

  .assodetails-menu li a {
    height: 110px;
    padding: 10px 6px;
  }

  .assodetails-menu li img {
    width: 56px;
    height: 56px;
  }

  /* Admin bar */
  .admin-bar {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .assodetails-menu {
    justify-content: flex-start !important;
    -webkit-overflow-scrolling: touch;
  }

  .assodetails-menu li {
    width: 100px;
  }

  .assodetails-menu li a {
    height: 96px;
    padding: 8px 4px;
    font-size: 0.8rem;
  }

  .assodetails-menu li img {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 768px) {
  .org-timeline {
    padding-left: 18px;
    margin-left: 10px;
  }

  .org-timeline__marker {
    left: -38px;
    width: 34px;
    height: 34px;
    font-size: 0.65rem;
  }

  .org-timeline__content {
    margin-left: 8px;
    padding: 16px;
  }

  .org-tree {
    gap: 10px;
  }

  .org-node__card {
    width: 110px;
    padding: 10px 10px;
  }

  .org-node__photo,
  .org-node__photo--placeholder {
    width: 50px;
    height: 50px;
    font-size: 1.3rem !important;
  }

  .org-bureau-title {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .actus-container {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .actu_item {
    height: auto !important;
    width: auto !important;
  }

  .filter-wrapper {
    padding: 14px 16px;
  }

  .filters-row {
    gap: 8px;
  }

  .filters-row select {
    flex: 1 1 100%;
  }

  .pagination-container {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .actus-container {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .events-page {
    padding: 12px 0 40px;
  }

  .eventhead h2 {
    font-size: 1.5rem;
  }

  .eventhead-manage {
    gap: 6px;
  }

  .btn-manage {
    font-size: 0.78rem;
    padding: 6px 12px;
  }

  /* Filtres */
  .events-filters {
    padding: 12px;
    border-radius: 10px;
  }

  .filters-row {
    flex-direction: column;
    gap: 8px;
  }

  .filters-row select,
  .filter-reset-btn {
    width: 100%;
    padding: 10px 14px;
  }

  .cal-controls {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }

  .cal-period-label {
    font-size: 0.88rem;
    min-width: 140px;
  }

  .cal-grid {
    font-size: 0.72rem;
  }

  .cal-day {
    min-width: 60px;
  }

  .cal-day-header {
    height: 44px;
  }

  .cal-hour-slot {
    height: 52px;
    font-size: 0.62rem;
  }

  .cal-day-body {
    height: calc(var(--hour-count, 15) * 52px);
  }

  .event-item a {
    flex-direction: row;
  }

  .event-item-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
  }

  .event-item-content {
    padding: 10px 12px;
  }

  .event-item-titre {
    font-size: 0.95rem;
  }

  .event-item-description {
    display: none;
  }

  .result-head {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .cal-grid {
    grid-template-columns: 40px repeat(var(--day-count, 7), 1fr);
  }

  .cal-day {
    min-width: 46px;
  }

  .cal-day-name {
    font-size: 0.6rem;
  }

  .cal-day-num {
    font-size: 0.85rem;
    width: 22px;
    height: 22px;
  }

  .cal-event-name {
    font-size: 0.58rem;
  }

  .cal-event-time {
    display: none;
  }

  .event-item-image {
    width: 80px;
    height: 80px;
  }

  .event-item-footer {
    display: none;
  }
}

@media (max-width: 640px) {
  .event-page {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .event-banniere {
    height: 180px;
  }

  .event-header {
    padding: 16px;
  }

  .event-header-top {
    flex-direction: column;
    gap: 12px;
  }

  .event-titre {
    font-size: 1.4rem;
  }

  .event-header-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .event-meta {
    flex-direction: column;
  }

  .event-meta-divider {
    display: none;
  }

  .event-meta-item {
    min-width: unset;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
  }

  .event-body {
    padding: 16px;
  }

  .event-inscription {
    padding: 16px;
  }

  .event-back {
    padding: 12px 16px;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .event-form .form-dates-row {
    grid-template-columns: 1fr;
  }

  .co-orgs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .co-org-label img {
    width: 80px;
    height: 80px;
  }

  .event-form-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .event-item {
    height: auto !important;
    min-height: 140px;
  }

  .event-content {
    padding: 20px 20px;
    gap: 6px;
  }

  .event-content h3 {
    font-size: 1.3rem;
  }

  .event-content p {
    font-size: 0.92rem;
  }
}

@media (max-width: 768px) {
  .inv-stats-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .inv-stat {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }

  .inv-lists-grid {
    grid-template-columns: 1fr;
  }

  /* Tableau → scroll horizontal */
  .inv-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .inv-table {
    min-width: 520px;
  }

  /* Filtres */
  .inv-filters {
    flex-direction: column;
  }

  .inv-filter-search {
    min-width: unset;
    width: 100%;
  }

  .inv-filters select {
    width: 100%;
  }

  .inv-detail-header {
    flex-direction: column;
    gap: 12px;
  }

  .inv-lists-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .inv-stat {
    flex: 1 1 100%;
  }

  .inv-stat__num {
    font-size: 1.5rem;
  }

  .inv-asso-list-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .inv-asso-list-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .edit-page__header h2 {
    font-size: 1.4rem;
  }

  .edit-tabs {
    padding-bottom: 2px;
  }

  .edit-tab {
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  .edit-panel {
    padding: 18px 16px;
  }

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

  .formset-row__fields {
    flex-direction: column;
  }

  .formset-row__fields .form-group {
    min-width: unset;
    flex: none;
    width: 100%;
  }
}

@media (max-width: 700px) {
  .actu-page {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: unset;
  }

  .actu-titre {
    font-size: 1.5rem;
  }
}

@media (max-width: 600px) {
  .contacts-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .contacts-menu li a {
    width: 120px;
    min-height: 110px;
    padding: 10px 8px;
  }

  .contacts-menu li a img {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 480px) {
  .cal-modal__box {
    width: 100vw;
    max-width: 100vw;
    max-height: 90vh;
    border-radius: 16px 16px 0 0;
    position: fixed;
    bottom: 0;
    top: auto;
  }

  .cal-modal {
    align-items: flex-end;
  }
}

@media (max-width: 640px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .manage-event-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 0;
  }

  .manage-event-row__actions {
    width: 100%;
    justify-content: flex-end;
  }

  .notif-item {
    flex-direction: column;
    gap: 8px;
  }

  .notif-item__meta {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
}

@media (max-width: 640px) {
  .messages-wrap {
    padding: 0 12px;
    margin: 8px auto;
  }
}

@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
  }

  img {
    max-width: 100%;
    height: auto;
  }

  .video-embed {
    max-width: 100%;
  }
}

.assos-list {
  padding-top: 40px;
  padding-bottom: 40px;
}

.actus-list {
  padding-top: 40px;
  padding-bottom: 50px;
}

.actus-list {
  border-top: 3px solid #d0dbe0;
}

.events-results {
  padding: 24px;
}

.events-container {
  gap: 20px;
}

.event-item {
  border-radius: 14px;
}

.actus-container {
  row-gap: 28px;
  column-gap: 22px;
}

.actu_item a {
  min-height: 220px;
}

labels {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 0 0 0;
}

.label {
  margin: 0;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 700px) {
  .filters-row {
    flex-direction: column;
    gap: 10px;
  }

  .filters-row select {
    width: 100%;
    flex: none;
    min-width: unset;
  }

  .filter-btn {
    width: 100%;
  }
}

.cal-grid {
  min-width: 100%;
}

.calendar-wrap {
  overflow: hidden;
}

.cal-grid[style*="--day-count:1"] {
  grid-template-columns: 52px 1fr;
  overflow-x: hidden;
}

.cal-grid[style*="--day-count:1"] .cal-day {
  min-width: 0;
  width: 100%;
}

.cal-grid[style*="--day-count:1"] .cal-event {
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 8px;
}

.cal-grid[style*="--day-count:1"] .cal-event-name {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.cal-grid[style*="--day-count:1"] .cal-event-time {
  font-size: 0.78rem;
  opacity: 0.9;
}

@media (max-width: 500px) {
  .cal-view-toggle {
    display: none;
  }

  .cal-period-label {
    font-size: 0.82rem;
    min-width: 120px;
  }
}
