/* ============================================================
   Section Secteurs
   ============================================================ */

/* ── Variables locales ── */
.sectors-section {
  --sectors-bg: #fefefe;
  --sectors-accent: #21b593;
  --sectors-text: #003c3d;
  --sectors-border: #e1e1e2;
  --sectors-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.05);
  --card-radius: 9px;
  --badge-radius: 51px;
}

/* ── Section wrapper ── */
.sectors-section {
  background-color: var(--sectors-bg);
  padding: 100px 0 120px;
}

.sectors-section__inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 80px;
}

/* ── En-tête ── */
.sectors-section__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.sectors-section__label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.25rem; /* 20px */
  line-height: 1;
  color: var(--sectors-accent);
  text-transform: uppercase;
  text-align: center;
  margin: 0;
}

/* ── Titre wysiwyg ── */
.sectors-section__title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 2.8125rem; /* 45px */
  line-height: 1.1;
  color: var(--sectors-accent);
  text-align: center;
  max-width: 640px;
  margin: 0;
}

.sectors-section__title p,
.sectors-section__title h1,
.sectors-section__title h2,
.sectors-section__title h3,
.sectors-section__title h4,
.sectors-section__title h5,
.sectors-section__title h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  text-align: center;
  margin: 0;
}

/* ── Grille cards ── */
.sectors-section__grid {
  display: grid;
  grid-template-columns: repeat(3, 451px);
  gap: 62px 0;
  justify-content: space-between;
  width: 100%;
}

/* ============================================================
   Sector Card — desktop
   ============================================================ */

.sector-card {
  display: block;
  background-color: #ffffff;
  border: 1px solid var(--sectors-border);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--sectors-shadow);
  height: 535px;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}

.sector-card:hover {
  box-shadow: var(--sectors-shadow);
  border-color: rgba(18, 39, 53, 0.4);
}

/* ── Image ── */
.sector-card__visual {
  position: relative;
  height: 220px;
  flex-shrink: 0;
  /* Pas d'overflow hidden ici — le SVG hexagone peut déborder */
}

/* Wrapper image : isole le clipping du zoom */
.sector-card__img-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--card-radius) var(--card-radius) 0 0;
}

.sector-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
  transform-origin: center center;
}

.sector-card:hover .sector-card__img {
  transform: scale(1.07);
}

/* ── Forme hexagonale ── */
.sector-card__hex {
  position: absolute;
  left: 0;
  top: 0;
  width: 259px;
  height: 259px;
  pointer-events: none;
  z-index: 1;
}

.sector-card__hex svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Badge desktop ── */
.sector-card__badge {
  position: absolute;
  left: 16px;
  top: 65px;
  background-color: var(--sector-color);
  color: var(--sector-text);
  font-family: 'SweetSansPro', sans-serif;
  font-weight: 700;
  font-size: 1.1875rem; /* 19px */
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.5;
  padding: 14px 30px;
  border-radius: var(--badge-radius);
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}

/* ── Contenu desktop ── */
.sector-card__body {
  position: absolute;
  left: 0;
  top: 279px;
  width: 100%;
  padding: 10px 50px 50px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Bandeau mobile — caché sur desktop */
.sector-card__band {
  display: none;
}

/* Contenu desktop visible */
.sector-card__desktop-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sector-card__title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.4375rem; /* 23px */
  color: var(--sectors-text);
  margin: 0;
  line-height: 1.3;
}

.sector-card__desc {
  font-family: 'Work Sans', sans-serif;
  font-weight: 400;
  font-size: 1rem; /* 16px */
  line-height: 1.406; /* 22.5px */
  color: var(--sectors-text);
  margin: 0;
}

.sector-card__link {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 1.0625rem; /* 17px */
  color: var(--sectors-accent);
  letter-spacing: -0.2px;
  text-decoration: none;
}

/* ── CTA ── */
/* CTA masqué par défaut (desktop), affiché uniquement en mobile */
.sectors-section__cta {
  display: none;
}

.sectors-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  background-color: #025253;
  color: #fefefe;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1rem; /* 16px */
  letter-spacing: -0.2px;
  border-radius: 40px;
  border: 2px solid transparent;
  height: 55px;
  padding: 0 10px 0 30px;
  width: 100%;
  white-space: nowrap;
  text-decoration: none;
  transition: padding 0.3s ease;
  cursor: pointer;
}

.sectors-btn__label {
  line-height: 1;
  margin-right: 0;
  transition: margin-right 0.3s ease;
}

.sectors-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 30px;
  background-color: transparent;
  flex-shrink: 0;
  color: #21b593;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.sectors-btn:hover,
.sectors-btn:focus-visible {
  padding-left: 20px;
  color: #fefefe;
}

.sectors-btn:hover .sectors-btn__label,
.sectors-btn:focus-visible .sectors-btn__label {
  margin-right: 10px;
}

.sectors-btn:hover .sectors-btn__icon,
.sectors-btn:focus-visible .sectors-btn__icon {
  background-color: #21b593;
  transform: rotate(45deg);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ── Tablette large (≤ 1440px) ── */
@media (max-width: 1440px) {
  .sectors-section__inner {
    padding: 0 40px;
  }

  .sectors-section__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 62px 24px;
  }

  .sector-card {
    height: auto;
    min-height: 480px;
  }

  .sector-card__body {
    padding: 10px 30px 40px;
  }
}

/* ── Tablette (≤ 991px) — 2 colonnes, cartes en image overlay ── */
@media (max-width: 991px) {
  /* CTA visible sur mobile uniquement */
  .sectors-section__cta {
    display: flex;
    justify-content: center;
    padding: 0 20px;
    margin-top: 32px;
  }

  .sectors-section {
    padding: 64px 0 80px;
  }

  .sectors-section__inner {
    padding: 0 20px;
    gap: 40px;
  }

  .sectors-section__label {
    font-size: 0.875rem; /* 14px */
  }

  .sectors-section__title,
  .sectors-section__title h1, .sectors-section__title h2, .sectors-section__title h3,
  .sectors-section__title h4, .sectors-section__title h5, .sectors-section__title h6 {
    font-size: 1.875rem; /* 30px */
    font-weight: 600;
  }

  .sectors-section__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* ── Card mode image-overlay ── */
  .sector-card {
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    min-height: unset;
    box-shadow: none;
    border: none;
  }

  .sector-card:hover {
    transform: none;
    box-shadow: none;
  }

  /* Image couvre toute la card */
  .sector-card__visual {
    position: absolute;
    inset: 0;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
  }

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

  /* Badge + hexagone cachés sur mobile */
  .sector-card__badge,
  .sector-card__hex {
    display: none;
  }

  /* Corps : devient bandeau coloré en bas de la card */
  .sector-card__body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    padding: 0;
    background: none;
    gap: 0;
  }

  /* Bandeau coloré visible sur mobile */
  .sector-card__band {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background-color: var(--sector-color);
    border-radius: 10px 10px 0 0;
    padding: 10px 16px 14px;
    min-height: 70px;
    justify-content: center;
  }

  .sector-card__sector-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem; /* 16px */
    color: var(--sector-text);
    line-height: 1.5;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .sector-card__arrow {
    font-size: 0.875rem;
  }

  .sector-card__subtitle {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: 0.75rem; /* 12px */
    color: var(--sector-text);
    opacity: 0.9;
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Contenu desktop caché */
  .sector-card__desktop-content {
    display: none;
  }
}

/* ── Petit mobile (≤ 400px) ── */
@media (max-width: 400px) {
  .sectors-section__grid {
    grid-template-columns: 1fr;
  }

  .sector-card {
    aspect-ratio: 4 / 3;
  }
}
