/* ================================
   QUI SOMMES NOUS
   Modern · Elegant · Academic
   ================================ */

/* ------------------------------------------------------------------ */
/*  Keyframes                                                         */
/* ------------------------------------------------------------------ */

@keyframes about-hero-breathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.03); }
}

@keyframes about-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

/* ------------------------------------------------------------------ */
/*  Section 1 – Hero                                                  */
/* ------------------------------------------------------------------ */

.about-hero {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--color-text);
    scroll-margin-top: calc(var(--header-height) + 10px);
}

.about-hero__background {
    position: absolute;
    inset: 0;
    background-image: url('../images/banner/qsn-bannerImage.png');
    background-size: contain;
    background-position: center top;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.about-hero__background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(10, 20, 15, 0.82) 0%,
        rgba(10, 20, 15, 0.55) 45%,
        rgba(10, 20, 15, 0.25) 100%
    );
    z-index: 1;
}

.about-hero__spacer {
    display: block;
    width: 100%;
    padding-top: 56.25%;
}

.about-hero__content {
    position: absolute;
    bottom: 8%;
    left: 3%;
    z-index: 2;
    max-width: 780px;
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

.about-hero__content--visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.about-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.8rem, 5.5vw, 4.5rem);
    font-weight: 800;
    color: white;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    white-space: nowrap;
}

.about-hero__subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
}

.about-hero__description {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    max-width: 580px;
}

.about-hero__typed {
    display: inline;
}

.about-hero__cursor {
    display: inline-block;
    color: var(--color-accent);
    animation: cursor-blink 0.8s step-end infinite;
    margin-left: 2px;
    font-weight: 300;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.hero-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ------------------------------------------------------------------ */
/*  Section 2 – Team                                                  */
/* ------------------------------------------------------------------ */

/* ── Section wrapper ── */


/* ------------------------------------------------------------------ */
/*  Section 3 – Partners                                              */
/* ------------------------------------------------------------------ */

.about-partners {
    padding: 80px 5%;
    background: var(--color-bg);
    scroll-margin-top: calc(var(--header-height) + 10px);
}

.about-partners__container {
    max-width: var(--container-max);
    margin: 0 auto;
}

.about-partners__title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.about-partners__title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--color-accent);
    margin: 16px auto 0;
    border-radius: 2px;
}

.about-partners__showcase {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 3rem;
    align-items: flex-start;
}

.about-partners__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    width: 165px;
    height: 165px;
    border-radius: 36px;
    background: white;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.06);
    transition: border-radius 0.45s ease,
                box-shadow 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(20px);
}

.about-partners__item--visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease,
                border-radius 0.45s ease,
                box-shadow 0.3s ease;
}

.about-partners__item:hover,
.about-partners__item:focus {
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14);
}

.about-partners__card-media {
    flex-shrink: 0;
    width: 165px;
    height: 165px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    background: white;
}

