html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #ffffff;
  background-attachment: fixed;
  background-size: cover;
  color: #2c2c2c;
  font-family: 'Crimson Text', serif;
  line-height: 1.7;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

:root {
  --header-text-color: #2c2c2c;
  --globe-hover: #0077cc;
  --intro-x: 50%;
  --intro-y: 50%;
  --title-text-start: calc(0.6rem + 0.4rem);
}

/* --------------------------
   Cookie banner — styles finaux
   -------------------------- */

/* variables (faciles à adapter) */
:root{
  --cb-bg: #162032;        /* fond */
  --cb-ink: #ffffff;       /* texte */
  --cb-accent: #0b6bff;    /* primary */
  --cb-muted: rgba(255,255,255,.82);
  --cb-radius: 12px;
  --cb-shadow: 0 10px 30px rgba(0,0,0,.35);
  --cb-z: 1100;
}

/* Base / container */
#cookie-banner{
  display:none; /* JS contrôlera */
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1.25rem;
  z-index: var(--cb-z);
  background: linear-gradient(180deg,var(--cb-bg), color-mix(in srgb,var(--cb-bg) 92%, black 8%));
  color: var(--cb-ink);
  border-radius: var(--cb-radius);
  box-shadow: var(--cb-shadow);
  padding: 14px 18px;
  max-width: 960px;
  margin: 0 auto;
  border: 1px solid rgba(255,255,255, .04);
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform .28s cubic-bezier(.2,.9,.3,1), opacity .28s ease;
  font-size: 15px;
  line-height: 1.4;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* visible state */
#cookie-banner.is-visible{
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* contenu interne - flex layout */
#cookie-banner .cb-inner{
  display: flex;
  align-items: center;
  gap: .75rem;
  justify-content: space-between;
}

/* texte explicatif */
#cookie-banner .cb-text{
  flex: 1 1 60%;
  color: var(--cb-muted);
  margin-right: .75rem;
  min-width: 0; /* permet truncation */
  font-size: .96rem;
}

/* actions (boutons) */
#cookie-banner .cb-actions{
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-shrink: 0;
}

/* bouton primaire */
#cookie-banner .cb-primary{
  background: var(--cb-accent);
  color: #fff;
  border: 0;
  padding: .6rem .9rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(11,107,255, .12);
}

/* bouton secondaire */
#cookie-banner .cb-secondary{
  background: transparent;
  color: var(--cb-ink);
  border: 1px solid rgba(255,255,255,.12);
  padding: .56rem .88rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

/* lien "en savoir plus" */
#cookie-banner .cb-links{
  display:block;
  margin-top: .5rem;
  font-size: .86rem;
  color: rgba(255,255,255,.85);
  text-decoration: underline;
}

/* states focus visible (fort contraste) */
:where(#cookie-banner .cb-primary, #cookie-banner .cb-secondary, #manage-cookies a, #manage-cookies button):focus-visible{
  outline: 3px solid rgba(11,107,255,.18);
  outline-offset: 3px;
  border-radius: 8px;
}

/* small screens : vertical layout */
@media (max-width: 520px){
  #cookie-banner{
    left: .6rem;
    right: .6rem;
    bottom: 0.9rem;
    padding: 12px;
    font-size: 14px;
    border-radius: 10px;
  }
  #cookie-banner .cb-inner{ flex-direction: column; align-items: stretch; gap: .5rem; }
  #cookie-banner .cb-text{ order: 0; flex: none; width: 100%; }
  #cookie-banner .cb-actions{ justify-content: flex-end; width: 100%; }
  #cookie-banner .cb-links{ margin-top: .5rem; text-align: left; }
}

/* reduced motion : désactiver les transitions et animations */
@media (prefers-reduced-motion: reduce){
  #cookie-banner, #cookie-banner .cb-inner, #cookie-banner .cb-actions{
    transition: none !important;
    animation: none !important;
  }
  #cookie-banner{ transform: none; opacity: 1; }
}

