/* ============================================================
   CSS Custom Properties (Design Tokens)
   ============================================================ */
:root {
  --color-brand-primary:        #007461;
  --color-brand-secondary-bg:   #e7f2e6;
  --color-brand-secondary-text: #389294;
  --color-text-primary:         #181d27;
  --color-text-secondary:       #414651;
  --color-text-quaternary:      #717680;
  --color-bg-footer:            #0a0d12;
  --color-border-primary:       #d5d7da;
  --color-tabnav-active-bg:     #f3faf8;
  --color-footer-text:          #ececed;

  --font-display: 'Montserrat', sans-serif;
  --font-body:    'Open Sans', sans-serif;
  --font-tab:     'Inter', sans-serif;

  --metanav-height: 0px;
  --header-height:  72px;
  --header-offset:  var(--header-height);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-primary);
  background: #fff;
  padding-top: var(--header-offset);
}

img {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ============================================================
   Mobile Menu Drawer
   ============================================================ */
.mobile-menu__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-menu__backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: #fff;
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.mobile-menu.is-open {
  transform: translateX(0);
}

.mobile-menu__header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--color-border-primary);
}

.mobile-menu__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--color-text-primary);
}

.mobile-menu__items {
  padding: 24px 0;
  flex: 1;
}

.mobile-menu__item {
  display: block;
  padding: 16px 24px;
  font-family: var(--font-tab);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--color-text-secondary);
}

.mobile-menu__item--active {
  color: var(--color-brand-primary);
}

/* ============================================================
   Meta Nav
   ============================================================ */
.meta-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--metanav-height);
  background: #efefef;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 40px;
  overflow: hidden;
}

.meta-nav__items {
  display: flex;
  gap: 20px;
  align-items: center;
  height: 34px;
}

.meta-nav__item {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  position: relative;
  display: flex;
  align-items: center;
  height: 34px;
}

.meta-nav__item--selected::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-brand-primary);
}

/* ============================================================
   Site Header
   ============================================================ */
.site-header {
  position: fixed;
  top: var(--metanav-height);
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #fff;
  border-bottom: 1px solid var(--color-border-primary);
  z-index: 90;
}

.site-header__container {
  height: 100%;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__logo {
  display: flex;
  align-items: center;
}

.site-header__logo img {
  display: block;
}

.site-header__mobile-controls {
  display: none;
  align-items: center;
  gap: 8px;
}

.site-header__account-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-brand-primary);
  color: #fff;
  border-radius: 9999px;
  flex-shrink: 0;
}

.site-header__menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 8px;
  color: var(--color-text-primary);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  display: flex;
  height: 640px;
  overflow: hidden;
  background: var(--color-brand-secondary-bg);
}

.hero__text-panel {
  flex: 1;
  min-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}

.hero__text-content {
  max-width: 720px;
  width: 100%;
  padding: 32px 80px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 60px;
  letter-spacing: -0.96px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 24px;
}

.hero__description {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 28px;
  color: var(--color-text-primary);
}

