/* ==========================================================================
   Osint Ship Track · feuille de style unique
   Charte relevée sur le site d'origine : fond ardoise, monospace, pastilles
   de navigation, pied de page clair.
   ========================================================================== */

:root {
  --ardoise: #2f2b36;
  --ardoise-clair: #3a3543;
  --violet: #7b62df;
  --blanc: #ffffff;
  --gris: #bbbdc8;
  --gris-fonce: #76747b;
  --creme: #f7f7f7;
  --bleu: #116dff;
  --rayon: 22px;
  --gouttiere: 24px;
  --largeur: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ardoise);
  color: var(--blanc);
  font-family: "Azeret Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 var(--gouttiere);
}

/* ---------- Navigation ---------- */

.nav {
  display: flex;
  justify-content: center;
  padding: 22px var(--gouttiere) 10px;
}

.nav__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  background: #000;
  border-radius: 999px;
  padding: 7px;
}

.nav__link {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--blanc);
  color: #000;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}

.nav__link:hover { background: var(--gris); }

.nav__link[aria-current="page"] {
  background: var(--violet);
  color: var(--blanc);
}

/* ---------- Titres ---------- */

.titre-xl,
.titre-l {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  line-height: 1.2;
  margin: 26px 0 18px;
  text-align: center;
}

.titre-xl { font-size: clamp(26px, 5vw, 46px); }
.titre-l { font-size: clamp(20px, 3.4vw, 30px); letter-spacing: .1em; }

.titre-section {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .04em;
  margin: 34px 0 10px;
}

.chapeau {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 10px;
  color: var(--blanc);
}

.chapeau--gris { color: var(--gris); }

.formule {
  text-align: center;
  margin: 18px auto 26px;
  color: var(--blanc);
}

/* ---------- Recherche ---------- */

.recherche {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: 26px 0 8px;
}

.recherche__champ,
.recherche__select {
  flex: 1 1 320px;
  min-width: 0;
  max-width: 520px;
  padding: 13px 16px;
  border: 1px solid #d7d7dd;
  border-radius: 10px;
  background: var(--blanc);
  color: #111;
  font-family: inherit;
  font-size: 15px;
}

.recherche__select { cursor: pointer; }

.recherche__champ::placeholder { color: #7a7a85; }

.recherche__bouton {
  flex: 0 0 auto;
  padding: 13px 26px;
  border: 1px solid var(--blanc);
  border-radius: 10px;
  background: transparent;
  color: var(--blanc);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.recherche__bouton:hover { background: var(--blanc); color: var(--ardoise); }

.recherche__etat {
  text-align: center;
  font-style: italic;
  color: var(--gris);
  margin: 12px 0 0;
  min-height: 1.6em;
}

.recherche__etat--erreur { color: #ff9b9b; font-style: normal; }

/* ---------- Fiche de résultat (moteurs) ---------- */

.fiche {
  border: 1px solid var(--gris);
  border-radius: var(--rayon);
  padding: 26px clamp(16px, 4vw, 48px);
  margin: 34px auto 60px;
  max-width: 860px;
}

.fiche__ligne {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: baseline;
  padding: 7px 0;
}

.fiche__cle {
  flex: 1 1 210px;
  text-align: right;
  font-style: italic;
  color: var(--blanc);
}

.fiche__val {
  flex: 1 1 210px;
  font-weight: 700;
}

/* ---------- Résultats en liste (bateaux, ports) ---------- */

.resultats {
  border: 1px solid var(--gris);
  border-radius: var(--rayon);
  padding: 22px clamp(14px, 3vw, 30px);
  margin: 28px auto 60px;
  max-width: 900px;
}

.resultats__titre {
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--gris);
}

.resultats__liste {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 460px;
  overflow-y: auto;
  font-size: 14px;
}

.resultats__liste li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  word-break: break-word;
}

.resultats__liste li:last-child { border-bottom: 0; }

.resultats__vide { color: var(--gris); font-style: italic; margin: 0; }

/* ---------- Pages éditoriales ---------- */

/* ---------- Accueil : image à fond perdu ----------
   La navigation passe par-dessus le hero au lieu de le repousser, sinon une
   bande au fond de page apparaît au-dessus de l'image. */

.page-accueil .nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
}

