/* =========================================================
   Mobile responsive styles — Rencontres & Actualités
   Loaded after style.css, rencontres-actualites.css
   and rencontres-pagination.css
   ========================================================= */

@media screen and (max-width: 900px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  body {
    background: var(--cream, #fffaf2);
  }

  .page-shell {
    width: 100%;
    max-width: none;
    border-radius: 0;
    box-shadow: none;
  }

  /* HEADER */

  .site-header {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-height: auto;
    padding: 16px 18px 14px;
  }

  .brand {
    width: 100%;
  }

  .brand img {
    width: 150px;
    max-width: 56vw;
    height: auto;
    margin: 0 auto;
  }

  .main-nav {
    order: 2;
    width: 100%;
    margin: 0;
    padding: 6px 0 8px;
    justify-content: center;
    gap: 18px;
    overflow-x: visible;
    font-size: 0.84rem;
  }

  .main-nav a {
    flex: 0 0 auto;
  }

  .site-header .header-cta {
    display: none;
  }

  /* HERO */

  .meetups-page {
    padding-bottom: 0;
  }

  .meetups-hero img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

 /* NEXT MEETING */

  .next-meeting-card {
    position: relative;
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    column-gap: 24px;
    row-gap: 18px;
    width: calc(100% - 40px);
    max-width: 680px;
    min-height: 0;
    margin: 24px auto 22px;
    padding: 34px 34px 30px;
    text-align: center;
  }

  /* Allows the title and info block to be placed separately in the grid */
  .next-meeting-main {
    display: contents;
  }

  .next-meeting-main h1 {
    grid-column: 1 / -1;
    grid-row: 1;
    margin: 0 0 4px;
    text-align: center;
    font-size: clamp(2.55rem, 10vw, 3.5rem);
    white-space: normal;
  }

  /* Calendar logo on the left */
  .next-meeting-icon {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
    justify-self: center;
    margin: 0;
    transform: translateX(22px);
  }

  .next-meeting-icon img {
    display: block;
    width: 76px;
    height: 76px;
    margin: 0;
    object-fit: contain;
  }

  /* Location/date/time on the right */
  .next-meeting-info {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    max-width: none;
    margin: 0;
    gap: 14px;
    justify-self: start;
  }

  .next-meeting-info p {
    justify-content: flex-start;
    text-align: left;
    font-size: 1.08rem;
    line-height: 1.25;
  }

  .meetups-page .next-mini-icon {
    width: 30px;
    height: 30px;
  }

  /* Coffee text block */
  .meetups-page .next-meeting-comfort {
    grid-column: 1 / -1;
    grid-row: 3;
    left: 100px;
    top: 20px;
    width: 100%;
    max-width: 470px;
    margin: 2px auto 0;
    transform: translateX(-34px);
  }

  .meetups-page .next-comfort-title {
    display: grid !important;
    grid-template-columns: 58px 1fr;
    align-items: center;
    gap: 12px;
    padding-left: 0;
    margin: 0 0 8px;
    text-align: left;
  }

  .meetups-page .next-coffee-icon {
    position: static;
    width: 58px !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    transform: none;
  }

  .meetups-page .next-comfort-title span {
    font-size: 1.04rem;
    line-height: 1.28;
  }

  .meetups-page .next-meeting-comfort p {
    max-width: 100%;
    margin: 10px auto 0;
    text-align: center;
    font-size: 1rem;
    line-height: 1.42;
    transform: translateX(-50px);
  }

  /* Cup image + button centered */
  .next-meeting-visual {
    grid-column: 1 / -1;
    grid-row: 4;
    display: flex;
    justify-content: center;
    min-height: 0;
  }

  .next-meeting-visual img {
    top: 0;
    width: 170px;
    max-width: 60%;
    margin: 0 auto;
  }

  .next-meeting-btn {
    grid-column: 1 / -1;
    grid-row: 5;
    position: static;
    justify-self: center;
    width: 100%;
    max-width: 320px;
    min-height: 52px;
    margin: 0 auto;
  }

  /* NEWS */

/*  .news-section {
    width: calc(100% - 40px);
    max-width: 680px;
  }*/

  .news-section {
  width: calc(100% - 40px);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  }

  .news-section-title {
    width: 100%;
    margin: 26px auto 18px;
  }

  .news-section-title h2 {
    font-size: clamp(2.55rem, 10vw, 3.5rem);
  }

  .meetups-page .news-title-heart {
    width: 300px;
    max-width: 88%;
    margin: -28px auto 0;
  }

  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .news-card {
    min-height: 0;
    padding: 18px 16px 16px;
  }

  .news-card-header {
    grid-template-columns: 42px 1fr;
    min-height: 0;
  }

  .news-card h3 {
    font-size: 1.7rem;
  }

  .news-card p {
    font-size: 0.9rem;
    line-height: 1.42;
  }

  .news-photo,
  .meetups-page .news-card:nth-child(2) .news-photo,
  .meetups-page .news-card:nth-child(3) .news-photo {
    height: 150px;
    object-fit: cover;
  }

  /* PAGINATION */

  .meetups-page .news-pagination {
  width: 100%;
  justify-content: center;
  gap: 16px;
  margin: 20px auto 24px;
  }

  .meetups-page .news-pagination-btn {
    min-width: 118px;
    min-height: 42px;
    padding: 8px 14px;
  }


  /* BOTTOM GRID */

  .meetups-bottom-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    width: calc(100% - 40px);
    max-width: 680px;
    margin: 22px auto;
  }

  .memories-card,
  .future-projects-card {
    min-height: 0;
    padding: 26px 22px;
    text-align: center;
  }

  .future-projects-card {
    padding-left: 22px;
  }

  .memories-card h2,
  .future-projects-card h2 {
    font-size: clamp(2.45rem, 10vw, 3.35rem);
  }

  .meetups-page .memories-card h2::after {
    display: none;
    content: none;
  }

  .memories-card p {
    top: 0;
    max-width: 520px;
    margin: 0 auto 18px;
    font-size: 0.98rem;
    line-height: 1.45;
  }

  .memory-photos {
    top: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
  }

  .memory-photos img {
    height: 130px;
  }

  .memories-btn {
    top: 0;
    min-height: 42px;
  }

  .meetups-page .future-title-decor {
    width: 300px;
    max-width: 88%;
    margin: -34px auto 8px;
  }

  .future-projects-card ul {
    max-width: 520px;
    margin: 0 auto;
    gap: 12px;
    text-align: left;
  }

  .future-projects-card li {
    grid-template-columns: 38px 1fr;
    font-size: 0.98rem;
    line-height: 1.35;
  }

  .future-leaf {
    display: none;
  }

  /* FINAL CTA */

  .meetups-final-cta {
    grid-template-columns: 1fr;
    gap: 14px;
    width: calc(100% - 40px);
    max-width: 680px;
    height: auto;
    min-height: 0;
    margin: 0 auto 28px;
    padding: 26px 22px;
    text-align: center;
  }

  .meetups-final-cta > img:first-child {
    width: 180px;
    height: auto;
    margin: 0 auto;
  }

  .meetups-final-cta p {
    font-size: clamp(2.05rem, 9vw, 2.8rem);
    line-height: 1;
  }

  .meetups-final-cta-heart {
    position: static;
    width: 260px;
    max-width: 82%;
    height: auto;
    margin: -22px auto 0;
    transform: none;
  }

  .meetups-final-cta .btn {
    width: 100%;
    max-width: 320px;
    min-height: 52px;
    margin: 0 auto;
  }

  .final-small-flowers {
    display: none;
  }

  /* FOOTER */

  .site-footer {
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: 0;
    padding: 26px 20px;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 0;
  }

  .footer-brand img {
    width: 170px;
    margin: 0 auto;
  }

  .footer-village {
    justify-content: center;
  }

  .footer-village img {
    width: 180px;
    margin: 0 auto;
  }
}