/* tiny polish : hide on print */
@media print{
  #cookie-banner{ display:none !important; }
}

.map-container { display:flex; gap:.75rem; align-items:center; }
.map-container .map-frame { width:100%; min-height: 200px; border-radius:10px; overflow:hidden; }

/* Accessibility helpers (for no-js fallback) */
.no-js #cookie-banner { display:block; position: static; transform:none; opacity:1; }

/* optional: small visual hint when banner visible to screen readers */
#cookie-banner[aria-hidden="false"]{ /* if you use aria-hidden toggling */ }


/* small print for developers */
@supports (container-type: inline-size) {
  /* no-op: placeholder for modern layout tweaks if needed */
}

#manage-cookies {
  display: none;
  position: fixed;
  bottom: .6rem;
  left: .6rem;
  z-index: 1099;
  background: rgba(0,0,0,.5);
  color: #fff;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 13px;
  text-decoration: none;
}

/* ---------------------------------Conteneur principal ---------------------------------*/
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 100px;
  padding-right: 100px;
  width: 100%;
  box-sizing: border-box;
}

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background-color: #ffffff;
  padding: 0.5rem 0;
  z-index: 1000;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------------------------------Menu burger--------------------------------- */
.menu-btn {
  position: absolute;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.menu-btn span {
  display: block;
  height: 2px;
  background-color: var(--header-text-color);
  border-radius: 1px;
  transition: width 0.3s ease;
}
.menu-btn span:nth-child(1),
.menu-btn span:nth-child(2) {
  width: 100%;
}
.menu-btn span:nth-child(3) {
  width: 60%;
  align-self: flex-start;
}


.header-title {
  display: inline-block;
  margin: 0 auto;
  padding: 0;
  text-align: center;
  width: auto;
  box-shadow: none;
  background: transparent;
}

/* Rendu ancien sur nouvelle sémantique (final override) */
.header-title .site-title{
  margin:0;
  font-family:'Libre Baskerville',serif;
  font-size:1.5rem;
  font-weight:normal;
  color:var(--header-text-color);
  letter-spacing:0.17em;
  text-transform:uppercase;
  display:block;
  line-height:1.2;
}
.header-title .underline{
  display:block;
  width:265px;
  height:1px;
  background-color:var(--header-text-color);
  margin:0.215rem auto;
  box-shadow:none;
}

.header-title .underline::after { content: none; }

.header-title .site-tagline{
  margin:0;
  font-family:'Libre Baskerville',serif;
  font-size:0.8rem;
  color:var(--header-text-color);
  letter-spacing:0.5em;
  text-transform:uppercase;
  display:block;
  margin-top:0.5rem;
}

/* --------------------------------- MENU PRINCIPAL (identique au menu des langues) --------------------------------- */
.main-nav {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 40px;
  background: #fff;
  border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 1001;
  min-width: 230px;
  width: 230px;
  overflow: hidden;              /* clé pour que rien ne dépasse */
  border-radius: 8px; 
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
}

.main-nav > ul > li + li {
  border-top: 1px solid #eee;
}

.main-nav .menu-link {
  width: 100%;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0.5rem 1rem;
  text-align: left;
  font-family: 'Libre Baskerville', serif;
  color: #2c2c2c;
  cursor: pointer;
  text-decoration: none;
  font-size: 1.13rem;
  transition: background-color 0.2s, color 0.2s;
  display: block;
}

.main-nav .menu-link:hover,
.main-nav .menu-link:focus {
  background: #f0f0f0;
  color: #887759;
}




.main-nav,
.lang-accordion {
  height: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  transition: height .22s ease;
  will-change: height;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

@media (hover: hover) and (pointer: fine) {
  .main-nav.is-open,
  .lang-accordion.is-open {
    visibility: visible;
    pointer-events: auto;
    overflow: visible;
    height: auto;
  }
}

@media (hover: none), (pointer: coarse) {
  .main-nav.open,
  .lang-accordion.open {
    height: auto;
    visibility: visible;
    pointer-events: auto;
  }
}

@media (max-width: 800px) {

  .presentation-intro {
    font-size: 1rem;
    line-height: 1.6;
  }

  .accordion-content .contenu-accordeon {
    font-size: 1rem;
    line-height: 1.6;
  }

  .bio,
  .infos {
    font-size: 1rem;
    line-height: 1.6;
  }

  .ouvrage,
  .ouvrage-credit {
    font-size: 1rem;
    line-height: 1.6;
  }
}


/* ---------------------------------Menu des langues ---------------------------------*/
.globe-btn {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--header-text-color);
  transition: color 0.3s;
}

.globe-btn svg {
  display: block;
}

.globe-btn:hover {
  color: var(--globe-hover);
}

.lang-accordion {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 40px;
  background: #ffffff;
  border: none;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 1001;
}

.lang-accordion ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.lang-accordion li + li {
  border-top: 1px solid #eee;
}

.lang-accordion button {
  width: 100%;
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  text-align: left;
  font-family: 'Libre Baskerville', serif;
  color: var(--header-text-color);
  cursor: pointer;
  transition: background 0.2s;
}

.lang-accordion button:hover {
  background: #f0f0f0;
  color: #887759;
}

.hero-image {
  width: 100%;
  overflow: visible;
  margin-bottom: 0em;
  position: relative;
}

#torch-tip {
  position: absolute;
  left: var(--x, 50%);
  top:  var(--y, 50%);
  width: 0;
  height: 0;
  pointer-events: none;
}

