/* SOMIMI — Maquette 1 Institutionnelle
   Architecture découplée : pas de logique métier.
   Évolution prévue : comptes, GED multilingue, fournisseurs, ERP Odoo. */

:root {
  --navy: #0b1f3a;
  --petroleum: #163a5f;
  --blue: #1e4d7b;
  --bronze: #b08d57;
  --bronze-deep: #7a6238;
  --ivory: #f6f3ec;
  --paper: #ebe6dc;
  --white: #ffffff;
  --ink: #1c1915;
  --muted: #5a564e;
  --line: #d6d0c4;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Source Sans 3", system-ui, sans-serif;
  background: var(--ivory);
  color: var(--ink);
}

h1, h2, h3, .font-serif {
  font-family: Fraunces, "Times New Roman", serif;
  font-optical-sizing: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 80;
  background: var(--navy);
  color: #fff;
  padding: 0.5rem 1rem;
}
.skip-link:focus { top: 1rem; }

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.site-logo {
  width: 3.5rem;
  height: 3.5rem;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.hero-home {
  position: relative;
  width: 100%;
  min-height: 720px;
  height: 720px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  background-color: #081522;
  background-image: url("../images/hero-minerals-photographic-v2.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
}

.hero-home::before,
.hero-home::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-home::before {
  background:
    radial-gradient(ellipse 47% 88% at 18% 45%, rgba(2, 8, 14, 0.64) 0%, rgba(3, 10, 18, 0.34) 58%, transparent 100%),
    linear-gradient(90deg, rgba(3, 9, 16, 0.42) 0%, rgba(3, 10, 18, 0.2) 39%, transparent 58%);
}

.hero-home::after {
  top: auto;
  height: 168px;
  background: linear-gradient(
    180deg,
    rgba(11, 31, 58, 0) 0%,
    rgba(11, 31, 58, 0.18) 34%,
    rgba(11, 31, 58, 0.58) 70%,
    #0b1f3a 100%
  );
}

.hero-home__shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 48px;
  display: grid;
  grid-template-columns: 46% 54%;
  align-items: center;
  box-sizing: border-box;
}

.hero-home__copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 4px;
  padding-right: 20px;
}

.hero-home__copy::before {
  content: "";
  position: absolute;
  inset: -1.5rem -2rem -1rem -2.5rem;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 30% 42%, rgba(2, 8, 14, 0.3) 0%, rgba(2, 8, 14, 0.1) 58%, transparent 81%);
}

.hero-home__title {
  max-width: 560px;
  margin: 0;
  font-family: Fraunces, "Times New Roman", serif;
  font-size: 52.5px;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: #fff;
}

.hero-home__rule {
  width: 56px;
  height: 1.5px;
  margin-top: 25px;
  margin-bottom: 0;
  background: var(--bronze);
}

.hero-home__lead {
  max-width: 475px;
  margin: 24px 0 0;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.5;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
}

.hero-home__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
}

.hero-home__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 24px;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hero-home__btn--primary {
  background: #f1eee7;
  color: var(--navy);
  border: 1px solid #f1eee7;
}

.hero-home__btn--primary:hover {
  background: #fff;
  border-color: #fff;
}

.hero-home__btn--ghost {
  background: rgba(5, 15, 25, 0.2);
  color: #fff;
  border: 1px solid rgba(196, 164, 111, 0.86);
}

.hero-home__btn--ghost:hover {
  background: rgba(176, 141, 87, 0.14);
}

.hero-home__minerals {
  position: absolute;
  inset: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
}

.mineral {
  position: absolute;
  bottom: 39px;
  left: 49.3%;
  width: max-content;
  margin: 0;
  transform: translateX(-50%);
  text-align: center;
}

.mineral--featured {
  left: 67.6%;
}

.mineral:nth-child(3) {
  left: 87.8%;
}

.mineral figcaption {
  position: relative;
  margin: 0;
  color: #fff;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.23em;
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
}

.mineral figcaption::after {
  content: "";
  display: block;
  width: 26px;
  height: 1.5px;
  margin: 8px auto 0;
  background: var(--bronze);
}

