/* Site-specific adjustments. Edit this file for layout changes. */
/* Bootstrap 3 uses 768px and 992px breakpoints. Keep tablets fluid. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
img { max-width: 100%; }
a:focus-visible, button:focus-visible { outline: 2px solid #286090; outline-offset: 3px; }
#about, #experience, #work, #contact { scroll-margin-top: 85px; }
.promo-block { overflow: hidden; }
.promo-block .promo-block-title { font-size: clamp(42px, 5vw, 70px); }
.promo-block .promo-block-img-wrap { height: 400px; }
.promo-block .promo-block-img { height: auto; max-height: 540px; width: auto; max-width: 100%; object-fit: contain; }
.publication-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 20px 0 36px; }
.publication-card { position: relative; min-width: 0; padding: 22px 24px; background: #fafafa; border: 1px solid #edf0f2; display: flex; flex-direction: column; }
.publication-card h3 { font-size: 19px; line-height: 1.35; margin: 0 0 10px; overflow-wrap: anywhere; }
.publication-card p { margin-bottom: 10px; }
.publication-authors { font-size: 13px; color: #777; }
.publication-description { flex: 1; }
.publication-meta { font-size: 13px; color: #777; }
.publication-link { align-self: flex-start; font-weight: 600; text-decoration: underline; }
/* Tablet: avoid oversized portrait, clipped columns and desktop-only hover effects. */
@media (min-width: 768px) and (max-width: 1199px) {
  .promo-block { padding-top: 150px; }
  .promo-block .promo-block-img-wrap { height: 310px; }
  .promo-block .promo-block-img { max-height: 370px; }
  .promo-block .promo-block-text { font-size: 20px; }
  .paper, .papers { padding-left: 0; padding-right: 0; }
  .conf-infos { width: 100%; }
  .conf-descrcont { position: static; opacity: 1; height: auto; width: 100%; padding: 15px 22px; }
  .conf-info1, .conf-info2, .conf-info3 { transform: none !important; }
  .logoconfcont { width: 100%; }
  .textconf { width: 100%; }
}
@media (max-width: 991px) {
  .publication-grid { grid-template-columns: 1fr; }
  .content-lg { padding-top: 55px; padding-bottom: 55px; }
  .lastcont-computer .col-xs-6 { overflow-wrap: anywhere; }
}
@media (max-width: 767px) {
  .promo-block { padding-top: 115px; }
  .promo-block .promo-block-img-wrap { display: none; }
  .promo-block .promo-block-title { font-size: clamp(42px, 11vw, 58px); }
  .promo-block .promo-block-text { font-size: 19px; }
  .petitetete { width: min(180px, 45%); }
  .foret { display: none; }
  .publication-card { padding: 20px; }
  .conf-infos { width: 100%; }
  .conf-descrcont { position: static; opacity: 1; width: 100%; height: auto; padding: 15px 20px; }
  .lastcont-mobile { overflow-wrap: anywhere; }
  .lastcont-computer { display: none; }
  .lastcont-mobile { position: static; height: auto; visibility: visible; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Scrollable publications: exactly four cards in view (2 x 2 on wide screens).
   Change --publication-row-height to adjust card size. */
.publication-grid {
  --publication-row-height: 300px;
  grid-auto-rows: minmax(var(--publication-row-height), auto);
  max-height: calc(2 * var(--publication-row-height) + 18px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  padding-right: 8px;
  align-content: start;
}
/* Cards grow to fit their content; only the publication grid scrolls. */
.publication-card { overflow: visible; height: auto; }
.publication-scroll-hint { font-size: 13px; color: #777; margin-bottom: 4px; }
@media (max-width: 991px) {
  /* Four stacked cards on tablets and phones. */
  .publication-grid {
    --publication-row-height: 305px;
    max-height: calc(4 * var(--publication-row-height) + 3 * 18px);
  }
}