.hero-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  margin-bottom: 0.3rem;
}

#hero-img {
  max-height: min(90vh, 860px);
  object-position: 50% 10%;
}

@media (max-width: 800px) {
  #hero-img {
    max-height: none;
    object-position: 50% 50%;
  }
}

h2, h3,
.accordion,
.contact-button-top {
  font-family: 'Libre Baskerville', serif;
}

/* Section titres harmonisés */
.section-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 5em;
  margin-bottom: 1.5em;
  gap: 0.09em;
}

.section-header .section-label {
  font-family: 'Libre Baskerville', serif;
  font-size: 0.8em;
  font-weight: normal;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #2c2c2c;
  opacity: 0.65;
  margin: 0 !important;
  padding: 0 !important;
  margin-bottom: 0.7em !important;
  line-height: 1.0 !important;
  display: block;
}

.section-header .section-title {
  font-family: 'Libre Baskerville', serif;
  font-size: 2.05em;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #2c2c2c;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.0 !important;
  display: block;
}

.center-header {
  align-items: center;
  text-align: center;
}

.center-header .section-title,
.center-header .section-underline {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.center-header .section-title {
  display: block;
  width: max-content;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.hero-title {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 0;
  margin-bottom: 0em;
}

.hero-title .section-header {
  display: flex;
  justify-content: center;
  text-align: center;
  flex-direction: row;
  margin-top: 0rem;
}

.hero-title .section-title {
  width: max-content;
  margin-left: auto;
  margin-right: auto;
}

.line {
  flex: 1;
  height: 1px;
  background-color: #2c2c2c;
  margin: 0 1em;
  min-width: 40px;
}

.section-underline {
  width: 240px;
  height: 1px;
  background-color: #2c2c2c;
  margin: 1.2em 0 0.9em 0;
  box-shadow: none;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  gap: 1.2em;
  padding: 0 2em;
  box-sizing: border-box;
  margin-top: 1.5em;
  margin-bottom: 2em;
}

.section-divider .line {
  flex-grow: 1;
  height: 1px;
  background-color: #2c2c2c;
}

.section-divider .section-title-centered {
  font-family: 'Libre Baskerville', serif;
  font-size: 5em;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #2c2c2c;
  white-space: nowrap;
}

.presentation-intro {
  margin: 0 0 1rem 0;
  font-size:1.3em;
}

.presentation-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 1em;
  padding: 0.5em;
  align-items: center;
}

.portrait {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  margin-right: 2em;
}

.portrait-img {
  width: 100%;
  max-width: 350px;
  height: auto;
  border-radius: 10px;
}

.bio {
  font-size:1.3em;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.bio p {
  margin-bottom: 1em;
}

.infos {
  font-size: 1.2em;
  word-break: break-word;
  max-width: 360px;
}

.infos p {
  margin-top: 0;
  margin-bottom: 0.3em;
}

.ouvrage {
  font-size:1.3em;
  display: flex;
  align-items: stretch;
  gap: 1em;
  margin-top: 2em;
}

.ouvrage-img {
  width: 75%;
  max-width: 240px;
  height: auto;
  border-radius: 10px;
}

.ouvrage-credit {
  color: #2c2c2c;
  line-height: 1.6;
  text-align: left;
  margin: auto 0 0.2em 0;
  flex: 1;
}

span.underline {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

/* Accordéons domaines */
.domaines-grid {
  display: flex;
  flex-direction: column;
  gap: 1.8em;
}

.bloc {
  margin-bottom: 1.5em;
  min-height: 4.5em;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.accordion { --title-inset: 0.29em; }

.accordion {
  font-size: 1.3em;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5em;
  background: transparent;
  border: none;
  padding: 0.4em 0;
  color: #2c2c2c;
  cursor: pointer;
  text-align: left;
}

.accordion .chevron {
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  border-right: 1.5px solid #2c2c2c;
  border-bottom: 1.5px solid #2c2c2c;
  transform: rotate(-45deg);
  transition: transform 0.3s ease;
  margin-right: 0.4em;
}

.accordion .chevron.rotated {
  transform: rotate(45deg);
}

.accordion-content {
  line-height: 1.7;
  position: relative;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.6s ease, opacity 0.4s ease;
  pointer-events: none;
}

.accordion-content.ready {
  max-height: 2000px;
  opacity: 1;
  pointer-events: auto;
}

.accordion-content .contenu-accordeon {
  display: none;
  font-size: 1.3em;
  padding-inline-start: calc(1em + 2px);
}

.accordion-content.ready .contenu-accordeon {
  display: block;
}

.accordion-content p,
.accordion-content li {
  font-size: 1em;
  font-weight: normal;
}

.accordion-content .contenu-accordeon ul {
  margin: 0;
  padding-left: 2.2em;
}

.accordion-content::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0.2951em;
  width: 1px;
  height: 0;
  background-color: #2c2c2c;
  transition: height 0.5s cubic-bezier(0.57,0.21,0.69,1.25);
  z-index: 1;
}

.accordion-content.ready::before {
  height: 100%;
}

.accordion::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.29em;
  height: 1px;
  width: calc(100% - 0.29em);
  background-color: #2c2c2c;
  transform-origin: left;
  transform: scaleX(1);
  transition: transform 0.5s ease;
}

.accordion.active::after {
  transform: scaleX(0);
}

.accordion .accordion-title,
.accordion .titre-accordeon,
.accordion > h3 {
  padding-inline-start: var(--title-text-start) !important;
}

/* Couleur des liens hypertextes */
a {
  color: #183153;
  text-decoration: underline;
  transition: color 0.15s;
}

a:hover, a:focus {
  color: #285395;
  text-decoration: underline;
}



/* ---------------------------------Publications : mise en page et style des cartes--------------------------------- */

#publications .domaines-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2em;
}

.publication-card {
  display: flex;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: background-color .2s;
}

.publication-card:hover {
  background-color: rgba(0,0,0,0.03);
}

.publication-card .illustration-bloc {
  flex: 0 0 120px;
  max-width: 120px;
  margin-right: 1.5em;
}

.publication-card .illustration-bloc img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
}