.hero__image-panel {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.hero__image-inner {
  position: absolute;
  inset: 0;
}

/* Hero image frames */
.hero__image-frame {
  position: absolute;
  width: 100%;
  height: 100%;
}

.hero__image-frame--overlay {
  position: absolute;
  width: 100%;
  height: 100%;
}

.hero__image-frame--overlay-entreprise {
  position: absolute;
  width: 100%;
  height: 100%;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   Tab Navigation  (sticky)
   ============================================================ */
.tabnav-container {
  position: sticky;
  top: var(--header-offset);
  background: #fff;
  border-bottom: 1px solid var(--color-border-primary);
  z-index: 80;
  padding: 16px 40px;
}

.tabnav {
  display: flex;
  gap: 4px;
  max-width: 1280px;
  margin: 0 auto;
}

.tabnav__tab {
  flex: 1;
  font-family: var(--font-tab);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: var(--color-text-quaternary);
  padding: 16px;
  border-radius: 9999px;
  background: transparent;
  white-space: nowrap;
  height: 56px;
  transition: background 0.2s, color 0.2s;
}

.tabnav__tab--active {
  background: var(--color-tabnav-active-bg);
  color: var(--color-brand-secondary-text);
  font-family: var(--font-tab);
}

/* ============================================================
   Content Panels & Animations
   ============================================================ */

/* Desktop / tablet : fade + slide-up */
@keyframes contentEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-panel--enter {
  animation: contentEnter 0.3s ease forwards;
}

/* Mobile swipe animations */
@keyframes slideFromRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideFromLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.tab-slide-from-right {
  animation: slideFromRight 0.32s ease forwards;
}

.tab-slide-from-left {
  animation: slideFromLeft 0.32s ease forwards;
}

/* ============================================================
   Content Section
   ============================================================ */
.content-section {
  padding: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

/* ============================================================
   Section Header
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 1280px;
  width: 100%;
}

.section-header__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: var(--color-brand-secondary-bg);
  border-radius: 9999px;
  overflow: hidden;
  flex-shrink: 0;
}

.section-header__title {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 44px;
  letter-spacing: -0.72px;
  font-weight: 700;
  color: var(--color-brand-primary);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-brand-primary);
  color: #fff;
}

.btn--primary:hover {
  opacity: 0.9;
}

/* ============================================================
   Link Arrow
   ============================================================ */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: var(--color-brand-secondary-text);
  text-decoration: none;
}

.link-arrow:hover {
  text-decoration: underline;
}

.link-arrow svg {
  flex-shrink: 0;
}

.link-arrow--tertiary {
  color: #008d73;
}

/* ============================================================
   Cards
   ============================================================ */
.cards {
  display: flex;
  gap: 24px;
  max-width: 1280px;
  width: 100%;
}

.card {
  flex: 1;
  display: flex;
  min-height: 400px;
  border-radius: 24px;
  background: var(--color-brand-secondary-bg);
  overflow: hidden;
  padding: 24px;
  gap: 40px;
}

.card__image-wrap {
  width: 208px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
}

.card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 20px;
  min-width: 0;
}

.card__title {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.card__text {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  color: var(--color-text-primary);
}

.card__text strong {
  font-family: var(--font-tab);
  font-weight: 700;
}

.card__text--bold {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  color: var(--color-text-primary);
}

.card__body {
  flex: 1 0 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card__content .btn {
  margin-top: auto;
  align-self: flex-start;
}

.card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   Card image frames — règle commune
   ============================================================ */
.card__image-frame,
.card__image-frame-back,
.card__image-frame-front,
.card__image-frame-1,
.card__image-frame-2,
.card__image-frame-3 {
  position: absolute;
  width: 100%;
  height: 100%;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--color-bg-footer);
  padding: 40px 128px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.site-footer__legal {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  min-width: 0;
}

.site-footer__link {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  color: var(--color-footer-text);
  text-decoration: none;
  white-space: nowrap;
}

.site-footer__link:hover {
  text-decoration: underline;
}

.site-footer__divider {
  display: inline-block;
  width: 1px;
  height: 18px;
  background: rgba(236, 236, 237, 0.3);
  flex-shrink: 0;
  vertical-align: middle;
  font-size: 0;
}

.site-footer__copyright {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  color: var(--color-footer-text);
  white-space: nowrap;
}

/* ============================================================
   Responsive — Tablet  @media (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {

  /* Hero */
  .hero {
    height: 560px;
  }

  .hero__text-panel,
  .hero__image-panel {
    min-width: 0;
    flex: 1;
  }

  .hero__text-content {
    padding: 32px 40px;
  }

  .hero__title {
    font-size: 36px;
    line-height: 44px;
    letter-spacing: -0.72px;
  }

  .hero__image-frame {
    width: 1450px;
    height: 777px;
    top: -55px;
    left: -759px;
  }

  /* Cards */
  .cards {
    flex-direction: column;
    height: auto;
  }

  .cards .card {
    flex: none;
    width: 100%;
  }

   .card__image-wrap {
    width: 244px;
  }

  .cards .card:last-child .card__content {
    height: auto;
  }

  .cards .card:last-child .card__body {
    flex: none;
  }

  .cards .card:last-child .card__image-wrap {
    height: auto;
  }

  .cards .card:last-child .card__links {
    flex-direction: row;
    gap: 24px;
    flex-wrap: wrap;
  }


}

/* ============================================================
   Responsive — Mobile  @media (max-width: 767px)
   ============================================================ */
@media (max-width: 767px) {

  :root {
    --metanav-height: 0px;
    --header-height:  64px;
  }

  /* Meta-nav masquée */
  .meta-nav {
    display: none;
  }

  /* Header */
  .site-header {
    top: 0;
    height: 64px;
    border-bottom: 1px solid #e9eaeb;
  }

  .site-header__container {
    padding: 0 16px;
  }

  .site-header__mobile-controls {
    display: flex;
  }

  /* Hero — empilé (texte → image) */
  .hero {
    flex-direction: column;
    height: auto;
  }

  .hero__text-panel {
    flex: none;
    width: 100%;
    height: auto;
  }

  .hero__text-content {
    padding: 32px 16px;
  }

  .hero__title {
    font-size: 30px;
    line-height: 38px;
    letter-spacing: -0.6px;
  }

  .hero__image-panel {
    flex: none;
    width: 100%;
    height: 240px;
  }

  .hero__image-frame {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
  }

  /* Overlays masqués sur mobile */
  .hero__image-frame--overlay,
  .hero__image-frame--overlay-entreprise {
    display: none;
  }

  /* TabNav */
  .tabnav-container {
    padding: 16px;
  }

  .tabnav {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tabnav::-webkit-scrollbar {
    display: none;
  }

  .tabnav__tab {
    flex: none;
  }

  /* Content Section */
  .content-section {
    padding: 40px 16px;
  }

  /* Section Header */
  .section-header__title {
    font-size: 24px;
    line-height: 32px;
  }

  /* Cards — colonne (image haut, contenu bas)
     Le card garde padding:24px et gap:40px du desktop.
     L'image wrap est inset dans le padding → border-radius 24px sur 4 coins. */
  .card {
    flex-direction: column;
    height: auto;
  }

  .card__image-wrap {
    width: 100%;
    height: 202px;
  }

  .cards .card:last-child .card__image-wrap {
    height: 202px;
  }

  .card__content {
    height: auto;
    flex: none;
  }

  .card__body {
    flex: none;
  }

  .card__content .btn {
    margin-top: 0;
  }

  .cards .card:last-child .card__links {
    flex-direction: column;
    gap: 8px;
  }


  /* Footer */
  .site-footer {
    padding: 40px 16px 48px;
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer__legal {
    flex-direction: column;
    gap: 24px;
  }

  .site-footer__divider {
    display: none;
  }
}

