@font-face{
  font-family: "agency";
  src: url(assets/font/agencyfb.ttf)
}

/* ==================== Base Styles ==================== */
:root {
  --primary-color: #444;
  --text-color: #222;
  --font-family: 'Helvetica Neue', sans-serif;
  --content-width: 1200px;
  --content-padding: 1.5rem;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
}

.page-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    position: relative; /* Make this the anchor for absolute children */
    overflow-x: hidden;
}


.content-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--content-padding);
  position: relative;
  width: calc(100% - 70px);
}


/* ==================== Navigation ==================== */
.main-nav {
    height: 3.5rem;
    line-height: 3.5rem;
    overflow: visible;
    position: absolute;
    top: 70%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2;
    padding: 1rem 0;
    max-width: 1600px; /* Match hero max-width */
    margin: 0 auto; /* Center the nav */
}

/* Add the blue bar with max-width */
.main-nav::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.1rem;
    z-index: 1;
    max-width: 1600px; /* Match hero max-width */
    margin: 0 auto; /* Center the blue bar */
}

.nav-container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--content-padding);
}

.nav-items {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2rem;
    height: 3.5rem;

}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    font-weight: bold;
    text-shadow: 0.5px 0.5px 1px rgba(0,0,0,0.3);
}

.nav-link.active.platform-link {
    font-size: 5rem !important;
    font-weight: 700 !important;
    padding-bottom: 0.15em;
    line-height: 1;        /* prevents text from making the nav bar taller */
    margin-top: -0.3em;    /* (optional) pulls enlarged text up */
    margin-bottom: -0.3em; /* (optional) pulls enlarged text down */
    font-family: agency;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.language-toggle {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.language-toggle button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.language-toggle button:hover {
    opacity: 1;
}

.flag-icon {
    width: 24px;
    height: 16px;
    display: block;
}

/* ==================== Hero Section ==================== */
.hero {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    max-width: 1600px;
    margin: 0;  /* Remove auto margin */
    padding: 0; /* Ensure no padding */
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* Remove any potential inline spacing */
    margin: 0; /* Ensure no margins */
}

/* ==================== MaSCLogo ==================== */
.hero-logo {
    position: absolute;
    top: 3rem;
    right: 0%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 1.5rem;
    padding: 0rem 0rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
}

.hero-logo img {
  height: 150px;        /* Adjust size as needed */
  width: auto;
  display: block;
}

/* =========================================================*/

.content-wrapper {
  display: block;              /* ← Plus de flexbox ici */
  position: relative;
  width: 100%;
}

.main-content {
  margin-left: 300px;          /* Réserve la place pour les team-leaders */
  padding-left: 0;
  max-width: none;
  width: auto;
}

/* ==================== Section Styles ==================== */
section {
  padding: 1rem 0;
}

.directors, .logos-grid, .team-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: start;
}

.director-card, .team-member {
  text-align: center;
  max-width: 160px;
}

.logos-grid img {
  max-height: 80px;
  
}

.pub-frame {
  width: 100%;
  border: none;
}

/* ==================== Publication List ==================== */
.pub-list {
    list-style: none;
    padding: 0 !important;
    margin: 0;
    font-family: 'Helvetica Neue', sans-serif !important;
    font-size: 1rem;
    color: #222; /* fallback if var(--text-color) is not defined in iframe */
}
.pub-list li {
    margin-bottom: 0rem;
    padding: 0.5rem;
}
.pub-list li a {
    text-decoration: none;
    color: #222;
    font-weight: bold;
}
.pub-list li a:hover {
    color: #444;
}

/* ==================== Language Toggle ==================== */
.language-toggle {
  text-align: right;
  padding: 1rem;
}

.language-toggle button {
  background: none;
  border: none;
  padding: 0;
  margin: 0 0.5rem;
  cursor: pointer;
  border-radius: 0.3rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.language-toggle button:hover {
  opacity: 1;
}

.language-toggle button.active {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--primary-color);
}

.flag-icon {
  width: 24px;
  height: 16px;
  display: block;
  object-fit: cover;
}

/* ==================== Stats Section ==================== */
.stats-section {
    background-color: #fff4b7d2; 
    color: var(--text-color);
    height: 150px;              /* 1/4 of viewport height */
    display: flex;
    align-items: center;       /* Center content vertically */
    left: 280px;
    top: 320px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    text-align: center;
    width: 100%;
}

.stat-number {
    display: block;
    font-size: 1.5rem;          /* Slightly reduced font size */
    font-weight: bold;
    margin-bottom: 0.25rem;   /* Reduced margin */
    color: var(--primary-color);
}

.stat-label {
    font-size: 1rem;
    color: var(--text-color);
}

/* ==================== Visuals ==================== */
.content-wrapper {
    position: relative;
    display: flex;
    min-height: calc(100vh - 400px); /* Subtract hero height */
}

.vertical-bar {
    position: absolute;
    left: 200px;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 100;
    pointer-events: none;
    transform: translateZ(0);
    will-change: transform;
}

/* ==================== Presentation Section ==================== */

.intro-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  position: relative;
}

