/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

* {
font-family: "adobe-garamond-pro", serif !important;
font-weight: 400 !important;
}

em,
i {
  font-family: "adobe-garamond-pro", serif !important;
  font-weight: inherit !important;
  font-style: italic !important;
  font-synthesis: weight;
  font-synthesis-style: none;
}



.text em,
.text i,
.two-col__text em,
.two-col__text i,
.about-content em,
.about-content i,
.contact-content em,
.contact-content i,
.blocks em,
.blocks i {
  font-family: "adobe-garamond-pro", serif !important;
  font-weight: inherit !important;
  font-style: italic !important;
  font-synthesis: weight;
  font-synthesis-style: none;
}

/* Keep Panel bold formatting through nested links and italics. */
strong,
b,
strong *,
b * {
  font-weight: 700 !important;
  font-synthesis: weight;
}

html[lang="fr"] .text,
html[lang="fr"] .two-col__text,
html[lang="fr"] .about-content,
html[lang="fr"] .contact-content,
html[lang="fr"] .contact-box,
html[lang="fr"] .blocks,
html[lang="fr"] .actualite-excerpt,
html[lang="fr"] .actualite-full,
html[lang="fr"] .publication-body {
  font-variant-numeric: oldstyle-nums;
  font-feature-settings: "onum" 1;
}

/*.garamond-regular {
font-family: "adobe-garamond-pro", serif;
font-weight: 400;
font-style: normal;
}*/

/* Base */
:root {
  --color-text: #1a1a1a;
  --color-bg: #fff5fbab;
  --color-grey: #f0f0f096;
  --color-light: #f5f5f5;
  --color-border: #e0e0e0;
  --font-body: 'Georgia', serif;
  --font-heading: 'Helvetica Neue', 'Arial', sans-serif;
  --app-height: 100dvh;
  --site-header-height: 0px;
  --browser-ui-offset: 0px;
  --mobile-title-size: clamp(2rem, 5.6vw, 3.7rem);
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 16px;
  display: flex;
  flex-direction: column;
}

.container {
/*  max-width: 960px;*/
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
.site-header {
  padding: 3rem 0 1rem;
  transition: padding 0.4s ease;
  z-index: 500;
  position: relative;
  line-height: 1.3;
/*  background: var(--color-bg);*/
}

.site-header.is-shrunk {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 0;
}

.site-header.is-shrunk .container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-header.is-shrunk .site-title {
  font-size: 1.85rem;
  text-align: left;
  margin-bottom: 0;
}

body.header-shrunk .swiper-fixed.has-expanded {
  top: 0;
}

.site-header.is-shrunk .icon-toggle {
  display: none;
}

body.page-slider-static-header .site-header,
body.page-slider-static-header .site-header.is-shrunk {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  padding: 3rem 0 1rem;
  transition: none;
}

body.page-slider-static-header .site-header .container,
body.page-slider-static-header .site-header.is-shrunk .container {
  display: block;
}

body.page-slider-static-header .site-header .site-title,
body.page-slider-static-header .site-header.is-shrunk .site-title {
  font-size: 3.7rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

body.page-slider-static-header .site-header .icon-toggle,
body.page-slider-static-header .site-header.is-shrunk .icon-toggle {
  display: block;
}

body.page-slider-static-header .swiper-fixed.has-expanded {
  top: 15%;
}

.site-title {
  display: block;
  text-align: center;
  font-size: 3.7rem;
  text-decoration: none;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}

.title-br {
  display: none;
}

/* Animated icon toggle (hamburger ↔ arrow) */
.icon-toggle {
  position: relative;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--color-text);
}

.icon-toggle:hover {
  color: var(--color-grey);
}

.icon-toggle .bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: black;
  transition: transform 0.3s ease, width 0.3s ease, top 0.3s ease, left 0.3s ease, opacity 0.3s ease;
}

.icon-toggle .bar1 { top: 0; }
.icon-toggle .bar2 { top: 8px; }
.icon-toggle .bar3 { top: 16px; }

