/* =========================================
   VALUES SECTION (FULL CSS)
   ONT mood: premium institutional + soft glass + graphic accents
========================================= */

.section-values {
  --val-font-display: "Manrope", "Avenir Next", "Avenir", sans-serif;
  --val-font-body: "Roboto", system-ui, sans-serif;

  --val-brown: #391a00;
  --val-orange: #ef8e01;
  --val-teal: #009e96;
  --val-blue: #1f4ea8;

  --val-bg: #f6f4ef;
  --val-text: #17120e;
  --val-muted: rgba(23, 18, 14, 0.72);

  --val-shadow: 0 16px 42px rgba(25, 18, 10, 0.08);
  --val-border: rgba(57, 26, 0, 0.08);

  position: relative;
  padding-block: 3.25rem;
  background:
    radial-gradient(circle at 8% 12%, rgba(239, 142, 1, 0.06), transparent 34%),
    radial-gradient(circle at 92% 86%, rgba(0, 158, 150, 0.06), transparent 34%),
    linear-gradient(180deg, #fbfaf8 0%, #f5f3ee 100%);
  overflow: clip;
  font-family: var(--val-font-body);
  color: var(--val-text);
}

.section-values::before,
.section-values::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
}

.section-values::before {
  width: 14rem;
  aspect-ratio: 1;
  top: -5rem;
  left: -4rem;
  background: radial-gradient(circle, rgba(31, 78, 168, 0.08), transparent 70%);
}

.section-values::after {
  width: 16rem;
  aspect-ratio: 1;
  right: -5rem;
  bottom: -6rem;
  background: radial-gradient(circle, rgba(0, 158, 150, 0.1), transparent 72%);
}

.section-values .container {
  position: relative;
  z-index: 1;
}

/* ===== Section heading ===== */

.values-head {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
  align-items: start;
}

.values-head__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.values-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--val-font-display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  font-size: 0.72rem;
  color: rgba(57, 26, 0, 0.82);
}

.values-eyebrow::before {
  content: "";
  width: 18px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--val-orange), var(--val-teal));
  box-shadow: 0 0 0 2px rgba(255,255,255,0.7);
  flex: 0 0 auto;
}

.values-title {
  margin: 0;
  font-family: var(--val-font-display);
  font-size: clamp(1.15rem, 2vw, 2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #130f0b;
  max-width: 18ch;
}

.values-head__desc {
  margin: 0;
  color: var(--val-muted);
  line-height: 1.62;
  font-size: 0.92rem;
  max-width: 65ch;
}

.values-head__line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.15rem;
}

.values-head__line i {
  width: 20px;
  height: 14px;
  display: inline-block;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(239,142,1,.9), rgba(0,158,150,.85));
  opacity: 0.9;
}

.values-head__line span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(57,26,0,.18), rgba(57,26,0,.04));
}

/* ===== Grid wrapper ===== */

.values-grid {
  display: grid;
  gap: 0.95rem;
  grid-template-columns: 1fr;
}

/* ===== Tile base ===== */

.values-tile {
  --values-tile-pad: 0.95rem;

  position: relative;
  min-width: 0;
  border-radius: 20px;
  border: 1px solid rgba(57, 26, 0, 0.06);
  box-shadow: var(--val-shadow);
  padding: var(--values-tile-pad);
  overflow: hidden;
  display: grid;
  gap: 0.55rem;
  align-content: start;
  isolation: isolate;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.values-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(25, 18, 10, 0.11);
}

.values-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.9;

  border-radius: 2.1rem;
}

.values-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.05)),
    radial-gradient(circle at 18% 14%, rgba(255,255,255,0.18), transparent 48%);
  pointer-events: none;
}