.intro-section {
    padding-right: 1rem;
    background-color: #f9f9f9;
    padding-left: 280px;
    font-size: 1.2rem;
    margin-left: 0;
    padding-top: 1rem;

    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.intro-section p,
.accordion-content,
.main-content {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.intro-section h2 {
    margin-bottom: 1rem;
}

.intro-section p {
  text-align: justify;
}

.intro-img {
  float: right;       /* or left, as you wish */
  margin: 0 0 1.5rem 2rem;
  height: 350px;
  border-radius: 1.2rem;
  box-shadow: 0 2px 10px rgba(63,152,241,0.11);
}

/* ==================== Leader Section ==================== */
.team-leaders{
    /* ①  Anchor it to the centred 1600 px wrapper, not the viewport */
    position: absolute;          /* was: fixed                           */
    top: -50px;                  /* keep the same vertical offset        */
    left: 110px;                 /* 110 px from the wrapper’s left edge  */
    width: 210px;
    z-index: 200;                /* can sit under the nav if you wish    */
    background: none;
    border: none;
}

.leader-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align to the left */
    margin-bottom: 1rem;
    text-align: left;
}

.leader-card:nth-child(odd),
.leader-card:nth-child(even) {
    flex-direction: column; /* Force same layout for both */
    margin: 0 0 2rem 0; /* Reset margins */
    padding: 0; /* Reset padding */
}

.leader-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 20;
      transition: transform 0.3s cubic-bezier(.4,1.6,.4,1);
  will-change: transform;
}

.leader-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* Ensure no extra space */
}

.leader-image:hover {
  transform: scale(1.8) rotate(-1deg);
  box-shadow: 0 8px 32px rgba(63,152,241,0.17), 0 2px 8px rgba(0,0,0,0.12);
  z-index: 3;
}

.leader-info {
    padding: 0;
    width: auto;
    margin-left: 1rem;
}

.leader-info h3 {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    font-weight: 300;
    line-height: 1.0; /* Tighter line height */
    text-align: left;
    color: #000000;
}

.leader-info h3 .leader-firstname {
    font-size: 1.1rem;
    font-weight: 400;
    display: block;
    letter-spacing: 0.01em;
    margin-bottom: 0.05em;
}
.leader-info h3 .leader-lastname {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
    letter-spacing: 0.02em;
    margin-top: 0;
    line-height: 1.05;
}

/* Split name into two lines */
.leader-info h3 span {
    display: block;
    font-size: 2rem; /* Slightly smaller for better proportion */
}

.leader-role {
    font-size: 0.7rem;
    color: #c40000;
    font-weight: 500;
    margin-top: 0.15em;
    letter-spacing: 0.01em;
    text-align: left;
    font-weight: 700;
    font-style: italic;
}

.leader-subrole,
.team-subrole {
  font-size: 0.7rem;
  color: #888;
  font-weight: 600;
  margin-top: 0.1em;
  letter-spacing: 0.01em;
  text-align: left;
  font-style: italic;
}


/* ==================== Social Networks LEAD ==================== */

.leader-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 20;
  transition: transform 0.3s cubic-bezier(.4,1.6,.4,1);
  will-change: transform;
}

.leader-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.leader-image:hover {
  transform: scale(1.8) rotate(-1deg);
  box-shadow: 0 8px 32px rgba(63,152,241,0.17), 0 2px 8px rgba(0,0,0,0.12);
  z-index: 3;
}

.leader-photo-wrap {
  position: relative;
  display: inline-block;
}

.person-social {
  position: absolute;
  bottom: -18px;     /* More negative: more overlap outside the circle */
  right: -45px;
  display: flex;
  min-width: 120px;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.22s cubic-bezier(.52,1.56,.66,.98);
}

.leader-image:hover + .person-social,
.leader-photo-wrap:hover .person-social {
  opacity: 1;
  pointer-events: auto;
}



/* ==================== Team Members ==================== */
.team-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 120px;
  text-align: center;
  font-family: var(--font-family);
  
}