.publication-card .contenu-accordeon {
  flex: 1 1 auto;
}

.publication-card .contenu-accordeon h3 {
  margin: 0 0 0.5em;
  font-size: 1.1em;
}

.publication-card .contenu-accordeon p {
  margin: 0 0 0.75em;
  line-height: 1.4;
}

.publication-card,
.publication-card:hover {
  text-decoration: none !important;
  color: inherit !important;
}

.publication-card:hover h3,
.publication-card:hover p {
  text-decoration: none !important;
  color: inherit !important;
}

.section-label {
  font-family: 'Libre Baskerville', serif;
  font-size: 0.8em;
  font-weight: normal;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #2c2c2c;
  opacity: 0.65;
  margin: 0;
  padding: 0;
  margin-bottom: 0.7em;
  line-height: 1.0;
  display: block;
}

.section-title {
  font-family: 'Libre Baskerville', serif;
  font-size: 2.05em;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #2c2c2c;
  margin: 0;
  line-height: 1.0;
  display: block;
}

.section-underline {
  width: 240px;
  height: 1px;
  background-color: #2c2c2c;
  margin: 1.2em 0 0.9em 0;
  box-shadow: none;
}

/* ---------------------------------Footer--------------------------------- */
footer {
  background-color: #e7dfd6;
  color: #2c2c2c;
  text-align: center;
  padding: 2em 0;
  font-size: 1em;
  margin-top: 4rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2em;
}