.about-partners__logo-img {
    max-width: 100%;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.about-partners__initials {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
    letter-spacing: -0.02em;
}

.about-partners__arr {
  display: none;
}

.about-partners__empty {
    color: #999;
    font-style: italic;
    text-align: center;
    width: 100%;
    padding: 2rem 0;
}

/* No-info card: just glow on hover, no expand */
.about-partners__item.no-info:hover {
    box-shadow: 0 0 0 3px rgba(52,120,61,0.3),
                0 8px 24px rgba(0,0,0,0.12);
}

/* Hover popup card — hidden by default */
.about-partners__hover {
  display: none;
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  width: 330px;
  background: #ffffff;
  border: 1.5px solid #1D9E75;
  border-radius: 12px;
  padding: 18px;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.about-partners__hover::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #1D9E75;
}

@media (hover: hover) {
  .about-partners__item:hover {
    border-color: #1D9E75;
    box-shadow: 0 0 0 2px rgba(29, 158, 117, 0.15);
  }
  .about-partners__item:hover .about-partners__hover {
    display: block;
  }
}

.about-partners__hover-logo {
  width: 100%;
  height: 135px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f6fa;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.about-partners__hover-logo img {
  max-width: 100%;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.about-partners__hover-initials {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-accent);
}

.about-partners__hover-name {
  font-size: 13px;
  font-weight: 600;
  color: #1a3c2e;
  text-align: center;
  line-height: 1.4;
  margin: 0;
}

.about-partners__item.no-info:hover .about-partners__logo-img {
    transform: scale(1.06);
    transition: transform 0.4s ease;
}

.about-partners__item.no-info:hover .about-partners__initials {
    color: #1a5c2a;
    transition: color 0.3s ease;
}

/* ---- Carousel: 3 cards (tablet 900px) ---- */
@media (max-width: 900px) {
  .about-partners__carousel-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .about-partners__carousel-track {
    justify-content: flex-start !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    gap: 16px;
    padding: 12px 0;
    padding-left: 0;
    scroll-padding-left: 0;
    /* scroll-behavior: smooth; */
    flex: 1;
  }

  .about-partners__carousel-track::-webkit-scrollbar {
    display: none;
  }

  .about-partners__carousel-track .about-partners__item {
    flex: 0 0 calc((100% - 32px) / 3);
    scroll-snap-align: start;
  }

  .about-partners__arr {
    display: flex;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: #1a3c2e;
    transition: background 0.2s;
  }

  .about-partners__arr:hover {
    background: #f0f0f0;
  }
}

/* ---- Carousel: 2 cards (mobile 600px) ---- */
@media (max-width: 600px) {
  .about-partners__carousel-track .about-partners__item {
    flex: 0 0 calc((100% - 16px) / 2);
  }
}

@media (max-width: 480px) {
    .about-partners__item {
        width: 140px;
        height: 140px;
    }
    .about-partners__card-media {
        width: 140px;
        height: 140px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .about-partners__item {
        transition: box-shadow 0.3s ease;
    }
}

/* ------------------------------------------------------------------ */
/*  Section 4 – CTA                                                   */
/* ------------------------------------------------------------------ */

.about-cta {
    position: relative;
    padding: 120px 5%;
    background: linear-gradient(135deg, #0a3715 0%, #1a5c2a 50%, #0f3d2e 100%);
    overflow: hidden;
    text-align: center;
    scroll-margin-top: calc(var(--header-height) + 10px);
}

.about-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(255, 255, 255, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.about-cta__content {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
    opacity: 0;
    transform: translate3d(0, 40px, 0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.about-cta__content--visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.about-cta__title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    color: var(--color-white);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.about-cta__description {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.about-cta__action {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.about-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-white);
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.about-cta__btn:hover {
    background: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

/* ------------------------------------------------------------------ */
/*  Tablet (768px and below)                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 768px) {

    .about-hero__title {
        white-space: normal;
        font-size: clamp(2rem, 6vw, 3rem);
    }

    .about-hero__content {
        left: 4%;
        max-width: 90%;
    }

    .about-partners {
        padding: 70px 5%;
    }

    .about-cta {
        padding: 80px 5%;
    }
}

/* ------------------------------------------------------------------ */
/*  Accessibility – reduced motion                                    */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
    .about-hero__content,
    .about-cta__content {
        transition: none !important;
        animation: none !important;
    }

    .about-hero__content--visible,
    .about-cta__content--visible {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ------------------------------------------------------------------ */
/*  Responsive (380px)                                                */
/* ------------------------------------------------------------------ */

@media (max-width: 380px) {
    .about-hero__title {
        font-size: clamp(1.4rem, 7vw, 2rem);
        line-height: 1.2;
        white-space: normal;
        word-break: break-word;
        min-height: unset;
    }

    .about-hero__subtitle {
        font-size: clamp(0.75rem, 3.5vw, 0.9rem);
        margin-top: 8px;
    }

    .about-hero__content {
        padding: 12px 16px;
        gap: 8px;
    }
}

/* ------------------------------------------------------------------ */
/*  Mobile (480px and below)                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 480px) {

    .about-partners {
        padding: 50px 4%;
    }

    .about-cta {
        padding: 60px 4%;
    }
}

/* Hide subtitle and description in about-hero — all screen sizes */
.about-hero__subtitle,
.about-hero__description {
  display: none !important;
}

/* Mission card below about-hero */
.about-mission-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 1.25rem;
  padding: 1.5rem 2rem;
  max-width: 720px;
  margin: -2.5rem auto 0 auto;
  position: relative;
  z-index: 10;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.about-mission-card p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-dark, #1a1a1a);
}

@media (max-width: 600px) {
  .about-mission-card {
    margin: -1.5rem 1rem 0 1rem;
    padding: 1.25rem 1.25rem;
  }
}

/* ------------------------------------------------------------------ */
/*  Org Chart Section                                                  */
/* ------------------------------------------------------------------ */

#orgchart-section {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
    padding: 32px 15px 32px 32px;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    z-index: 1;
    justify-content: center;
}

.orgchart-section__container {
  max-width: 1200px;
  margin-top: 25px;
  margin: 10px auto;
}

.orgchart-section-title {
    width: 100%;
    text-align: center;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--color-text, #1a1a1a);
    margin: 0 0 24px 0;
    flex-basis: 100%;
}

.orgchart-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

#orgchart-container {
    display: inline-block;
    align-self: flex-start;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    overflow: auto;
    padding: 24px;
    background: #fff;
    max-height: 70vh;
    max-width: calc(100% - 390px);
    min-width: 300px;
    flex: 1;
}

#orgchart-container .orgchart .node .title {
    width: 160px !important;
    font-size: 13px !important;
    height: 24px !important;
    line-height: 24px !important;
}
#orgchart-container .orgchart .node .content {
    width: 160px !important;
    font-size: 11px !important;
    height: 22px !important;
    line-height: 22px !important;
}
#orgchart-container .orgchart .node img {
    width: 70px !important;
    height: 70px !important;
}
#membre-profile-card {
    flex: 0 0 360px;
    width: 360px;
    height: 500px;
    margin-right: 15px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    background: #f0ecec;
    position: relative;
    align-self: flex-start;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: box-shadow 0.3s ease;
    perspective: 800px;
}

#membre-profile-card .card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
    position: absolute;
    inset: 0;
    transition: transform 0.4s ease;
}

#membre-profile-card .card-photo-placeholder {
    width: 100%;
    height: 100%;
    background: #9c9999;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    font-size: 14px;
    position: absolute;
    inset: 0;
}

#membre-profile-card .card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to bottom,
      transparent 30%,
      rgba(0,0,0,0.85) 100%
    );
    z-index: 1;
    transition: background 0.3s ease;
}