.team-photo-wrap {
  position: relative;
  display: inline-block;
}
.team-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 10;
  transition: transform 0.28s cubic-bezier(.4,1.6,.4,1);
  will-change: transform;
}
.team-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.team-image:hover {
  transform: scale(1.5) rotate(-1deg);
  z-index: 3;
  box-shadow: 0 8px 24px rgba(63,152,241,0.16), 0 2px 8px rgba(0,0,0,0.10);
}
/* SOCIAL ICONS FOR TEAM */
.team-person-social {
  position: absolute;
  bottom: -12px;
  right: -12px;
  display: flex;
  gap: 6px;
  min-width: 90px;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.22s cubic-bezier(.52,1.56,.66,.98);
}
.team-image:hover + .team-person-social,
.team-photo-wrap:hover .team-person-social {
  opacity: 1;
  pointer-events: auto;
}
.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  display: block;
  box-shadow: 0 1px 4px rgba(63,152,241,0.09);
  transition: box-shadow 0.2s, transform 0.2s;
}

/* ============== Image Cards =============*/

.cards-sidebar {
  float: right;
  width: 400px;
  max-width: 100%;
  margin-left: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0rem;
  clear: none;
  position: relative;          /* plus de sticky ici */
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card-gallery {
  background: var(--card-bg, #f2f7fc);
  border-radius: 2rem;
  box-shadow: 0 2px 16px rgba(63,152,241,0.09);
  padding: 1rem 1.5rem;
  margin-bottom: 0rem;
  margin-top: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition: box-shadow 0.3s;
  position: relative;
}

.card-gallery[data-type="slideshow"] {
  padding: 0; /* or match other cards: 1rem 1.5rem */
}


.card-gallery-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  letter-spacing: 0.03em;
}

.card-gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.2rem;
  justify-content: center;
}

.card-gallery-item {
  position: relative;
  flex: 1 0 45%;
  max-width: 48%;
  aspect-ratio: 1.5 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 0.5rem;
  border-radius: 0;   /* Remove rounding */
  background: none;   /* Remove background */
  box-shadow: none;   /* Remove shadow */
  border: none;       /* Remove border */
}

.card-gallery-item.one-image {
  flex-basis: 100%;
  max-width: 100%;
  aspect-ratio: 2.5/1;
}

.card-gallery-item.tall {
  aspect-ratio: 0.7/1;
}

.card-gallery-item img {
  width: 100%;
  height: auto;
  max-height: 90px;
  object-fit: contain;
  transition: transform 0.16s cubic-bezier(.4,1.3,.4,1);
  display: block;
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.card-gallery-item:hover img {
  transform: scale(1.09);
}

.card-gallery-caption {
  position: static;
  margin-top: 0.4em;
  padding: 0 0.2em;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  font-size: 0.78em;
  line-height: 1.15;
  transition: opacity 0.13s cubic-bezier(.4,1.5,.4,1);
  color: #333;
  background: none;
  border: none;
}

.card-gallery-item:hover .card-gallery-caption {
  opacity: 1;
  pointer-events: auto;
}

.card-caption-title {
  font-size: 1.07em;
  font-weight: 600;
  color: var(--platform-color, rgb(90, 90, 90));
  line-height: 1.12;
  background: none;
}
.card-caption-desc {
  font-size: 0.94em;
  color: #555;
  font-weight: 400;
  margin-top: 0.07em;
  background: none;
}

/* ==================== Card gallery ==================== */

.card-gallery[data-type="slideshow"] {
  --card-bg: #fff;
  border: none;
  /* border-radius: 2rem; */
  box-shadow: none;
  /* padding: 1rem 1.5rem; */
}

/* ==================== Slideshow ==================== */
/* Slideshow Wrapper */
.slideshow {
  position: relative;
  max-width: 100%;
  height: 350px;
  overflow: hidden;
}

/*  Dynamic Slideshow Container  */
.slideshow-container {
  width: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 1.6rem;
  overflow: hidden;
}

/*  Slide Images (Manual & Dynamic)  */
.slideshow img,
.slideshow-image {
  width: 100%;
  object-fit: cover;
  display: none;
  border-radius: 1.2rem;
}

/* Manual slideshow fixed height */
.slideshow img {
  height: 350px;
}

/* Dynamic slideshow max height */
.slideshow-image {
  max-height: 350px;
}

/* Show only the active slide */
.slideshow img.active,
.slideshow-image.active {
  display: block;
}

/* ==================== Manual Navigation Buttons ==================== */
.slideshow .prev-slide,
.slideshow .next-slide {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 1.5rem;
  z-index: 10;
}

.slideshow .prev-slide { left: 10px; }
.slideshow .next-slide { right: 10px; }

/* ==================== Dynamic Navigation Buttons ==================== */
.slideshow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #888;
  font-size: 2em;
  cursor: pointer;
  opacity: 0.75;
  padding: 0 0.12em;
  border-radius: 0;
  z-index: 10;
  transition: color 0.18s, opacity 0.18s;
}

