/* components.css — Composants réutilisés sur plusieurs pages. */

/* ---------- Barre d'informations ---------- */
.topbar {
  background: #0d0d0b;
  border-bottom: 1px solid var(--line);
  font-size: .8rem;
  color: var(--muted);
}

.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 42px;
  gap: 16px;
}

.tb-info {
  display: flex;
  gap: 22px;
  font-family: var(--font-mono);
}

.tb-info span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tb-social {
  display: flex;
  gap: 16px;
}

.tb-social a {
  color: var(--muted);
  transition: color .2s;
}

.tb-social a:hover {
  color: var(--gold);
}

@media (max-width: 820px) {
  .topbar {
    display: none;
  }
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 18, 16, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background .3s;
}

.nav.scrolled {
  background: rgba(13, 13, 11, .94);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  transition: height .3s;
}

.nav.scrolled .wrap {
  height: 75px;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  height: 60px;
  width: auto;
  display: block;
}

.foot .brand-logo {
  height: 250px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-links a {
  font-size: .92rem;
  font-weight: 500;
  color: var(--cream);
  position: relative;
  padding: 8px 24px;
  transition: color .2s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width .28s;
}

.nav-links a:hover,
.nav-links a.current {
  color: var(--gold);
}

.nav-links a:hover::after,
.nav-links a.current::after {
  width: 100%;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--ink) !important;
  padding: 11px 30px;
  border-radius: 100px;
  font-weight: 600;
  font-size: .9rem;
  transition: transform .2s, box-shadow .2s;
}

.nav-cta .cta-ic {
  flex-shrink: 0;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(242, 227, 124, .5);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.burger span {
  width: 26px;
  height: 2px;
  background: var(--gold);
  transition: transform .3s, opacity .3s;
}

/* ---------- Tiroir mobile + fond flouté ----------
   Enfants directs du <body>, jamais de .nav : aucun ancêtre avec
   backdrop-filter/transform ne vient piéger leur position:fixed. */

/* Fond : assombrit ET floute la page derrière le tiroir. */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(10, 10, 8, .5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Tiroir latéral, hors écran par défaut. */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  width: min(82vw, 340px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 40px 36px;
  background: var(--ink-2);
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 50px -20px rgba(0, 0, 0, .6);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
  overflow-y: auto;
}

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

.mobile-menu__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: 0;
  color: var(--cream);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: color .2s, background .2s;
}

.mobile-menu__close:hover {
  color: var(--gold);
  background: rgba(242, 227, 124, .08);
}

.mobile-menu__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu__links a {
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--cream);
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  transition: color .2s, padding .2s;
}

.mobile-menu__links a:last-child {
  border-bottom: 0;
}

.mobile-menu__links a:hover,
.mobile-menu__links a.current {
  color: var(--gold);
  padding-left: 10px;
}

.mobile-menu__links .nav-cta {
  margin-top: 18px;
  justify-content: center;
  border-bottom: 0;
  padding: 14px 22px;
  color: var(--ink) !important;
}

.mobile-menu__links .nav-cta:hover {
  padding-left: 22px;
}

/* Verrou de défilement quand le menu est ouvert (posé sur <html>). */
html.menu-ouvert,
html.menu-ouvert body {
  overflow: hidden;
}

/* Bascule bureau / mobile */
@media (max-width: 920px) {
  .nav-links {
    display: none;
  }

  .burger {
    display: flex;
  }

  .burger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .burger.open span:nth-child(2) {
    opacity: 0;
  }

  .burger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* Au-delà de 920px, le tiroir et son fond n'existent jamais à l'écran. */
@media (min-width: 921px) {

  .nav-overlay,
  .mobile-menu {
    display: none;
  }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 100px;
  font-weight: 600;
  font-size: .98rem;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s, border-color .2s;
  cursor: pointer;
  border: 0;
  font-family: inherit;
}

.btn-primary {
  background: var(--gold);
  color: var(--ink);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -10px rgba(242, 227, 124, .5);
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--ink-3);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn .arw {
  transition: transform .25s;
}

.btn:hover .arw {
  transform: translateX(4px);
}

/* ---------- Sections ---------- */
.section {
  padding: 96px 0;
}

.section.tight {
  padding: 72px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 54px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  margin-top: 18px;
}

/* En-tête des sous-pages */
.phero {
  position: relative;
  padding: 74px 0 60px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(18, 18, 16, .72), var(--ink)),
    linear-gradient(120deg, rgba(242, 227, 124, .06), transparent 60%);
}

.phero::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -5%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(242, 227, 124, .08), transparent 64%);
  pointer-events: none;
}

.phero .wrap {
  position: relative;
  z-index: 2;
}

.phero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  margin: 18px 0 16px;
  max-width: 18ch;
}

.phero p {
  color: var(--muted);
  max-width: 56ch;
  font-size: 1.08rem;
}