/* Tile colors */
.values-tile--optimisme::before {
  background: linear-gradient(180deg, #ef786a 0%, #ea6f62 100%);
}
.values-tile--creativite::before {
  background: linear-gradient(180deg, #e9b7aa 0%, #e3aea2 100%);
}
.values-tile--engagement::before {
  background: linear-gradient(180deg, #5f8769 0%, #587f62 100%);
}
.values-tile--proximite::before {
  background: linear-gradient(180deg, #f4d86f 0%, #efd162 100%);
}

.values-tile--optimisme,
.values-tile--creativite,
.values-tile--engagement {
  color: #15110d;
}
.values-tile--engagement {
  color: #fff;
}

/* ===== Ribbon labels ===== */

.values-ribbon {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.94);
  color: #13100d;
  border: 1px solid rgba(57, 26, 0, 0.08);
  box-shadow: 0 8px 22px rgba(20, 16, 12, 0.08);
  font-family: var(--val-font-display);
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  border-radius: 10px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
}

/* Mobile/tablet default positions */
.values-ribbon--left {
  top: 0.7rem;
  left: 0.7rem;
  font-size: 0.78rem;
  padding: 0.4rem 0.55rem;
}

.values-ribbon--top {
  top: 0.7rem;
  left: 0.7rem;
  font-size: 0.78rem;
  padding: 0.4rem 0.55rem;
}

.values-ribbon--bottom {
  bottom: 0.7rem;
  left: 0.7rem;
  font-size: 0.78rem;
  padding: 0.4rem 0.55rem;
}

.values-ribbon--right {
  top: 0.7rem;
  right: 0.7rem;
  font-size: 0.78rem;
  padding: 0.4rem 0.55rem;
}

/* ===== Media blocks ===== */

.values-media {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.62);
  box-shadow:
    inset 0 0 0 1px rgba(57, 26, 0, 0.04),
    0 0 0 1px rgba(255,255,255,0.38),
    0 8px 20px rgba(20, 16, 12, 0.1);
  background: rgba(255,255,255,0.28);
}

/* slightly smaller image area to reduce total section height */
.values-media--top {
  aspect-ratio: 1.85 / 0.86;
  margin-top: 1.85rem; /* space for ribbon on mobile */
}

.values-media--bottom {
  aspect-ratio: 1.85 / 0.88;
  margin-top: 0.4rem;
}

.values-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.values-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.08));
  pointer-events: none;
}

.values-tile:hover .values-img {
  transform: scale(1.03);
}

/* ===== Copy content ===== */

.values-copy {
  display: grid;
  gap: 0.35rem;
  position: relative;
  z-index: 2;
}

.values-copy--top {
  margin-top: 0.2rem;
}

.values-copy__icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.36);
  background: rgba(255,255,255,0.14);
  color: inherit;
  font-size: 1rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.values-tile--proximite .values-copy__icon {
  background: rgba(255,255,255,0.58);
  border-color: rgba(57, 26, 0, 0.08);
  color: #2b2a24;
}

.values-copy__title {
  margin: 0;
  font-family: var(--val-font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  font-size: 1rem;
  color: inherit;
}

.values-copy__text {
  margin: 0;
  line-height: 1.48;
  font-size: 0.84rem;
  color: inherit;
  opacity: 0.95;
}

/* Quote style (value tiles) */
.values-tile--optimisme .values-copy__text,
.values-tile--creativite .values-copy__text,
.values-tile--engagement .values-copy__text {
  position: relative;
  margin-top: 0.35rem;
  padding-left: 0.9rem;
  padding-right: 0.1rem;
  font-family: var(--val-font-display);
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.32;
  font-size: 0.92rem;
}

.values-tile--optimisme .values-copy__text::before,
.values-tile--creativite .values-copy__text::before,
.values-tile--engagement .values-copy__text::before {
  content: "“";
  position: absolute;
  left: 0;
  top: -0.08rem;
  font-style: normal;
  font-size: 1.35em;
  line-height: 1;
  opacity: 0.9;

  /* border-radius: 1.5rem; */
}

.values-tile--optimisme .values-copy__text::after,
.values-tile--creativite .values-copy__text::after,
.values-tile--engagement .values-copy__text::after {
  content: " ”";
  font-style: normal;
  opacity: 0.9;
}

.values-tile--engagement .values-copy__text {
  color: rgba(255,255,255,0.97);
}

/* ===== "No image" institutional tile (keep spirit unchanged) ===== */

.values-tile--proximite {
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: 220px;
}

.values-tile--proximite .values-copy {
  gap: 0.45rem;
  max-width: 30ch;
}

.values-tile--proximite .values-copy__title {
  font-size: 1.05rem;
  color: #262019;
}

.values-tile--proximite .values-copy__text {
  color: rgba(38, 32, 25, 0.82);
  font-size: 0.87rem;
  line-height: 1.55;
}

.values-tile--proximite .values-chip-row {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.values-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(57, 26, 0, 0.12);
  background: rgba(255,255,255,0.48);
  font-family: var(--val-font-display);
  font-size: 0.66rem;
  font-weight: 700;
  color: rgba(57, 26, 0, 0.82);
  white-space: nowrap;
}

/* ===== Subtle graphic chart accent inside plain tile ===== */
.values-mini-graph {
  margin-top: 0.5rem;
  width: 100%;
  max-width: 240px;
  height: 42px;
  position: relative;
  opacity: 0.9;
}

/* subtle ONT mood accent (keeps your visual language, still minimal) */
.values-tile--proximite::before {
  content: "";
  position: absolute;
  inset: auto -14% -18% auto;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(0, 158, 150, 0.10), transparent 70%);
  pointer-events: none;
}