.slideshow-btn:hover {
  opacity: 1;
}

.slideshow-btn.prev-slide { left: 10px; }
.slideshow-btn.next-slide { right: 10px; }

/* ==================== Slide Captions ==================== */
.slideshow-caption {
  text-align: center;
  font-size: 1em;
  color: #333;
  margin-top: 0.2em;
  padding: 0.2em 0;
  min-height: 1.4em;
}

/* ==================== ???? ==================== */

.content-container h2 {
  margin-bottom: 1rem;
}

/* ==================== Accordion ==================== */

.accordion-section {
  background-color: #f9f9f9;
  width: 100%;     /* Just fill .main-content */
  padding: 2rem 0;
  box-sizing: border-box;
}

.accordion-header {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.accordion-arrow {
  font-size: 1.5rem;
  color: var(--platform-color);
  margin-right: 1rem;
  transition: transform 0.3s ease;
}

.accordion-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0;
}

.accordion-content {
  padding-left: 2.5rem;
  display: block;
}

.accordion-item:not(.open) .accordion-content {
  display: none;
}

.accordion-item:not(.open) .accordion-arrow {
  transform: rotate(-90deg); /* Point right */
}

/* ==================== Legal Section ==================== */

.legal-section {
  padding: 0;
  font-size: 1rem;
  color: #333;
}

.legal-section h2 {
  color: var(--primary-color); /* platform color (via theme) */
  margin-bottom: 1rem;
}

.legal-section p {
  text-align: justify;
  margin-bottom: 1rem;
}

.legal-section a {
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
}
.legal-section a:hover {
  color: #000;
  text-decoration: none;
}

@media (max-width: 1000px) {
  .intro-img {
    max-width: 100%;
    height: auto;
    float: none;
    display: block;
    margin: 1rem auto;
  }
}

@media screen and (max-width: 900px) {
  .intro-section {
    margin-left: 0;
    width: 100%;
    padding: 1.5rem 1rem;
  }

  .content-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  .intro-img {
    float: none;
    display: block;
    margin: 1rem auto;
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  /* Optional: hide leader column entirely */
  .team-leaders {
    display: none;
  }
    .main-content {
    margin-left: 0;
    padding: 0 1rem;
    max-width: 100%;
  }

  .content-container {
    margin-left: 0;
    padding: 0 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .accordion-section {
    padding-left: 0;
    padding-right: 6px;
  }

  /* Optional: allow cards-sidebar to stack below or hide */
.cards-sidebar {
  float: none;
  width: 100%;
  margin-left: 0;
  padding: 0;
  position: static;               /* disable sticky */
  display: block;                 /* override flex */
  box-sizing: border-box;
}
}

.vertical-bar {
  transition: opacity 0.3s ease;
}

.media {
  display: block;
  width: 100%;
  max-width: 800px;
  height: auto;
  margin: 2rem auto;            /* ← centers it */
  border-radius: 1.2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.media-figure {
  max-width: 80%;
  margin: 2rem auto;
  text-align: center;
}

.media-figure figcaption {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: #444;
  font-style: italic;
}

@media screen and (max-width: 1300px) {
.media-figure {
  max-width: 100%;
}
}
@media screen and (max-width: 900px) {
  .vertical-bar {
    opacity: 0;
    pointer-events: none;
  }

  html, body {
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .page-wrapper {
    overflow-x: auto;
    max-width: 100%;
  }
}



@media screen and (max-width: 600px) {
  .content-wrapper {
    display: flex;
    flex-direction: column; /* ← stack children vertically */
  }

  .nav-items {
      gap: 1rem;
  }
  
  :root {
    --content-padding: 1rem;
  }

  .cards-sidebar {
    order: 5; /* show after team and before accordion */
    float: none;
    width: 100%;
    padding: 1rem;
    margin: 2rem 0;
    position: static;
  }

  .main-content {
    order: 2;
    margin-left: 0;
    width: 100%;
  }

  section {
    padding-right: 10px;
  }

  .content-container {
    padding-right: 2rem;
    padding-left: 1rem;
    box-sizing: border-box;
  }
}