@media screen and (max-width: 520px) {
  .site-header {
    padding-inline: 14px;
  }

  .brand img {
    width: 132px;
  }

  .main-nav {
    justify-content: flex-start;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    font-size: 0.8rem;
  }

  .next-meeting-card,
  .news-section,
  .meetups-bottom-grid,
  .meetups-final-cta {
    width: calc(100% - 32px);
  }

  .next-meeting-card {
    grid-template-columns: 96px minmax(0, 225px);
    justify-content: center;
    column-gap: 10px;
    row-gap: 18px;
    padding: 26px 18px;
  }

  .next-meeting-main {
    display: contents;
  }

  .next-meeting-main h1 {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .next-meeting-icon {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
    justify-self: end;
    margin: 0;
    transform: none;
  }

  .next-meeting-icon img {
    width: 76px;
    height: 76px;
    margin: 0;
  }
  .next-meeting-main h1,
  .news-section-title h2,
  .memories-card h2,
  .future-projects-card h2 {
    font-size: 2.55rem;
  }

  .next-meeting-info {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    max-width: 225px;
    margin: 0;
  }

  .next-meeting-info p {
    gap: 8px;
    justify-content: flex-start;
    text-align: left;
    font-size: 1rem;
  }

  .meetups-page .next-mini-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
  }

  .meetups-page .next-meeting-comfort,
  .next-meeting-visual,
  .next-meeting-btn {
    grid-column: 1 / -1;
  }

  .meetups-page .next-meeting-comfort {
    width: 100%;
    max-width: 315px;
    margin: 0 auto;
    transform: translateX(-45px);
    overflow: visible;
  }

  .meetups-page .next-meeting-comfort p {
    width: 100%;
    max-width: 315px;
    margin: 10px auto 0;
    text-align: center;
    transform: translateX(-45px);
  }

  .meetups-page .next-comfort-title {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    column-gap: 8px;
    width: 100%;
    max-width: none;
    margin: 0;
    text-align: left;
  }

  .meetups-page .next-coffee-icon {
    width: 46px !important;
    justify-self: end;
  }

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

  .news-photo,
  .meetups-page .news-card:nth-child(2) .news-photo,
  .meetups-page .news-card:nth-child(3) .news-photo {
    height: 180px;
  }

  .meetups-page .news-pagination {
    gap: 10px;
  }

  .meetups-page .news-pagination-btn {
    min-width: 96px;
    padding-inline: 10px;
    font-size: 0.82rem;
  }

  .memory-photos {
    grid-template-columns: 1fr;
  }

  .memory-photos img {
    height: 190px;
  }

  .memories-card,
  .future-projects-card,
  .meetups-final-cta {
    padding: 24px 18px;
  }

  .future-projects-card li {
    font-size: 0.95rem;
  }

  .meetups-final-cta p {
    font-size: 2.15rem;
  }

  .footer-links {
    font-size: 0.94rem;
  }

  .meetups-page .news-card.news-card-forum .news-photo {
    height: 260px;
    object-fit: contain;
    object-position: center center;
    background: transparent;
  }
}