.contact-infos {
  font-size: 1.1em;
  flex: 1 1 45%;
  color: #2c2c2c;
  padding-left: 1em;
}

.map-container {
  flex: 1 1 45%;
  margin-top: 1em;
}

/* styling for injected iframe inside .map-frame */
.map-container .map-frame iframe {
  width: 100%;
  height: 250px;
  border-radius: 10px;
  border: none;
}

.legal {
  display: flex;
  justify-content: center;
  gap: 3em;
  margin-top: 2em;
}

.legal a {
  color: inherit;
  text-decoration: none;
  font-size: 1em;
}

.legal a:hover {
  text-decoration: underline;
}

.legal-section {
  max-width: 800px;
  margin: 2em auto;
  padding: 0 1em;
}
.legal-section p {
  text-align: left;
  margin-bottom: 1em;
  font-size: 1rem;
  color: #2c2c2c;
}

#ancre-haut {
  display: block;
  position: relative;
  top: -90px;
  height: 1px;
  width: 1px;
  pointer-events: none;
}


/* ===== Halo torche fluide (opaque au départ) ===== */
@property --reveal-r {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}

#intro-overlay{
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  color: #fff;

  /* 1) NOIR OPAQUE par défaut */
  background: #000;

  /* perfs */
  will-change: opacity, -webkit-mask, mask;
  contain: paint;

  /* par défaut, on laisse cliquer au travers si la zone est ouverte (tu peux passer à auto) */
  pointer-events: none;
}

/* 2) On n’active le mask radial QUAND l’anim démarre => pas de “point” avant */
/* Durées bien plus longues + vitesse régulière (linear) */
:root{
  --intro-dur: 5600ms;      /* vitesse du rayon (augmente si encore trop rapide) */
  --intro-fade-dur: 6000ms; /* voile noir un peu plus long que le rayon */
  /* largeur des zones de dégradé autour du rayon */
  --halo-s1: 10px;   /* plume très proche du centre (avant: 28px) */
  --halo-s2: 60px;   /* transition intermédiaire (avant: 120px) */
  --halo-s3: 140px;  /* retour au noir plein (avant: 220px) */
}