/* ---------- Hero animé ----------
   La hauteur du bloc sert de piste de défilement : la scène reste collée en
   haut pendant ~1,8 écran, ce qui donne le temps aux cercles de converger. */

.hero {
  position: relative;
  height: 185vh;
  margin-bottom: 10px;
}

.hero__scene {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}

/* Le voile lavande de l'original, qui unifie la photo et les cercles. */
.hero__voile {
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, #8f92d8 0%, #9a9ddb 45%, #b9bbe6 100%);
  mix-blend-mode: multiply;
}

.hero__cercles { position: absolute; inset: 0; pointer-events: none; }

.cercle {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  background: rgba(60, 62, 96, .30);
  /* --p va de 0 (dispersé) à 1 (emboîté), piloté par app.js */
  --p: 0;
  will-change: transform;
}

.cercle--1 {
  width: 300px; height: 300px;
  transform: translate(calc(-50% + (1 - var(--p)) * -32vw), calc(-50% + (1 - var(--p)) * 30vh))
             scale(calc(1 + var(--p) * .15));
}

.cercle--2 {
  width: 470px; height: 470px;
  background: rgba(70, 72, 108, .26);
  transform: translate(calc(-50% + (1 - var(--p)) * 30vw), calc(-50% + (1 - var(--p)) * 26vh))
             scale(calc(1 - var(--p) * .38));
}

.cercle--3 {
  width: 250px; height: 250px;
  background: rgba(40, 41, 70, .46);
  transform: translate(calc(-50% + (1 - var(--p)) * 8vw), calc(-50% + (1 - var(--p)) * 46vh))
             scale(calc(1 - var(--p) * .52));
}

.hero__titre {
  position: absolute;
  top: 42vh;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0 var(--gouttiere);
  text-shadow: 0 2px 26px rgba(30, 30, 50, .45);
}

/* Bloc qui remonte par-dessus la scène épinglée */
.hero__projets {
  position: absolute;
  top: 118vh;
  right: 0;
  width: min(420px, calc(100% - 2 * var(--gouttiere)));
  margin-right: max(var(--gouttiere), calc((100% - var(--largeur)) / 2 + var(--gouttiere)));
  text-shadow: 0 1px 16px rgba(30, 30, 50, .45);
}

.hero__projets .titre-section { margin-top: 0; }

/* Double classe : `.bouton` est déclarée plus bas dans la feuille et
   imposerait sinon ses capitales et son espacement de titre. */
.bouton.bouton--fleche {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 7px 26px 7px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(2px);
  text-transform: none;
  letter-spacing: .02em;
  font-weight: 500;
  font-size: 14px;
}

.bouton--fleche:hover { background: var(--blanc); color: var(--ardoise); }

.bouton__rond {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 16px;
}

@media (prefers-reduced-motion: reduce) {
  .hero { height: 100vh; }
  .cercle { --p: 1; }
  .hero__projets { position: static; margin: 26px auto 0; text-align: center; }
}

.bloc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
  margin: 46px 0;
}

.bloc--inverse .bloc__media { order: 2; }

.bloc__media img { border-radius: 14px; }