/* Arrow left state with tail */
body.slide-open .icon-toggle .bar1 {
  width: 50%;
  top: 8px;
  transform: rotate(45deg);
  transform-origin: left center;
}

body.slide-open .icon-toggle .bar2 {
  opacity: 1;
  left: 0;
  top: 8px;
  width: 100%;
}

body.slide-open .icon-toggle .bar3 {
  width: 50%;
  top: 8px;
  transform: rotate(-45deg);
  transform-origin: left center;
}

/* Cross (X) state when nav is open */
body.nav-open .site-header {
  z-index: 1001;
}

body.nav-open .icon-toggle .bar1 {
  top: 8px;
  transform: rotate(45deg);
}

body.nav-open .icon-toggle .bar2 {
  opacity: 0;
}

body.nav-open .icon-toggle .bar3 {
  top: 8px;
  transform: rotate(-45deg);
}

@media (max-width: 1150px) {
  body.nav-open .site-header {
    pointer-events: none;
  }

  body.nav-open .icon-toggle {
    position: fixed;
    top: max(2rem, calc(env(safe-area-inset-top, 0px) + 1.5rem));
    left: 2rem;
    z-index: 1000002;
    pointer-events: auto;
  }

  body.nav-open .site-title {
    opacity: 0;
    visibility: hidden;
  }
}

body.nav-open main h1 {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Navigation overlay */
.nav-overlay {
  position: fixed;
  top: var(--site-header-height);
  left: 0;
  right: 0;
  width: 100vw;
  height: calc(var(--app-height) - var(--site-header-height) - var(--browser-ui-offset));
  min-height: calc(var(--app-height) - var(--site-header-height) - var(--browser-ui-offset));
  backdrop-filter: blur(4px);
  background: rgba(255, 245, 251, 0.8) !important;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--browser-ui-offset) + env(safe-area-inset-bottom, 0px) + 1.5rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

@media (min-width: 1151px) {
  .nav-overlay {
    top: 0;
    height: 100vh;
    min-height: 100vh;
    padding-top: var(--h1-top, var(--site-header-height));
    padding-bottom: 1.5rem;
  }

  .site-title {
    padding-top: 10px;
  }
}

.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-close {
  display: none;
}

.site-nav ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  list-style: none;
  padding-left: 0;
  padding-top: 0;
  text-align: center;
}

.site-nav {
  width: 100%;
  padding: 0 2rem;
  margin-top: 0;
  line-height: 1.3;
}

.mobile-br {
  display: none;
}

.site-nav a {
  font-size: 3.7rem;
  text-decoration: none;
  color: transparent;
  -webkit-text-stroke: 0.65px black;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s;
  cursor: pointer;
}

.site-nav a:hover,
.site-nav a.active {
  color: black;
}