#membre-profile-card:hover .card-gradient {
    background: linear-gradient(
      to bottom,
      rgba(209, 152, 152, 0.15) 0%,
      rgba(63, 52, 52, 0.92) 90%
    );
}

#membre-profile-card .card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 16px;
    color: #000000;
    max-height: 60%;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

#membre-profile-card .card-name {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 2px;
    color: #fff;
    line-height: 1.2;
}

#membre-profile-card .card-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--green, #2eb87e);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 8px;
}

#membre-profile-card .card-bio {
    font-size: 12px;
    color: rgba(255,255,255,0.82);
    line-height: 1.5;
    margin: 0 0 6px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

#membre-profile-card:hover .card-bio {
    max-height: 120px;
    overflow-y: auto;
}

#membre-profile-card .card-email {
    font-size: 11px;
    color: var(--green, #2eb87e);
    text-decoration: none;
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#membre-profile-card:hover .card-email {
    max-height: 30px;
}

#membre-profile-card .card-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 26px;
    text-align: center;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#membre-profile-card .profile-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    color: #000000;
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 899px) {
    #orgchart-section {
        flex-direction: column;
        align-items: center;
        padding: 16px;
    }
    #orgchart-container {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none !important;
        min-width: unset;
        flex: none;
        overflow: hidden;
        padding: 12px;
        box-sizing: border-box;
    }
    #membre-profile-card {
        width: 280px !important;
        height: 380px !important;
        flex: none;
        align-self: center;
        margin-top: 16px;
        margin-right: 0 !important;
    }
}

@media (max-width: 480px) {
    #orgchart-container {
        max-height: none;
        overflow: hidden;
        padding: 8px;
    }
    #membre-profile-card {
        width: 240px !important;
        height: 320px !important;
    }
}