.bouton {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 22px;
  border: 1px solid var(--blanc);
  border-radius: 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.bouton:hover { background: var(--blanc); color: var(--ardoise); }

.liste-simple { padding-left: 18px; }

/* ---------- Pied de page ---------- */

.pied {
  background: var(--creme);
  color: var(--ardoise);
  margin-top: 60px;
  padding: 44px 0 34px;
}

.pied__grille {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.pied__marque {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 20px;
  margin: 0 0 12px;
}

.pied__mentions {
  font-size: 12px;
  font-style: italic;
  line-height: 1.7;
  margin: 0;
  max-width: 620px;
}

.pied__titre {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 15px;
  margin: 0 0 10px;
}

.pied__menu { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.pied__menu li { padding: 2px 0; }
.pied__menu a { text-decoration: none; }
.pied__menu a:hover { text-decoration: underline; }
.pied__menu a[aria-current="page"] { color: var(--gris-fonce); }

/* ---------- Accessibilité ---------- */

.saut {
  position: absolute;
  left: -9999px;
}

.saut:focus {
  left: 12px;
  top: 12px;
  z-index: 50;
  background: var(--blanc);
  color: #000;
  padding: 8px 14px;
  border-radius: 8px;
}

/* ==========================================================================
   Page claire (OSINT) · l'original inverse la charte sur cette page :
   fond blanc, texte noir, mêmes pastilles de navigation.
   ========================================================================== */

.page-claire {
  background: var(--blanc);
  color: #000;
}

.page-claire .titre-xl { color: #000; }
.page-claire .titre-section { color: #000; text-align: center; }
.page-claire p { color: #1c1c22; }

.page-claire .bouton {
  border-color: #000;
  color: #000;
  border-width: 2px;
  border-radius: 999px;
  padding: 14px 28px;
}

.page-claire .bouton:hover { background: #000; color: var(--blanc); }

/* Disposition en étoile autour du portable */
.etoile {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 1.25fr) 1fr;
  gap: clamp(18px, 3vw, 44px);
  align-items: start;
  margin: 30px 0 70px;
}

.etoile__colonne {
  display: flex;
  flex-direction: column;
  gap: 54px;
  padding-top: 20px;
}

.etoile__bloc { text-align: center; }
.etoile__bloc p { font-size: 13.5px; line-height: 1.7; }
.etoile__bloc .titre-section { margin-top: 0; }

.etoile__centre { text-align: center; }
.etoile__action { margin-top: 34px; }

/* Portable dessiné en CSS : l'original utilise un cadre d'image, on le
   reconstruit pour éviter un visuel supplémentaire à charger. */
.portable { width: 100%; max-width: 520px; margin: 0 auto; }

.portable__ecran {
  background: #0b0b0f;
  border: 10px solid #0b0b0f;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .22);
}

.portable__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portable__socle {
  height: 14px;
  margin: 0 auto;
  width: 108%;
  max-width: none;
  background: #0b0b0f;
  border-radius: 0 0 14px 14px;
  transform: translateX(-3.7%);
}

@media (max-width: 900px) {
  .etoile { grid-template-columns: 1fr; }
  .etoile__colonne { gap: 34px; padding-top: 0; }
  .etoile__centre { order: -1; margin-bottom: 26px; }
}

/* ---------- Menu mobile ----------
   Le bouton est ajouté par app.js : sans JavaScript, les pastilles restent
   toutes visibles, ce qui garde la navigation utilisable en repli. */

.nav__bascule { display: none; }

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  .bloc, .bloc--inverse { grid-template-columns: 1fr; }
  .bloc--inverse .bloc__media { order: 0; }
  .pied__grille { grid-template-columns: 1fr; }
  .fiche__cle { text-align: left; flex-basis: 100%; }
  .fiche__val { flex-basis: 100%; }
  .recherche__bouton { flex: 1 1 100%; }

  .nav { padding-top: 16px; }

  /* Le tiroir reste DANS le flux et se replie par max-height : un panneau
     positionné hors écran élargirait le viewport et créerait un défilement
     latéral parasite. */
  .nav--js .nav__pills {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
    border-radius: 18px;
    overflow: hidden;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    transition: max-height .22s ease, opacity .18s ease, padding .22s ease;
  }

  .nav--js.est-ouvert .nav__pills {
    max-height: 420px;
    padding-top: 7px;
    padding-bottom: 7px;
    opacity: 1;
  }

  .nav--js { flex-direction: column; align-items: center; gap: 10px; }

  .nav__bascule {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border: 0;
    border-radius: 999px;
    background: #000;
    color: var(--blanc);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .06em;
    cursor: pointer;
  }

  .nav__barres {
    display: inline-block;
    width: 18px;
    height: 2px;
    background: var(--blanc);
    position: relative;
  }

  .nav__barres::before,
  .nav__barres::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: var(--blanc);
  }

  .nav__barres::before { top: -6px; }
  .nav__barres::after { top: 6px; }

  .nav__link { text-align: center; }
}
