/* RINXGROUP — feuille de style
   Palette inspirée des minerais du Congo : cobalt, cuivre, malachite, sur le bleu nuit du logo. */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dmsans.woff") format("woff");
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  --nuit: #061327;
  --nuit-2: #0A1C38;
  --marine: #092344;
  --cobalt: #4C7BFF;
  --cobalt-fonce: #2C57D8;
  --cuivre: #D88A52;
  --malachite: #35A985;
  --ivoire: #EAF0FA;
  --brume: #98A8C4;
  --ligne: rgba(234, 240, 250, 0.12);
  --clair: #E7EDF6;
  --encre: #0A1F3D;
  --encre-douce: #46597A;
  --ligne-claire: rgba(10, 31, 61, 0.14);
  --titre: "Montserrat", "Segoe UI", Arial, sans-serif;
  --texte: "DM Sans", "Segoe UI", Arial, sans-serif;
  --largeur: 1200px;
  --entete: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--nuit);
  color: var(--ivoire);
  font-family: var(--texte);
  font-size: 17px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--titre); font-weight: 700; }
:focus-visible { outline: 2px solid var(--cuivre); outline-offset: 3px; border-radius: 6px; }
[id] { scroll-margin-top: calc(var(--entete) + 16px); }

.conteneur { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 0 28px; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px; border-radius: 999px;
  font-family: var(--texte); font-size: 16px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn-cuivre { background: var(--cuivre); color: var(--nuit); }
.btn-cuivre:hover { background: #E59C67; }
.btn-contour { border-color: rgba(234, 240, 250, 0.28); color: var(--ivoire); }
.btn-contour:hover { border-color: var(--ivoire); }
.btn-petit { min-height: 42px; padding: 0 18px; font-size: 15px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 19, 39, 0.94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ligne);
}
.entete-in { display: flex; align-items: center; gap: 28px; height: var(--entete); }
.marque { display: flex; align-items: center; gap: 12px; color: var(--ivoire); text-decoration: none; margin-right: auto; }
.marque .rx-mark { width: 34px; height: 34px; }
.marque .rx-word { width: 128px; height: auto; }
.menu { display: flex; gap: 26px; }
.menu a { font-size: 15px; color: var(--brume); text-decoration: none; padding: 8px 0; }
.menu a:hover { color: var(--ivoire); }
.menu-bouton {
  display: none; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px;
  border: 1px solid var(--ligne); border-radius: 999px; background: transparent;
  color: var(--ivoire); font: 600 15px var(--texte); cursor: pointer;
}
.menu-bouton span { display: block; width: 16px; height: 2px; background: currentColor; box-shadow: 0 5px 0 currentColor, 0 -5px 0 currentColor; }

/* ---------- Héros ---------- */
.hero {
  position: relative;
  padding: 72px 0 64px;
  background:
    radial-gradient(60% 70% at 78% 45%, rgba(76, 123, 255, 0.20), transparent 70%),
    radial-gradient(40% 50% at 10% 100%, rgba(216, 138, 82, 0.10), transparent 70%),
    var(--nuit);
  overflow: hidden;
}
.hero-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 40px; align-items: center; }
.hero h1 {
  font-size: clamp(40px, 5.3vw, 74px);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.035em;
  max-width: 12ch;
}
.lede { margin-top: 26px; font-size: 19px; color: #C3CEE2; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* Carte orbitale */
.orbite { position: relative; width: 100%; max-width: 600px; aspect-ratio: 1 / 1; margin-left: auto; }
.orbite-fond { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.orbite-fond .etoile { fill: var(--ivoire); }
.orbite-fond .anneau { fill: none; stroke-width: 1.2; }
.orbite-fond .anneau-1 { stroke: rgba(76, 123, 255, 0.55); }
.orbite-fond .anneau-2 { stroke: rgba(216, 138, 82, 0.50); }
.orbite-fond .anneau-3 { stroke: rgba(53, 169, 133, 0.50); stroke-dasharray: 2 7; }
.orbite-centre {
  position: absolute; left: 50%; top: 50%; width: 21%; aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #12305E, var(--marine) 70%);
  box-shadow: 0 0 0 1px rgba(234, 240, 250, 0.14), 0 0 80px 10px rgba(76, 123, 255, 0.35);
  color: var(--ivoire);
}
.orbite-centre .rx-mark { width: 62%; height: 62%; }

.astre {
  position: absolute; left: var(--x); top: var(--y);
  width: 18px; height: 18px; margin: -9px 0 0 -9px;
  text-decoration: none; color: var(--ivoire);
}
.astre-point {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 22%, transparent), 0 0 22px 2px color-mix(in srgb, var(--c) 55%, transparent);
  transition: transform .2s ease;
}
.astre-nom {
  position: absolute; top: 50%; transform: translateY(-50%);
  white-space: nowrap; line-height: 1.2;
  font-family: var(--titre); font-weight: 700; font-size: 15px; letter-spacing: -0.01em;
  text-shadow: 0 0 6px var(--nuit), 0 0 3px var(--nuit), 0 0 12px var(--nuit);
}
.astre-nom small { display: block; font-family: var(--texte); font-weight: 400; font-size: 12.5px; letter-spacing: 0; color: var(--brume); }
.astre[data-cote="d"] .astre-nom { left: calc(100% + 9px); }
.astre[data-cote="g"] .astre-nom { right: calc(100% + 9px); text-align: right; }
.astre[data-cote="b"] .astre-nom { top: calc(100% + 9px); left: 50%; transform: translateX(-50%); text-align: center; }
.astre[data-cote="h"] .astre-nom { top: auto; bottom: calc(100% + 9px); left: 50%; transform: translateX(-50%); text-align: center; }
.astre:hover .astre-point, .astre:focus-visible .astre-point { transform: scale(1.35); }
.astre:focus-visible { outline: none; }
.astre:focus-visible .astre-nom { outline: 2px solid var(--cuivre); outline-offset: 4px; border-radius: 4px; }
.astre-enligne .astre-point { background: var(--ivoire); box-shadow: 0 0 0 5px rgba(234, 240, 250, 0.18), 0 0 22px 2px rgba(234, 240, 250, 0.45); }

.legende { list-style: none; padding: 0; margin-bottom: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--ligne); font-size: 14px; color: var(--brume); }
.legende li { display: flex; align-items: center; gap: 10px; }
.legende i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }

/* Animation d'arrivée : un seul moment, au chargement */
@media (prefers-reduced-motion: no-preference) {
  .orbite-fond .anneau { stroke-dasharray: 1; stroke-dashoffset: 1; animation: tracer 1.4s cubic-bezier(.6, .1, .2, 1) forwards; }
  .orbite-fond .anneau-2 { animation-delay: .2s; }
  .orbite-fond .anneau-3 { animation: apparaitre 1s ease .4s both; stroke-dasharray: 2 7; stroke-dashoffset: 0; }
  .orbite-centre { animation: apparaitre-centre 1s ease both; }
  .astre { animation: apparaitre .7s ease both; animation-delay: calc(.7s + var(--i) * .09s); }
  @keyframes tracer { to { stroke-dashoffset: 0; } }
  @keyframes apparaitre { from { opacity: 0; } to { opacity: 1; } }
  @keyframes apparaitre-centre { from { opacity: 0; transform: translate(-50%, -50%) scale(.85); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
}

/* ---------- Sections ---------- */
.section { padding: 112px 0; }
.clair { background: var(--clair); color: var(--encre); }
.section-tete { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: end; margin-bottom: 64px; }
.section h2 { font-size: clamp(32px, 4.2vw, 54px); line-height: 1.06; letter-spacing: -0.03em; font-weight: 800; }
.section-tete p { color: var(--brume); max-width: 32em; }
.clair .section-tete p { color: var(--encre-douce); }

/* Écosystème */
.eco-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px 64px; }
.eco-grille h2 { max-width: 12ch; }
.eco-texte { font-size: 21px; line-height: 1.55; color: var(--encre); max-width: 30em; }
.principes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 80px; }
.principe { padding-top: 24px; border-top: 2px solid var(--encre); }
.principe svg { width: 30px; height: 30px; color: var(--cobalt-fonce); margin-bottom: 18px; }
.principe h3 { font-size: 20px; letter-spacing: -0.01em; }
.principe p { margin-top: 10px; color: var(--encre-douce); }