#intro-overlay.revealing{
  -webkit-mask: radial-gradient(
    circle at var(--intro-x,50vw) var(--intro-y,50vh),
    transparent 0 var(--reveal-r),
    rgba(0,0,0,.10) calc(var(--reveal-r) + var(--halo-s1)),
    rgba(0,0,0,.55) calc(var(--reveal-r) + var(--halo-s2)),
    #000             calc(var(--reveal-r) + var(--halo-s3))
  );
          mask: radial-gradient(
    circle at var(--intro-x,50vw) var(--intro-y,50vh),
    transparent 0 var(--reveal-r),
    rgba(0,0,0,.10) calc(var(--reveal-r) + var(--halo-s1)),
    rgba(0,0,0,.55) calc(var(--reveal-r) + var(--halo-s2)),
    #000             calc(var(--reveal-r) + var(--halo-s3))
  );

  animation:
    intro-reveal var(--intro-dur) linear forwards,
    intro-fade   var(--intro-fade-dur) ease  forwards;
}


/* Rayon qui grandit (part de 1px pour éviter tout point de rendu) */
@keyframes intro-reveal{
  from { --reveal-r: 1px; }
  to   { --reveal-r: 160vmax; }
}

/* Le noir baisse progressivement (donne l'impression d'illumination) */
@keyframes intro-fade{
  from { opacity: 1;   }
  to   { opacity: .15; } /* ajuste .20/.10 selon goût */
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce){
  #intro-overlay{ animation: none !important; }
}







#intro-overlay .intro-center {
  position: relative;
  z-index: 1;
  text-align: center;
}

#intro-overlay .intro-title { opacity: 0; transition: opacity .8s ease; }
#intro-overlay.show-text .intro-title { opacity: 1; }
#intro-overlay.fade-text  .intro-title { opacity: 0; }

#intro-overlay .site-title {
  font-family: 'Libre Baskerville', serif;
  font-weight: 400;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  font-size: 1.5rem;
}

#intro-overlay .underline {
  width: 265px;
  height: 1px;
  margin: .215rem auto;
  background-color: #fff;
}

#intro-overlay .site-tagline {
  display: block;
  margin-top: .5rem;
  font-family: 'Libre Baskerville', serif;
  letter-spacing: .5em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

#intro-overlay .intro-defense {
  margin: 1.2rem 0 0 0;
  font-family: 'Libre Baskerville', serif;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  line-height: 1.0;
  font-size: clamp(2rem, 10vw, 6rem);
}

@media (max-width: 980px) {
  .main-container {
    padding-left: 36px;
    padding-right: 36px;
  }

  .footer-grid {
    flex-direction: column;
    padding: 1.5em 1em 3em 1em;
  }
}

@media (max-width: 768px) {
  #publications .domaines-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2em;
  }
}

@media (max-width: 600px) {
  .header-title .site-title  { font-size: 1.2rem; }
  .header-title .site-tagline { font-size: 0.9rem; letter-spacing: 0.45em; }

  .main-nav {
    left: 16px;
    right: 16px;
    width: auto;
    min-width: 260px;
    max-width: calc(100% - 32px);
  }
  .lang-accordion {
    right: 16px;
    left: auto;
    min-width: 230px;
    max-width: calc(100% - 32px);
  }

  .main-container { padding-left: 10px; padding-right: 10px; }
  .menu-btn, .globe-btn { top: 50%; transform: translateY(-50%); }
  .menu-btn { left: 16px; }
  .globe-btn { right: 16px; }
  .presentation-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1em;
    max-width: none;
    width: 100%;
    margin: 0;
  }

  .portrait, .ouvrage { justify-content: center; width: 100%; }
  .portrait-img, .ouvrage-img { width: 100%; max-width: 100%; display: block; margin: 0 auto; }

  .ouvrage-img { max-width: 85%; }
  .ouvrage { flex-direction: column; align-items: center; text-align: center; margin-top: 2em; }
  .ouvrage-credit { margin-top: 1em; text-align: center; font-size: 1rem;  padding: 0 1em; }
  .bio, .infos { text-align: left; padding-left: 0; padding-right: 0; }
  .domaines-grid { padding-left: 0; padding-right: 0; margin: 0; }
  .legal-section, main, section { padding-left: 1rem; padding-right: 1rem; }
}