.values-tile--proximite::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0)),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0));
  pointer-events: none;
}

/* ===================================== */

.values-mini-graph::before {
  content: "";
  position: absolute;
  inset: 20px 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(57,26,0,.08), rgba(57,26,0,.02));
}

.values-mini-graph__line {
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  bottom: 4px;
}

.values-mini-graph__line svg {
  width: 100%;
  height: 100%;
  display: block;
}

.values-mini-graph__line path.line {
  fill: none;
  stroke: rgba(31, 78, 168, 0.95);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.values-mini-graph__line path.area {
  fill: rgba(31, 78, 168, 0.08);
}

/* ===== Reveal support (works with or without GSAP) ===== */

.values-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.values-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   MEDIA QUERIES (global structure style: 576 / 768 / 992 / 1200 / 1400)
========================================================= */

@media (min-width: 576px) {
  .section-values {
    padding-block: 3.6rem;
  }

  .values-head {
    margin-bottom: 1.25rem;
  }

  .values-head__desc {
    font-size: 0.95rem;
  }

  .values-grid {
    gap: 1rem;
  }

  .values-tile {
    --values-tile-pad: 1rem;
    border-radius: 22px;
  }

  .values-copy__title {
    font-size: 1.04rem;
  }

  .values-tile--optimisme .values-copy__text,
  .values-tile--creativite .values-copy__text,
  .values-tile--engagement .values-copy__text {
    font-size: 0.96rem;
  }

  .values-media--top {
    aspect-ratio: 1.95 / 0.82; /* a little flatter */
  }

  .values-media--bottom {
    aspect-ratio: 1.95 / 0.84;
  }

  .values-tile--proximite {
    min-height: 230px;
  }
}

@media (min-width: 768px) {
  .section-values {
    padding-block: 4rem;
  }

  .values-head {
    gap: 0.85rem;
    margin-bottom: 1.35rem;
  }

  .values-head__top {
    align-items: flex-end;
  }

  .values-title {
    max-width: 20ch;
  }

  .values-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .values-tile {
    min-height: 100%;
  }

  .values-tile--proximite {
    min-height: 100%;
  }

  .values-media--top {
    margin-top: 1.95rem;
  }

  .values-ribbon--left,
  .values-ribbon--top,
  .values-ribbon--bottom,
  .values-ribbon--right {
    font-size: 0.82rem;
  }
}

@media (min-width: 992px) {
  .section-values {
    padding-block: 4.35rem;
  }

  .values-head {
    margin-bottom: 1.45rem;
  }

  .values-head__desc {
    font-size: 0.98rem;
    max-width: 72ch;
  }

  .values-grid {
    gap: 1.1rem;
  }

  .values-tile {
    --values-tile-pad: 1.05rem;
    border-radius: 24px;
    overflow: visible; /* let labels sit on borders */

    padding-inline: 5rem;
  }

  /* ===== First row images flush to top edge (tile 1 & 2) ===== */
  .values-tile--optimisme .values-media--top,
  .values-tile--creativite .values-media--top {
    margin-top: calc(var(--values-tile-pad) * -1);
    margin-bottom: 0.35rem;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    aspect-ratio: 2 / 0.78; /* flatter to reduce section height */
  }

  .values-tile--optimisme .values-media--top .values-img,
  .values-tile--creativite .values-media--top .values-img {
    transform: translateY(-7px) scale(1.02);
  }

  .values-tile--optimisme:hover .values-media--top .values-img,
  .values-tile--creativite:hover .values-media--top .values-img {
    transform: translateY(-7px) scale(1.05);
  }

  /* ===== Second row left image flush to bottom edge (tile 3) ===== */
  .values-tile--engagement {
    display: flex;
    flex-direction: column;
  }

  .values-tile--engagement .values-copy--top {
    margin-top: 0.1rem;
    margin-bottom: 0.2rem;
  }

  .values-tile--engagement .values-media--bottom {
    margin-top: auto;
    margin-bottom: calc(var(--values-tile-pad) * -1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    aspect-ratio: 2 / 0.78; /* flatter */
  }

  .values-tile--engagement .values-media--bottom .values-img {
    transform: translateY(7px) scale(1.02);
  }

  .values-tile--engagement:hover .values-media--bottom .values-img {
    transform: translateY(7px) scale(1.05);
  }

  /* ===== Editorial centered copy inside value tiles ===== */
  .values-tile--optimisme .values-copy,
  .values-tile--creativite .values-copy,
  .values-tile--engagement .values-copy--top {
    justify-items: center;
    text-align: center;
    gap: 0.35rem;
  }

  .values-copy__title {
    font-size: 1.15rem;
    line-height: 1.05;
  }

  .values-tile--optimisme .values-copy__text,
  .values-tile--creativite .values-copy__text,
  .values-tile--engagement .values-copy__text {
    font-size: 1.02rem;
    line-height: 1.32;
    max-width: 28ch;
    margin-top: 0.5rem;
    padding-left: 1rem;
  }

  /* ===== Bigger labels centered on tile borders ===== */

  /* 1) Optimisme -> left vertical */
  .values-tile--optimisme .values-ribbon--left {
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%) rotate(180deg);
    writing-mode: vertical-rl;
    padding: 0.95rem 0.62rem;
    border-radius: 12px;
    font-size: 1rem;
    letter-spacing: 0.05em;
  }

  /* 2) Créativité -> right vertical (reuse top ribbon class) */
  .values-tile--creativite .values-ribbon--top {
    top: 50%;
    right: 0;
    left: auto;
    transform: translate(50%, -50%);
    writing-mode: vertical-rl;
    padding: 0.95rem 0.62rem;
    border-radius: 12px;
    font-size: 1rem;
    letter-spacing: 0.05em;
  }

  /* 3) Engagement -> left vertical (reuse bottom ribbon class) */
  .values-tile--engagement .values-ribbon--bottom {
    top: 50%;
    left: 0;
    bottom: auto;
    transform: translate(-50%, -50%) rotate(180deg);
    writing-mode: vertical-rl;
    padding: 0.95rem 0.62rem;
    border-radius: 12px;
    font-size: 1rem;
    letter-spacing: 0.05em;
  }

  /* Keep the non-image tile mostly unchanged, but align its ribbon premium */
  .values-tile--proximite .values-ribbon--right {
    top: 50%;
    right: 0;
    transform: translate(50%, -50%);
    writing-mode: vertical-rl;
    padding: 0.95rem 0.62rem;
    border-radius: 12px;
    font-size: 1rem;
    letter-spacing: 0.05em;
  }

  .values-tile--proximite {
    justify-items: start;
    align-content: center;
    padding-right: 1.2rem;
  }

  .values-tile--proximite .values-copy {
    max-width: 29ch;
  }
}

@media (min-width: 1200px) {
  .section-values {
    padding-block: 4.65rem;
  }

  .values-head {
    margin-bottom: 1.55rem;
  }

  .values-grid {
    gap: 1.15rem;
  }

  .values-tile {
    --values-tile-pad: 1.1rem;
    border-radius: 26px;
  }

  /* Keep images slightly compact */
  .values-tile--optimisme .values-media--top,
  .values-tile--creativite .values-media--top,
  .values-tile--engagement .values-media--bottom {
    aspect-ratio: 2.1 / 0.78;
  }

  .values-ribbon--left,
  .values-ribbon--top,
  .values-ribbon--bottom,
  .values-ribbon--right {
    font-size: 1.06rem;
  }

  .values-copy__title {
    font-size: 1.2rem;
  }

  .values-tile--optimisme .values-copy__text,
  .values-tile--creativite .values-copy__text,
  .values-tile--engagement .values-copy__text {
    font-size: 1.07rem;
    line-height: 1.34;
  }

  .values-tile--proximite .values-copy__title {
    font-size: 1.14rem;
  }

  .values-tile--proximite .values-copy__text {
    font-size: 0.9rem;
  }
}

@media (min-width: 1400px) {
  .section-values {
    padding-block: 4.95rem;
  }

  .values-head {
    margin-bottom: 1.7rem;
  }

  .values-grid {
    gap: 1.25rem;
  }

  .values-tile {
    --values-tile-pad: 1.15rem;
  }

  .values-ribbon--left,
  .values-ribbon--top,
  .values-ribbon--bottom,
  .values-ribbon--right {
    font-size: 1.1rem;
    padding: 1.05rem 0.68rem;
  }

  .values-copy__title {
    font-size: 1.24rem;
  }

  .values-tile--optimisme .values-copy__text,
  .values-tile--creativite .values-copy__text,
  .values-tile--engagement .values-copy__text {
    font-size: 1.1rem;
    line-height: 1.35;
  }

  .values-tile--proximite .values-copy {
    max-width: 31ch;
  }
}