/* Filières */
.pole { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 48px; padding: 48px 0; border-top: 1px solid var(--ligne); }
.pole:last-child { border-bottom: 1px solid var(--ligne); }
.pole-tete { position: sticky; top: calc(var(--entete) + 32px); align-self: start; }
.pole-tete h3 { display: flex; align-items: flex-start; gap: 12px; font-size: 22px; letter-spacing: -0.01em; }
.pole-tete h3 i { width: 12px; height: 12px; margin-top: .45em; border-radius: 50%; background: var(--c); box-shadow: 0 0 16px var(--c); flex: none; }
.pole-tete p { margin-top: 12px; color: var(--brume); font-size: 16px; }
.pole-liste { display: grid; }
.filiere {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.25fr); gap: 8px 28px;
  padding: 26px 0; border-radius: 4px;
  transition: background-color .3s ease, box-shadow .3s ease;
}
.filiere + .filiere { border-top: 1px solid var(--ligne); }
.filiere:target {
  background: color-mix(in srgb, var(--c) 16%, var(--nuit));
  box-shadow: 0 0 0 18px color-mix(in srgb, var(--c) 16%, var(--nuit));
  border-top-color: transparent; border-radius: 6px;
}
.filiere-icone {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
}
.filiere-icone svg { width: 26px; height: 26px; }
.filiere h4 { margin: 0; font-family: var(--titre); font-size: 28px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.filiere-domaine { margin-top: 6px; color: var(--c); font-size: 15px; font-weight: 600; }
.filiere-texte { color: #C3CEE2; }
.filiere-lien { grid-column: 3; justify-self: start; margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--ivoire); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--c) 70%, transparent); text-underline-offset: 5px; }
.filiere-lien:hover { text-decoration-color: var(--ivoire); }