@media (max-width: 480px) {
  .main-container {
    padding-left: 8px;
    padding-right: 8px;
  }
}

.main-nav.no-transition,
.lang-accordion.no-transition {
  transition: none !important;
  height: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}


/* 1) Clip strict quand le panneau est ouvert (desktop + mobile) */
.main-nav.open, .main-nav.is-open,
.lang-accordion.open, .lang-accordion.is-open {
  overflow: hidden !important;   /* empêche tout dépassement du fond gris */
}

/* 2) Le panneau langues doit aussi "clipper" et avoir le même arrondi */
.lang-accordion {
  border-radius: 8px;            /* aligne avec .main-nav */
  overflow: hidden;              /* clip permanent */
}

/* (optionnel) Si tu veux garder 4px au lieu de 8px côté langues, supprime la ligne border-radius ci-dessus */


/* ===== Burger : 3 barres → 1 barre (ouvert) ; fermeture = rotation 90°→0° puis retour au burger ===== */

/* Base + état ouvert (quart de tour) */
.menu-btn{
  --mb-rot: 0deg;
  transform: translateY(-50%) rotate(var(--mb-rot));
  transition: transform .28s cubic-bezier(.22,1,.36,1);
  position: absolute;
}
.menu-btn.is-active,
.menu-btn[aria-expanded="true"]{
  --mb-rot: 90deg; /* vertical quand ouvert */
}

/* FERMETURE : garder la barre unique et ROTER 90° → 0° (vertical → horizontal) */
.menu-btn.was-active:not(.is-active){
  animation: mb-close-to-horizontal .30s cubic-bezier(.22,1,.36,1) both;
}
@keyframes mb-close-to-horizontal{
  from { transform: translateY(-50%) rotate(90deg); }  /* vertical */
  to   { transform: translateY(-50%) rotate(0deg); }   /* horizontal */
}

/* Morph : 3→1 barres quand actif OU en phase de fermeture (was-active) */
.menu-btn span{
  transition:
    transform .24s cubic-bezier(.22,1,.36,1),
    width     .24s cubic-bezier(.22,1,.36,1),
    opacity   .16s ease;
  transform-origin: center center;
  border-radius: 2px;
}
.menu-btn.is-active span:nth-child(1),
.menu-btn.was-active  span:nth-child(1),
.menu-btn[aria-expanded="true"] span:nth-child(1){
  transform: translateY(8px) scaleX(0);
  opacity: 0;
}
.menu-btn.is-active span:nth-child(2),
.menu-btn.was-active  span:nth-child(2),
.menu-btn[aria-expanded="true"] span:nth-child(2){
  transform: translateY(0) scaleY(1.55); /* ~2px → ~3.1px */
  width: 100%;
  opacity: 1;
}
.menu-btn.is-active span:nth-child(3),
.menu-btn.was-active  span:nth-child(3),
.menu-btn[aria-expanded="true"] span:nth-child(3){
  transform: translateY(-8px) scaleX(0);
  width: 100%;
  opacity: 0;
}

/* (Optionnel) halo discret pendant l’état actif/fermeture */
.menu-btn::after{
  content:""; position:absolute; inset:-8px -10px; border-radius:12px;
  border:1px solid currentColor; opacity:0; transform: scale(.94) rotate(0);
  transition: opacity .22s ease, transform .32s cubic-bezier(.22,1,.36,1);
}
.menu-btn.is-active::after,
.menu-btn.was-active::after,
.menu-btn[aria-expanded="true"]::after{
  opacity:.10; transform: scale(1) rotate(90deg);
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce){
  .menu-btn, .menu-btn::after, .menu-btn span{ transition:none !important; animation:none !important; }
}

.intro-skip #intro-overlay { display: none !important; }

.menu-btn, .globe-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