.nav-link {
  color: var(--ink);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}
.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--blue);
}

.nav-link[aria-current="page"]::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 0.35rem;
  background: var(--bronze);
}

.btn-navy {
  background: var(--navy);
  color: #fff;
}
.btn-navy:hover { background: var(--petroleum); }
.btn-bronze {
  background: transparent;
  color: var(--bronze-deep);
  border: 1px solid var(--bronze);
}
.btn-bronze:hover { background: var(--paper); }

.rule-bronze {
  width: 3.5rem;
  height: 1px;
  background: var(--bronze);
}

.section-kicker {
  color: var(--bronze-deep);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
}

.site-footer {
  background: var(--navy);
  color: #d8d2c6;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.gallery-board {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.85rem;
  min-height: clamp(28rem, 62vh, 40rem);
}

.gallery-board__feature,
.gallery-board__tile {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--paper, #EBE6DC);
  outline: none;
}

.gallery-board__feature {
  grid-row: 1 / span 2;
}

.gallery-board__feature img,
.gallery-board__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.55s ease, filter 0.45s ease;
}

.gallery-board__feature:hover img,
.gallery-board__tile:hover img,
.gallery-board__feature:focus-visible img,
.gallery-board__tile:focus-visible img {
  transform: scale(1.03);
  filter: brightness(1.04);
}

.gallery-board__feature:focus-visible,
.gallery-board__tile:focus-visible {
  box-shadow: inset 0 0 0 2px var(--bronze, #B08D57);
}

.gallery-board__feature::after,
.gallery-board__tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(11, 31, 58, 0.18) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gallery-board__feature:hover::after,
.gallery-board__tile:hover::after {
  opacity: 1;
}

@media (max-width: 768px) {
  .gallery-board {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    min-height: 0;
    gap: 0.75rem;
  }

  .gallery-board__feature {
    grid-row: auto;
    aspect-ratio: 16 / 10;
  }

  .gallery-board__tile {
    aspect-ratio: 4 / 5;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 58, 0.92);
  display: none;
  z-index: 70;
}
.lightbox.is-open { display: grid; }

.org-line { background: var(--line); }

@media (max-width: 1024px) {
  .hero-home {
    height: 720px;
    min-height: 720px;
  }

  .hero-home__shell {
    grid-template-columns: 46% 54%;
    padding: 0 32px;
  }

  .hero-home__title {
    font-size: 40px;
  }

  .hero-home {
    background-position: right center;
  }

  .mineral {
    left: 36.5%;
  }

  .mineral--featured {
    left: 59.5%;
  }

  .mineral:nth-child(3) {
    left: 85.2%;
  }

  .mineral figcaption {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .hero-home {
    height: 800px;
    min-height: 800px;
    padding: 0;
    display: block;
    background-color: #071525;
    background-size: 100% auto;
    background-position: center bottom;
  }

  .hero-home::before {
    background: linear-gradient(
      180deg,
      rgba(3, 10, 18, 0.34) 0%,
      #071525 66%,
      rgba(7, 21, 37, 0.96) 72%,
      rgba(7, 21, 37, 0.72) 78%,
      rgba(7, 21, 37, 0.18) 88%,
      transparent 100%
    );
  }

  .hero-home__shell {
    grid-template-columns: 1fr;
    height: 100%;
    padding: 2.25rem 24px 13rem;
    row-gap: 2rem;
  }

  .hero-home__copy {
    padding-left: 0;
  }

  .hero-home__title {
    font-size: 34px;
    line-height: 1.05;
  }

  .hero-home__actions {
    margin-top: 1.75rem;
  }

  .hero-home__btn {
    flex: 1 1 auto;
  }

  .hero-home__minerals {
    height: 100%;
  }

  .mineral {
    bottom: 14px;
    left: 49.3%;
  }

  .mineral--featured {
    left: 67.6%;
  }

  .mineral:nth-child(3) {
    left: 87.8%;
  }

  .mineral figcaption {
    font-size: 11px;
    letter-spacing: 0.13em;
  }

  .mineral figcaption::after {
    margin-top: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