/* Académie */
.academie {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center;
  padding: 64px; border-radius: 28px;
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(229, 56, 59, 0.16), transparent 70%),
    var(--nuit-2);
  border: 1px solid var(--ligne);
}
.academie-logo { width: 150px; height: auto; margin-bottom: 28px; }
.academie h2 { font-size: clamp(30px, 3.6vw, 46px); }
.academie p { margin-top: 18px; color: #C3CEE2; max-width: 32em; }
.academie .btn { margin-top: 30px; }
.academie-faits { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.academie-faits li { padding: 18px 0; border-top: 1px solid var(--ligne); }
.academie-faits li:last-child { border-bottom: 1px solid var(--ligne); }
.academie-faits strong { display: block; font-family: var(--titre); font-size: 18px; letter-spacing: -0.01em; }
.academie-faits span { color: var(--brume); font-size: 15.5px; }

/* Méthode */
.etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: etape; }
.etapes li { counter-increment: etape; padding: 28px 0 0; border-top: 2px solid var(--encre); }
.etapes li::before {
  content: counter(etape);
  display: block; margin-bottom: 22px;
  font-family: var(--titre); font-weight: 800; font-size: 56px; line-height: 1; letter-spacing: -0.04em;
  color: var(--cobalt-fonce);
}
.etapes h3 { font-size: 20px; letter-spacing: -0.01em; }
.etapes p { margin-top: 10px; color: var(--encre-douce); }

/* Fondateur */
.fondateur { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 72px; align-items: center; }
.fondateur-photo { position: relative; }
.fondateur-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 24px; }
.fondateur-photo::after {
  content: ""; position: absolute; inset: auto -18px -18px auto; width: 120px; height: 120px; border-radius: 50%;
  border: 1px solid rgba(216, 138, 82, 0.6); pointer-events: none;
}
.fondateur-role { margin-top: 12px; color: var(--cuivre); font-weight: 600; }
.fondateur blockquote {
  margin: 32px 0 0; padding: 0;
  font-family: var(--titre); font-weight: 600; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.3; letter-spacing: -0.02em;
}
.fondateur-texte { margin-top: 24px; color: #C3CEE2; max-width: 34em; }

/* Contact */
.contact {
  position: relative; overflow: hidden;
  padding: 72px 64px; border-radius: 28px;
  background:
    radial-gradient(80% 120% at 0% 100%, rgba(76, 123, 255, 0.35), transparent 65%),
    radial-gradient(60% 90% at 100% 0%, rgba(216, 138, 82, 0.22), transparent 70%),
    var(--marine);
  border: 1px solid rgba(234, 240, 250, 0.14);
}
.contact h2 { max-width: 14ch; }
.contact > p { margin-top: 18px; color: #C9D4E7; max-width: 36em; }
.contact-choix { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.contact-direct { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 40px; padding-top: 28px; border-top: 1px solid rgba(234, 240, 250, 0.16); }
.contact-direct a { display: flex; flex-direction: column; text-decoration: none; }
.contact-direct small { color: var(--brume); font-size: 14px; }
.contact-direct strong { font-family: var(--titre); font-size: 20px; letter-spacing: -0.01em; }
.contact-direct a:hover strong { text-decoration: underline; text-underline-offset: 5px; }
.contact-marque { position: absolute; right: -70px; bottom: -70px; width: 320px; height: 320px; color: rgba(234, 240, 250, 0.045); pointer-events: none; }

/* Pied de page */
.pied { padding: 72px 0 36px; border-top: 1px solid var(--ligne); background: #040E1E; }
.pied-grille { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.pied .marque .rx-word { width: 150px; }
.pied-intro { margin-top: 18px; color: var(--brume); font-size: 15px; max-width: 24em; }
.pied h3 { font-family: var(--texte); font-size: 15px; font-weight: 600; color: var(--ivoire); margin-bottom: 14px; }
.pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pied ul a { color: var(--brume); text-decoration: none; font-size: 15px; }
.pied ul a:hover { color: var(--ivoire); }
.pied-bas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--ligne); color: var(--brume); font-size: 14px; }

/* ---------- Adaptations ---------- */
@media (max-width: 1080px) {
  .hero-grille { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 14ch; }
  .orbite { margin: 8px auto 0; max-width: 560px; }
  .pole { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .pole-tete { position: static; }
  .etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 28px; }
  .fondateur { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 48px; }
  .pied-grille { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pied-grille > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .menu-bouton { display: inline-flex; }
  .entete .btn-petit { display: none; }
  .menu {
    position: absolute; left: 0; right: 0; top: var(--entete);
    flex-direction: column; gap: 0; padding: 8px 28px 20px;
    background: var(--nuit); border-bottom: 1px solid var(--ligne);
    display: none;
  }
  .entete.ouvert .menu { display: flex; }
  .menu a { padding: 14px 0; font-size: 17px; color: var(--ivoire); border-bottom: 1px solid var(--ligne); }
  .section { padding: 84px 0; }
  .section-tete, .eco-grille { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .principes { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 56px; }
  .filiere { grid-template-columns: 48px minmax(0, 1fr); }
  .filiere-icone { width: 48px; height: 48px; }
  .filiere-texte, .filiere-lien { grid-column: 2; }
  .academie { grid-template-columns: minmax(0, 1fr); padding: 40px 28px; gap: 36px; }
  .fondateur { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .fondateur-photo { max-width: 380px; }
  .contact { padding: 48px 28px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .conteneur { padding: 0 20px; }
  .marque .rx-word { width: 112px; }
  .hero { padding: 44px 0 48px; }
  .lede { font-size: 17px; }
  .actions .btn { flex: 1 1 100%; }
  .astre-nom { font-size: 12.5px; }
  .astre-nom small { display: none; }
  .astre { width: 14px; height: 14px; margin: -7px 0 0 -7px; }
  .astre[data-cote="d"] .astre-nom { left: calc(100% + 6px); }
  .astre[data-cote="g"] .astre-nom { right: calc(100% + 6px); }
  .astre[data-cote="b"] .astre-nom { top: calc(100% + 6px); }
  .legende { margin-top: 36px; }
  .filiere { grid-template-columns: 44px minmax(0, 1fr); gap: 6px 16px; padding: 22px 0; }
  .filiere-icone { width: 44px; height: 44px; }
  .filiere-icone svg { width: 22px; height: 22px; }
  .filiere:target { box-shadow: 0 0 0 12px color-mix(in srgb, var(--c) 16%, var(--nuit)); }
  .filiere h4 { font-size: 24px; }
  .etapes { grid-template-columns: minmax(0, 1fr); }
  .etapes li::before { font-size: 44px; margin-bottom: 14px; }
  .pied-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