/* Main */
main {
  padding: 2rem 0 0;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

main > .container {
    flex: 1;
    /* display: flex; */
    flex-direction: row;
    overflow: hidden;
    position: fixed;
    bottom: 15px;
    /* padding: 20px; */
    margin-left: auto;
    width: 100%;
    margin-top: auto;
}

/* Actualités & Publications: h1 aligned with auteur page */
.page-actualites > .container,
.page-publications > .container {
  position: fixed;
  top: calc(var(--h1-top, 0) - 12px);
  bottom: auto;
  left: 0;
  pointer-events: none;
}

.page-actualites > .container h1,
.page-publications > .container h1 {
  pointer-events: auto;
  line-height: 1.3;
}

h1 {
  font-size: 3.7rem;
    font-weight: 400;
    color: var(--color-bg);
    -webkit-text-stroke: 0.95px black;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 2rem;
    cursor: pointer;
    transition: opacity 0.4s, visibility 0.4s;
}

h1:hover {
  color: black;
}

h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.text {
  max-width: 640px;
}

.text p {
  margin-bottom: 1rem;
}

/* Two-column layout (about / home) */
.two-col {
    display: grid;
    /* grid-template-columns: 1fr 1fr; */
    /* gap: 2rem; */
    align-items: end;
    justify-content: center;
    /* position: fixed; */
    overflow: scroll !important;
    display: flex;
    /* bottom: 20px; */
    /* padding-bottom: 20px; */
    margin-left: auto;
    margin-top: auto;
    height: auto !important;
}

.two-col {
    align-items: stretch;
}

.two-col__text {
    font-size: 0.95rem;
    padding-right: 20px;
    padding-left: 20px;
    padding-bottom: 20px;
    min-width: 550px;
    margin-right: 10px;
    line-height: 130%;
    overflow: scroll;
    background-color: var(--color-grey);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.two-col__text p {
  margin-bottom: 0.75rem;
}

.two-col__text p:last-child {
  margin-bottom: 0;
}

.two-col__image img {
  width: 100%;
  height: auto;
  display: block;
}

.two-col__image figcaption {
  font-size: 0.75rem;
  color: var(--color-text);
  margin-top: 0.5rem;
}

body.page-about:not(.page-info) .two-col {
  display: grid;
  grid-template-columns: minmax(420px, 480px) minmax(260px, 310px);
  gap: 10px;
  align-items: stretch;
  justify-content: center;
  overflow: visible !important;
  width: fit-content;
  max-width: calc(100vw - 40px);
  margin: 10rem auto 0;
}

body.page-about:not(.page-info) .two-col__text {
  min-width: 0;
  height: 100%;
  padding-top: 20px;
  padding-right: 60px;
  padding-bottom: 20px;
  padding-left: 20px;
  margin-right: 0;
  overflow: hidden;
  background-color: var(--color-grey);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

body.page-about:not(.page-info) .two-col__image {
  width: 310px;
  margin: 0;
  height: 100%;
  padding-bottom: 20px;
}

body.page-about:not(.page-info) .two-col__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.page-about:not(.page-info) .two-col__image figcaption {
  margin-top: 0.35rem;
}

/* About / Informations page */
html:has(body.page-about) {
  height: auto;
}

body.page-about {
  height: auto;
  min-height: 100%;
  display: block;
}

.page-about main,
main.page-about {
  overflow: visible;
  display: block;
}

.page-about main > .container,
main.page-about > .container {
  overflow: visible;
  display: block;
}

/* Auteur page: h1 aligned with nav, content stays at bottom */
body.page-about:not(.page-info) h1 {
  position: fixed;
  top: calc(var(--h1-top, 0) - 12px);
  left: 0;
  width: 100%;
  z-index: 1;
}

/* Informations page: scrollable but h1 aligned */
.page-info main > .container {
  position: static;
  bottom: auto;
}

.page-info h1 {
  position: fixed;
  top: calc(var(--h1-top, 0) - 12px);
  left: 0;
  width: 100%;
  pointer-events: auto;
  z-index: 1;
  color: var(--color-bg);
  -webkit-text-stroke: 0.95px black;
}

.about-content {
  margin-top: 100px;
    max-width: 640px;
    padding-bottom: 3rem;
    background-color: var(--color-grey);
    padding-left: 20px;
    padding-right: 20px;
    line-height: 130%;
    margin-left: auto;
    margin-right: auto;
}

.about-content .text {
  padding-top: 100px;
}

.about-image {
     margin-bottom: 1.5rem;
    margin-left: -80px;
    margin-right: -150px;
    padding-top: 30px;
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
}

.contact-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: black;
  text-decoration: none;
  transition: color 0.2s;
}

.contact-link:hover {
  color: black;
}

.credit {
  margin-top: 2rem;
  margin-bottom: 2rem;
  font-size: 0.75rem;
  color: black;
}

.credit + .credit {
  margin-top: 0.25rem;
}

.credit a {
  color: black;
  text-decoration: none !important;
  transition: color 0.2s;
}

.credit a:hover {
  color: black;
}

/* Swiper common */
.swiper-fixed {
  position: fixed;
  bottom: 0px;
  left: 0;
  right: 0;
  top: 50%;
/*  min-height: 515px;*/
  transition: top 0.4s ease;
}

.swiper-fixed.has-expanded {
  top: 15%;
}

.swiper {
  padding-left: 20px;
  height: 100%;
  overflow: visible;
}

.swiper-button-prev,
.swiper-button-next,
.swiper-pagination {
  display: none;
}

.swiper-slide {
  width: 550px; padding: 20px;
  position: relative;
}


.swiper-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-grey);
  mix-blend-mode: multiply;
  opacity: 1;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 1;
}