/* ---------- Bloc « à propos » (accueil + ATREPA) ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 64px;
  align-items: center;
}

.about-copy .lead {
  font-size: 1.24rem;
  margin: 26px 0 20px;
}

.about-copy p {
  color: var(--cream);
  font-size: 1.06rem;
  margin-bottom: 18px;
}

.about-copy strong {
  color: var(--gold);
  font-weight: 600;
}

.about-card {
  background: linear-gradient(155deg, var(--ink-2), #0f0f0c);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 44px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.about-stat {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.about-stat:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.about-stat .num {
  font-family: var(--font-titre);
  font-size: 3.2rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
}

.about-stat .lbl {
  font-size: .98rem;
  color: var(--muted);
}

.about-stat .lbl b {
  display: block;
  color: var(--cream);
  font-weight: 600;
  font-size: 1.02rem;
}

@media (max-width: 860px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }
}

/* ---------- Cartes secteurs (aperçu accueil) ---------- */
.sector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card-sec {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 34px 30px;
  position: relative;
  overflow: hidden;
  transition: transform .3s, border-color .3s;
}

.card-sec::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s;
}

.card-sec:hover {
  transform: translateY(-6px);
  border-color: rgba(242, 227, 124, .35);
}

.card-sec:hover::before {
  transform: scaleX(1);
}

.card-sec .idx {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--gold-deep);
  letter-spacing: .1em;
}

.card-sec .ic {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(242, 227, 124, .1);
  display: grid;
  place-items: center;
  margin: 14px 0 20px;
  color: var(--gold);
}

.card-sec .ic svg {
  width: 26px;
  height: 26px;
}

.card-sec h3 {
  font-size: 1.28rem;
  color: var(--cream);
  margin-bottom: 12px;
}

.card-sec p {
  font-size: .96rem;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 860px) {
  .sector-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .sector-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Chiffres d'impact ---------- */
.impact {
  position: relative;
}

.impact::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60vw;
  height: 340px;
  background: radial-gradient(ellipse, rgba(242, 227, 124, .08), transparent 70%);
  pointer-events: none;
}

.impact .wrap {
  position: relative;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 32px 26px;
  transition: border-color .3s;
}

.stat:hover {
  border-color: rgba(242, 227, 124, .3);
}

.stat .fig {
  font-family: var(--font-titre);
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.stat .fig .suf {
  font-size: 1.4rem;
}

.stat .desc {
  font-size: .9rem;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.55;
}

.stat .yr {
  font-family: var(--font-mono);
  font-size: .66rem;
  color: var(--gold-deep);
  letter-spacing: .1em;
  margin-top: 14px;
  display: block;
}

@media (max-width: 900px) {
  .impact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 460px) {
  .impact-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Signature : le sigle A·T·R·E·P·A ---------- */
.acronym {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: rgba(26, 26, 21, .72);
  backdrop-filter: blur(6px);
}

.acronym .cell {
  padding: 26px 18px;
  border-right: 1px solid var(--line);
  transition: background .3s;
}

.acronym .cell:last-child {
  border-right: 0;
}

.acronym .cell:hover {
  background: rgba(242, 227, 124, .07);
}

.acronym .letter {
  font-family: var(--font-titre);
  font-size: 3rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  transition: transform .3s;
}

.acronym .cell:hover .letter {
  transform: translateY(-3px);
}

.acronym .word {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.5;
}

@media (max-width: 820px) {
  .acronym {
    grid-template-columns: repeat(3, 1fr);
  }

  .acronym .cell:nth-child(3) {
    border-right: 0;
  }

  .acronym .cell:nth-child(-n+3) {
    border-bottom: 1px solid var(--line);
  }

  .acronym .letter {
    font-size: 2.3rem;
  }
}

@media (max-width: 440px) {
  .acronym .word {
    font-size: .6rem;
  }
}

/* ---------- Bandeau d'appel (CTA) ---------- */
.cta-band {
  background: #0e0e0c;
}

.cta-inner {
  background: linear-gradient(135deg, rgba(242, 227, 124, .12), rgba(201, 169, 78, .04));
  border: 1px solid rgba(242, 227, 124, .25);
  border-radius: 22px;
  padding: 60px;
  text-align: center;
}

.cta-inner h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  max-width: 20ch;
  margin: 16px auto 18px;
}

.cta-inner p {
  color: var(--muted);
  max-width: 46ch;
  margin: 0 auto 32px;
}

@media (max-width: 760px) {
  .cta-inner {
    padding: 40px 26px;
  }
}

/* ---------- Pied de page ---------- */
.foot {
  background: #0b0b09;
  border-top: 1px solid var(--line);
  padding: 56px 0 30px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 44px;
  margin-bottom: 40px;
}

.foot .brand {
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.foot p {
  color: var(--muted);
  font-size: .92rem;
  max-width: 34ch;
}

.foot h4 {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.foot ul {
  list-style: none;
}

.foot li {
  margin-bottom: 12px;
}

.foot li a {
  color: var(--muted);
  font-size: .92rem;
  transition: color .2s;
}

.foot li a:hover {
  color: var(--gold);
}

.foot-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: .82rem;
  font-family: var(--font-mono);
}

@media (max-width: 760px) {
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .foot-grid {
    grid-template-columns: 1fr;
  }
}