.swiper-slide::after .actualite-body{
color: red !important;
}

.swiper-slide:first-child::after {
  opacity: 0;
}

.swiper:hover .swiper-slide::after,
.actualites-slider:hover .swiper-slide::after {
  opacity: 1;
}

.swiper:hover .swiper-slide:hover::after,
.actualites-slider:hover .swiper-slide:hover::after {
  opacity: 0;
}

/* Actualites native slider (no Swiper) */
.actualites-slider {
    display: flex;
    /* gap: 30px; */
    /* padding: 0 0px 0px 20px; */
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
    scrollbar-width: none;
}

.actualites-slider::-webkit-scrollbar {
  display: none;
}

.actualites-slider:active {
  cursor: grabbing;
}

/* Back button */
.slide-back {
  position: fixed;
  top: 50%;
  left: 20px;
  z-index: 100;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.slide-back.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Expanded state */
.swiper-fixed.has-expanded {
  overflow-y: auto;
  overflow-x: hidden;
}

.swiper-fixed.has-expanded .swiper {
  overflow: visible;
  height: auto;
}

.swiper-fixed.has-expanded .swiper-wrapper {
  transform: none !important;
}

.swiper-fixed.has-expanded .actualites-slider {
  overflow: visible;
  height: auto;
}

.swiper-slide {
  transition: width 0.4s ease, opacity 0.3s;
  cursor: pointer;
}

.swiper-slide.is-expanded {
  width: calc(100vw - 60px) !important;
  height: auto !important;
  cursor: default;
     /* padding-left: 140px !important;
padding-bottom: 2rem;*/
}

.swiper-slide:not(.is-expanded) {
  /* keep visible behind */
}

/* Hide all non-expanded slides except previous */
.has-expanded .swiper-slide:not(.is-expanded):not(.is-prev-visible) {
  width: 0 !important;
  min-width: 0 !important;
  overflow: hidden;
  opacity: 0;
  padding: 0 !important;
  flex: 0 0 0 !important;
  margin-right: 0 !important;
}

/* Previous slide peeks from the left, cut off by viewport edge */
.has-expanded .swiper-slide.is-prev-visible {
     width: 130px !important;
    margin-left: -30px;
    z-index: 10000 !important;
    opacity: 0.3;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    position: fixed;
    transition: opacity 0.3s, transform 0.5s ease, width 0.5s ease, margin 0.5s ease;
}

.has-expanded .swiper-slide.is-prev-visible:hover {
  opacity: 0.6;
}

body.slide-open h1 {
  opacity: 0;
  visibility: hidden;
}

/* Full content hidden by default */
.actualite-full {
  display: none;
  padding-bottom: 100px;
  padding-top: 1.5rem;
  max-width: 640px;
}

.swiper-slide.is-expanded .actualite-full {
  display: block;
}

.swiper-slide.is-expanded .actualite-excerpt {
  display: none;
}

.swiper-slide.is-expanded .actualite-thumb img {
  width: auto;
  max-width: 100%;
  max-height: 50vh;
  object-fit: contain;
}

.swiper-slide.is-expanded::after {
  opacity: 0 !important;
}

.actualite-item {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
  min-height: 0;
}


.actualites-slider .swiper-slide:not(.is-expanded) {
  display: flex;
  flex-direction: column;
}

.actualites-slider .swiper-slide:not(.is-expanded) .actualite-thumb {
  flex: 1 1 0;
  min-height: 0;
}

.actualite-thumb {
  flex-shrink: 1;
  min-height: 0;
  overflow: hidden;
}

.actualite-thumb img {
    width: auto;
    height: 100%;
    margin-right: auto;
    /* object-fit: cover; */
    display: block;
}

.actualite-body {
  padding-top: 1rem;
  flex-shrink: 0;
}

.actualite-item time {
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.25rem;
}

.actualite-item h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.actualite-excerpt {
  font-size: 0.9rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Publications */
.publication-item {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
  min-height: 0;
}

.publication-thumb {
  flex-shrink: 1;
  min-height: 0;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.publication-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.publication-body h2 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.publication-body .year,
.publication-body .publisher {
  font-size: 0.85rem;
  display: block;
}

.publication-excerpt {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Publication detail */
.cover {
  margin-bottom: 2rem;
}

.cover img {
  max-width: 300px;
  height: auto;
}

.meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.meta dt {
  font-weight: 600;
  font-family: var(--font-heading);
}

/* Blocks */
.blocks {
  max-width: 640px;
}

.blocks > * + * {
  margin-top: 1.5rem;
}

.blocks p {
  margin-bottom: 1rem;
}

.blocks figure {
  margin: 2rem 0;
}

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

.blocks figcaption {
  font-size: 0.85rem;
  color: var(--color-text);
  margin-top: 0.5rem;
}

.blocks iframe,
.blocks video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
}

.blocks blockquote {
  border-left: 3px solid var(--color-border);
  padding-left: 1.5rem;
  font-style: italic;
  color: var(--color-grey);
}

.blocks hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

/* Contact page */
html:has(body.page-contact) {
  height: auto;
}

body.page-contact {
  height: auto;
  min-height: 100%;
  display: block;
}

.page-contact main {
  overflow: visible;
  display: block;
}

.page-contact main > .container {
  overflow: visible;
  display: block;
  position: static;
  bottom: auto;
}

.page-contact h1 {
  position: fixed;
  top: calc(var(--h1-top, 0) - 12px);
  left: 0;
  width: 100%;
  pointer-events: auto;
  z-index: 1;
}

.contact-content { margin-top: 100px !important;
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.contact-box {
  background: var(--color-light);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.contact-box p {
  font-size: 0.95rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-form label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  text-decoration: underline;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-field {
  flex: 1;
}

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--color-grey);
  margin-top: 0.25rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-light);
  padding: 0.5rem 0.4rem;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-text);
}

.form-submit {
      margin-bottom: 200px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 30px;
  align-self: flex-start;
  background: none;
  border: 1px solid var(--color-text);
  color: black !important;
  padding: 0.5rem 1.5rem;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.form-submit:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

.form-alert {
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.form-success {
  background: #f0f8f0;
  color: #2a5a2a;
}

.form-error {
  background: #fdf0f0;
  color: #8a2a2a;
}

/* Back link */
.back-link {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.back-link a {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--color-grey);
  text-decoration: none;
}

.back-link a:hover {
  color: var(--color-text);
}

/* Page transitions */
body.page-fade-out .swiper-fixed,
body.page-fade-out main {
  opacity: 0;
  transition: opacity 0.35s ease;
}

body.page-fade-in .swiper-fixed {
  opacity: 0;
  animation: fadeIn 0.5s ease 0.1s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* Detail page */
body.actualite-detail .swiper-fixed {
  bottom: 0;
  overflow: hidden !important;
}

.slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.9s cubic-bezier(.77, 0, .18, 1);
}

.peek-spacer {
  flex: 0 0 130px;
  height: 100%;
}

.detail-wrapper {
  flex: 0 0 calc(100vw - 130px);
  height: 100%;
  overflow: hidden;
  padding-left: 20px;
}

.detail-wrapper:not(.is-current):not(.is-peek) {
  flex: 0 0 0;
  padding: 0;
  overflow: hidden;
}

.detail-wrapper.is-current {
  overflow-y: auto;
  overflow-x: hidden;
}

.is-peek {opacity: 0}

.detail-wrapper.is-peek {

    background: var(--color-grey);   
 
margin-top: 215px !important; 

     flex: 0 0 130px;
  overflow: hidden !important;
  padding: 0;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.3s;
}

.detail-wrapper.is-peek .actualite-body {
  margin-top: 400px;
}

.detail-wrapper.is-peek .actualite-body, 
.detail-wrapper.is-peek .actualite-full {
    margin-left: -100px;
    margin-right: 50px;
}


.detail-wrapper.is-peek .swiper-slide {
  margin-top: 15vh;
  padding: 0;
  width: 130px !important;
}

.detail-wrapper.is-peek .actualite-thumb {
  display: none;
}

.detail-wrapper.is-peek:hover {
  opacity: 0.7;
}

.detail-wrapper.is-peek.is-fading,
.detail-wrapper.is-peek.peek-hidden {
  opacity: 0;
  transition: opacity 0.25s;
}

.detail-wrapper.is-peek .swiper-slide {
  position: sticky;
  top: 0;
}

.detail-wrapper .is-prev-visible {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

body.actualite-detail .detail-wrapper:not(.is-current) .swiper-slide.is-prev-visible {
  visibility: hidden;
}

.slide-back {
  display: none !important;
}

.detail-wrapper .swiper-slide:not(.is-expanded) .actualite-thumb {
  flex: 1 1 0;
  min-height: 0;
}

body.actualite-detail .swiper-slide.is-prev-visible {
  top: 15%;
  left: -30px;
  bottom: 0;
  z-index: 10;
}

/* Action buttons */
.actualite-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  max-width: 640px;
}

.actualite-actions button,
.actualite-actions a {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s;
}

.actualite-actions button:hover,
.actualite-actions a:hover {
  color: var(--color-text);
}

/* Audio block */
.block-audio audio {
  width: 100%;
}

.block-audio figcaption,
.block-embed figcaption {
  font-size: 0.85rem;
  color: var(--color-text);
  margin-top: 0.5rem;
}

/* Embed block */
.embed-container {
  max-width: 100%;
  overflow: hidden;
}

.embed-container iframe {
  width: 100%;
  min-height: 400px;
  border: none;
}

.embed-container .instagram-media {
  max-width: 100% !important;
  min-width: 0 !important;
}

/* Media fade on scroll */
.media-fade {
  opacity: 0;
  transition: opacity 0.3s;
}

.media-fade.media-visible {
  opacity: 1;
}

/* Footer */
.site-footer {
  display: none;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 3.5rem;
  right: 1.5rem;
  z-index: 900;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  width: 24px;
  height: 18px;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, color 0.2s;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  color: var(--color-grey);
}

/* Language switcher */
.lang-switch {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.lang-switch a {
  text-decoration: none;
  color: #666;
  transition: color 0.2s;
}

.lang-switch a.is-active {
  color: var(--color-text);
}

.lang-switch a:not(.is-active):hover {
  color: black;
}

.lang-switch a[data-lang="fr"] {
  margin-left: -3px;
}

body.page-slider:not(.actualite-detail) .lang-switch {
  display: none;
}

body.nav-open .lang-switch {
  display: block !important;
  z-index: 1000001;
  bottom: calc(var(--browser-ui-offset) + env(safe-area-inset-bottom, 0px) + 1.5rem);
}

.lang-sep {
  margin: 0 0.15em;
  color: var(--color-text);
}

/* Responsive */
@media (min-width: 1151px) {
  .about-content {
    padding-right: 60px;
  }
}

@media (max-width: 1150px) {
  html,
  body.page-about,
  body.page-contact,
  .page-about main,
  .page-about main > .container,
  .page-contact main,
  .page-contact main > .container {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .nav-overlay {
    top: 0;
    height: var(--app-height);
    min-height: var(--app-height);
    justify-content: center;
    padding-top: calc(env(safe-area-inset-top, 0px) + 1.5rem);
    padding-bottom: calc(var(--browser-ui-offset) + env(safe-area-inset-bottom, 0px) + 1.5rem);
  }

  .lang-switch {
    right: auto;
    left: calc(100vw - 20px);
    transform: translateX(-100%);
    max-width: calc(100vw - 40px);
    white-space: nowrap;
  }

  .title-br {
    display: inline;
  }

  .site-title {
    font-size: clamp(1.6rem, 6vw, 3.7rem);
  }

  .site-header.is-shrunk {
    position: relative;
    padding: 3rem 0 1rem;
  }

  .site-header.is-shrunk .site-title {
    font-size: clamp(1.6rem, 6vw, 3.7rem);
    text-align: center;
    margin-bottom: 1.5rem;
  }

  .site-header.is-shrunk .icon-toggle {
    display: block;
  }

  .site-header.is-shrunk .container {
    display: block;
  }

  h1 {
    font-size: clamp(1.4rem, 5vw, 3.7rem);
    position: static !important;
    top: auto !important;
    width: auto !important;
  }

  .page-about main > .container,
  main.page-about > .container,
  .page-contact main > .container {
    position: static;
    bottom: auto;
  }

  .two-col {
    display: flex;
    flex-direction: column-reverse;
    align-items: stretch;
    overflow: visible !important;
  }

  body.page-about:not(.page-info) .two-col {
    display: flex;
    width: auto;
    max-width: none;
    margin: 0;
    gap: 0;
  }

  .two-col__text {
    min-width: 0;
    background-color: var(--color-grey);
    padding: 1rem 0;
    margin-right: 0;
    overflow: visible;
    justify-content: flex-start;
  }

  body.page-about:not(.page-info) .two-col__text {
    height: auto;
    padding: 20px;
  }

  body.page-about:not(.page-info) .two-col__image {
    width: auto;
    height: auto;
    padding-bottom: 0;
  }

  .two-col__image img {
    width: 100%;
  }

  body.page-about:not(.page-info) .two-col__image img {
    height: auto;
    object-fit: contain;
  }

  /* Scrollable body for slider pages on mobile */
  html:has(body.page-slider) {
    height: auto;
  }

  body.page-slider {
    height: auto;
    min-height: 100%;
    display: block;
  }

  body.page-slider main {
    overflow: visible;
    display: block;
  }

  body.page-slider main > .container {
    position: static;
    bottom: auto;
    overflow: visible;
    display: block;
  }

  /* Vertical slider for actualités & publications (listing only) */
  body:not(.actualite-detail) .page-actualites ~ .swiper-fixed,
  body:not(.actualite-detail) .page-publications ~ .swiper-fixed {
    position: static;
    top: auto;
    bottom: auto;
    padding: 0 2rem 2rem;
  }

  body:not(.actualite-detail) .page-actualites ~ .swiper-fixed .actualites-slider,
  body:not(.actualite-detail) .page-publications ~ .swiper-fixed .actualites-slider {
    flex-direction: column;
    overflow: visible;
    cursor: auto;
    padding: 0;
    gap: 2.5rem;
    height: auto;
  }

  .swiper-slide { padding: 20px;
    width: 100% !important;
    height: auto !important;
  }

  .swiper-slide::after {
    display: none;
  }

  .actualites-slider .swiper-slide:not(.is-expanded) .actualite-thumb {
    flex: none;
    min-height: auto;
    overflow: visible;
  }

  .actualite-thumb {
    flex: none;
    min-height: auto;
    overflow: visible;
  }

  .actualite-thumb img {
    width: 100% !important;
    height: auto;
  }

  /* Active slide = opacity 1, others dimmed (listing only, not expanded) */
  body:not(.actualite-detail) .page-actualites ~ .swiper-fixed:not(.has-expanded) .swiper-slide,
  body:not(.actualite-detail) .page-publications ~ .swiper-fixed:not(.has-expanded) .swiper-slide {
    opacity: 0.6;
    transition: opacity 0.3s;
  }

  body:not(.actualite-detail) .page-actualites ~ .swiper-fixed:not(.has-expanded) .swiper-slide.is-active,
  body:not(.actualite-detail) .page-publications ~ .swiper-fixed:not(.has-expanded) .swiper-slide.is-active {
    opacity: 1;
  }

  body:not(.actualite-detail) .page-actualites ~ .slide-back,
  body:not(.actualite-detail) .page-publications ~ .slide-back {
    display: none;
  }

  /* Expanded state on mobile (listing) */
  body:not(.actualite-detail) .page-actualites ~ .swiper-fixed.has-expanded,
  body:not(.actualite-detail) .page-publications ~ .swiper-fixed.has-expanded {
    position: static;
  }

  .swiper-slide.is-expanded {
    padding-left: 0 !important;
  }

  .has-expanded .swiper-slide.is-prev-visible {
    display: none;
  }

  /* Padding bottom for last slide to reach center (listing only) */
  body:not(.actualite-detail) .page-actualites ~ .swiper-fixed .actualites-slider,
  body:not(.actualite-detail) .page-publications ~ .swiper-fixed .actualites-slider {
    padding-bottom: 50vh;
  }

  /* Detail pages on mobile — hide header/h1 block */
  .detail-hidden {
    display: none !important;
  }

  body.slide-open .page-actualites,
  body.slide-open .page-publications {
    display: none !important;
  }

  body.actualite-detail .swiper-fixed {
    position: static !important;
    top: auto;
    bottom: auto;
    padding: 0 2rem 2rem;
    overflow: visible !important;
  }

  body.actualite-detail .slider-track {
    display: block;
    height: auto;
    transform: none !important;
    transition: none;
  }

  body.actualite-detail .detail-wrapper {
    display: none;
    padding-left: 0;
    min-width: 0;
    margin-right: 0;
    height: auto;
    overflow: visible;
  }

  body.actualite-detail .detail-wrapper.is-active-mobile {
    display: block;
  }

  body.actualite-detail .detail-wrapper .swiper-slide.is-prev-visible {
    display: none;
  }

  body.actualite-detail .detail-wrapper .swiper-slide.is-expanded {
    width: 100% !important;
    padding-left: 0 !important;
  }

  body.actualite-detail .slide-back {
    display: none;
  }

  body.actualite-detail .actualite-actions .btn-top {
    display: none;
  }
}

@media (max-width: 900px) {
  .site-header {
    line-height: 1.1 !important;
  }

  .site-nav {
    line-height: 1.1 !important;
  }

  h1,
  .page-actualites > .container h1,
  .page-publications > .container h1 {
    line-height: 1.1 !important;
  }

  .site-title,
  .site-header.is-shrunk .site-title,
  h1 {
    font-size: var(--mobile-title-size);
  }

  .site-nav a {
    font-size: var(--mobile-title-size) !important;
  }

  h1 {
    -webkit-text-stroke: 0.35px black !important;
  }

  body.page-slider-static-header .site-header .site-title,
  body.page-slider-static-header .site-header.is-shrunk .site-title {
    font-size: var(--mobile-title-size);
  }
}

@media (max-width: 1150px) {

  .site-nav ul { z-index: 1000000 !important; }
  .site-nav a {
    font-size: clamp(1.4rem, 5vw, 3.7rem);
  }

  .nav-overlay {
    justify-content: center;
  }

  .mobile-br {
    display: block;
  }
}

/* Landscape mobile: fit all nav items on screen */
@media (max-width: 1150px) and (orientation: landscape) {
  :root {
    --mobile-landscape-title-size: clamp(1.2rem, 3.5vw, 2rem);
  }

  .title-br {
    display: none;
  }

  .site-title {
    font-size: var(--mobile-landscape-title-size);
    margin-bottom: 0.75rem;
  }

  .site-header {
    padding: 1rem 0 0.5rem;
  }

  .site-nav ul {
    gap: 0.4rem;
  }

  .site-nav a {
    font-size: var(--mobile-landscape-title-size) !important;
  }

  .site-nav {
    line-height: 1.3 !important;
  }

  h1 {
    font-size: var(--mobile-landscape-title-size);
  }

  body.page-slider-static-header .site-header .site-title,
  body.page-slider-static-header .site-header.is-shrunk .site-title {
    font-size: var(--mobile-landscape-title-size);
  }

  .actualite-thumb img {
    max-height: 42vh;
    width: auto !important;
    margin: 0 auto;
    object-fit: contain;
  }

  .media-fade {
    opacity: 1;
  }
}
