/* ============================================================
   pages.css — mises en page spécifiques
   ============================================================ */

/* ------------------------------------------------------------
   Accueil — hero
   ------------------------------------------------------------ */
/* Accueil : titre centré en haut, puis la carte du prochain vol
   sur toute la largeur. Une seule colonne — la mise en page à
   deux colonnes obligeait à meubler la moitié droite. */
.hero { padding: clamp(40px, 6vw, 76px) 0 clamp(28px, 4vw, 48px); }
.hero__titre {
  max-width: 30ch;
  margin: 0 auto clamp(24px, 3.5vw, 40px);
  text-align: center;
}
.hero__titre h1 { margin-bottom: 14px; }
.hero__titre em { font-style: normal; color: var(--azur-vif); }
.hero__accroche { color: var(--texte-2); font-size: 1.02rem; margin-inline: auto; max-width: 58ch; }
.hero__actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 22px; justify-content: center;
}

/* ------------------------------------------------------------
   Bandeau « Drop »
   ------------------------------------------------------------
   C'est une annonce du projet, pas une dépêche. On l'écarte donc
   volontairement de la charte éditoriale — cadre orange, lettres
   grasses, filet lumineux — pour qu'aucun lecteur ne puisse la
   confondre avec une information vérifiée du fil.
   ------------------------------------------------------------ */
.drop {
  max-width: 740px;
  margin: 0 auto clamp(26px, 3.4vw, 40px);
}

.drop__cadre {
  position: relative;
  padding: clamp(20px, 3vw, 32px) clamp(20px, 4vw, 42px);
  text-align: center;
  border-radius: var(--rayon);
  border: 1px solid rgba(255, 140, 80, .34);
  background:
    radial-gradient(120% 150% at 50% 0%, rgba(255, 107, 53, .15), transparent 62%),
    linear-gradient(180deg, var(--nuit-2), var(--nuit-1));
  box-shadow: var(--ombre), inset 0 1px 0 rgba(255, 184, 138, .10);
  overflow: hidden;
}

/* un filet qui court sur l'arête haute du cadre */
.drop__cadre::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--flamme-2), transparent);
}

.drop__etiquette {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--flamme-2);
  margin-bottom: 12px;
}
.drop__point {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--flamme);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, .16);
  animation: bat 2.6s ease-in-out infinite;
}

.drop__message {
  font-family: var(--titre);
  font-weight: 700;
  font-size: clamp(1.14rem, 2.5vw, 1.72rem);
  line-height: 1.3;
  letter-spacing: -.018em;
  text-wrap: balance;
}
/* Le membre de phrase qui porte la promesse : dégradé découpé
   dans les glyphes, sans halo ni contour. */
.drop__message em {
  font-style: normal;
  background: linear-gradient(96deg, var(--flamme-2), var(--flamme));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 560px) {
  .drop__cadre { padding: 20px 18px; }
}

/* carte « prochain décollage » */
.prochain { position: relative; }
.prochain__tete {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.prochain h3 { margin: 4px 0 6px; }
.prochain__meta { color: var(--texte-2); font-size: .92rem; margin-bottom: 18px; }
.prochain__pad {
  display: flex; align-items: center; gap: 8px;
  font-size: .86rem; color: var(--texte-3); margin-top: 16px;
}

/* ------------------------------------------------------------
   Bandeau de statistiques
   ------------------------------------------------------------ */
/* Chiffres clés : une rangée séparée par des filets, plutôt que
   quatre boîtes. Moins de cadres, plus de lisibilité. */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0;
  border-top: 1px solid var(--bord);
  border-bottom: 1px solid var(--bord);
}
.stat {
  padding: 20px 22px;
  border-left: 1px solid var(--bord);
}
.stat:first-child { border-left: 0; }
.stat b {
  display: block;
  font-family: var(--mono);
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--texte);
  font-variant-numeric: tabular-nums;
}
.stat span {
  font-size: .82rem;
  color: var(--texte-2);
  display: block;
  margin-top: 4px;
}
.stat small { display: block; margin-top: 3px; font-size: .78rem; color: var(--texte-3); }
@media (max-width: 700px) {
  .stat { border-left: 0; border-top: 1px solid var(--bord); }
  .stat:first-child { border-top: 0; }
}

/* ------------------------------------------------------------
   Fil des prochains vols (accueil)
   ------------------------------------------------------------ */
.fil { display: grid; gap: 0; }
.fil__item {
  display: grid;
  grid-template-columns: 104px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 13px 4px;
  border-bottom: 1px solid var(--bord);
  text-decoration: none;
  transition: background .15s;
}
.fil__item:first-child { border-top: 1px solid var(--bord); }
.fil__item:hover { background: rgba(255, 255, 255, .028); }
.fil__quand { font-family: var(--mono); font-size: .82rem; color: var(--azur-vif); }
.fil__quand span { display: block; color: var(--texte-3); font-size: .74rem; }
.fil__quoi b { display: block; font-weight: 600; }
.fil__quoi span { font-size: .84rem; color: var(--texte-3); }
@media (max-width: 640px) {
  .fil__item { grid-template-columns: 1fr; gap: 8px; }
}

/* ------------------------------------------------------------
   Carte interactive
   ------------------------------------------------------------ */
.carte-boite {
  position: relative;
  border: 1px solid var(--bord-vif);
  border-radius: var(--rayon);
  overflow: hidden;
  background: #060a14;
}
#carte-monde { width: 100%; height: clamp(420px, 68vh, 760px); }
#carte-apercu { width: 100%; height: 340px; }

/* thème sombre appliqué aux tuiles et aux contrôles Leaflet */
.leaflet-container { background: #050810; font-family: var(--corps); }
.leaflet-control-zoom a {
  background: rgba(12, 17, 32, .95) !important;
  color: var(--texte) !important;
  border-color: var(--bord) !important;
}
.leaflet-control-zoom a:hover { background: var(--nuit-4) !important; color: var(--azur-vif) !important; }
.leaflet-control-attribution {
  background: rgba(6, 10, 20, .82) !important;
  color: var(--texte-3) !important;
  font-size: .68rem !important;
}
.leaflet-control-attribution a { color: var(--texte-2) !important; }
.leaflet-popup-content-wrapper {
  background: linear-gradient(160deg, #131b2f, #0a1020);
  color: var(--texte);
  border: 1px solid var(--bord-vif);
  border-radius: var(--rayon-sm);
  box-shadow: var(--ombre);
}
.leaflet-popup-tip { background: #0e1528; border: 1px solid var(--bord-vif); }
.leaflet-popup-content { margin: 14px 16px; font-size: .88rem; line-height: 1.6; }
.leaflet-popup-close-button { color: var(--texte-3) !important; }

.popup__titre { font-family: var(--titre); font-weight: 600; font-size: 1rem; margin-bottom: 4px; }
.popup__lieu { font-size: .8rem; color: var(--texte-3); margin-bottom: 10px; }
.popup__liste { display: grid; gap: 6px; margin-top: 10px; max-height: 190px; overflow-y: auto; }
.popup__vol {
  display: grid; gap: 2px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, .04);
  border-radius: 4px;
  border-left: 2px solid var(--azur-nuit);
  font-size: .8rem;
}
.popup__vol b { font-weight: 600; }
.popup__vol span { color: var(--texte-3); font-family: var(--mono); font-size: .72rem; }

/* pastilles de pas de tir */
.pin {
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .85);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .45), 0 0 14px 2px currentColor;
  background: currentColor;
}
.pin--futur { animation: onde 2.4s ease-out infinite; }
@keyframes onde {
  0%   { box-shadow: 0 0 0 3px rgba(0,0,0,.45), 0 0 0 0 rgba(255,107,53,.55); }
  70%  { box-shadow: 0 0 0 3px rgba(0,0,0,.45), 0 0 0 16px rgba(255,107,53,0); }
  100% { box-shadow: 0 0 0 3px rgba(0,0,0,.45), 0 0 0 0 rgba(255,107,53,0); }
}
.grappe {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 700;
  color: #04101f;
  border: 2px solid rgba(255, 255, 255, .8);
  box-shadow: 0 0 16px 2px rgba(77, 163, 255, .5);
}

/* légende posée sur la carte */
.legende {
  position: absolute;
  left: 14px; bottom: 14px;
  z-index: 500;
  background: rgba(6, 10, 20, .9);
  border: 1px solid var(--bord);
  border-radius: var(--rayon-sm);
  padding: 12px 14px;
  font-size: .8rem;
  display: grid;
  gap: 7px;
  backdrop-filter: blur(8px);
  max-width: 220px;
}
.legende__ligne { display: flex; align-items: center; gap: 9px; color: var(--texte-2); }
.legende__puce {
  width: 11px; height: 11px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .8);
  flex: none;
}
.legende b {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--texte-3);
}
@media (max-width: 640px) { .legende { display: none; } }

/* barre d'outils au-dessus de la carte */
.carte-outils {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.carte-outils .segments { flex: none; }

/* ------------------------------------------------------------
   Satellites
   ------------------------------------------------------------ */
.constellations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.constel {
  --teinte: var(--azur);
  position: relative;
  overflow: hidden;
  background: rgba(10, 15, 29, .72);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 20px;
  transition: border-color .18s, transform .18s;
}
.constel:hover { border-color: var(--teinte); transform: translateY(-3px); }
.constel::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--teinte), transparent 70%);
  opacity: .16;
}
.constel__tete { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.constel h3 { color: var(--teinte); }
.constel__op { font-size: .82rem; color: var(--texte-3); }
.constel__nb {
  font-family: var(--mono);
  font-size: 1.9rem;
  font-weight: 700;
  margin: 12px 0 2px;
  font-variant-numeric: tabular-nums;
}
.constel__libelle { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--texte-3); }
.constel__piste {
  height: 6px;
  background: rgba(255, 255, 255, .07);
  border-radius: 3px;
  overflow: hidden;
  margin: 14px 0 8px;
}
.constel__jauge {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--teinte), transparent);
  border-radius: 3px;
  transition: width 1.1s cubic-bezier(.2, .8, .2, 1);
}
.constel__note { font-size: .82rem; color: var(--texte-2); }

/* trace au sol */
.trace-boite { display: grid; grid-template-columns: 1fr 300px; gap: 16px; }
@media (max-width: 940px) { .trace-boite { grid-template-columns: 1fr; } }
#carte-trace { width: 100%; height: clamp(360px, 52vh, 560px); }

.suivis { display: grid; gap: 8px; align-content: start; }
.suivi {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 11px 13px;
  background: rgba(10, 15, 29, .72);
  border: 1px solid var(--bord);
  border-radius: var(--rayon-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  text-align: left;
  width: 100%;
}
.suivi:hover { border-color: var(--bord-vif); background: rgba(18, 26, 46, .8); }
.suivi[aria-pressed="true"] { border-color: var(--azur); background: rgba(77, 163, 255, .1); }
.suivi__puce { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 10px currentColor; background: currentColor; }
.suivi b { display: block; font-size: .9rem; font-weight: 600; }
.suivi span { font-size: .74rem; color: var(--texte-3); font-family: var(--mono); }
.suivi__pos { font-family: var(--mono); font-size: .72rem; color: var(--texte-2); text-align: right; }

.avert {
  font-size: .82rem;
  color: var(--texte-3);
  line-height: 1.7;
  border-left: 2px solid var(--attente);
  padding-left: 13px;
  margin-top: 14px;
}
.avert--info { border-left-color: var(--azur); }

/* ------------------------------------------------------------
   Onglets internes
   ------------------------------------------------------------ */
.onglets {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--bord);
  margin-bottom: 24px;
  overflow-x: auto;
}
.onglets button {
  padding: 12px 18px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--texte-3);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.onglets button:hover { color: var(--texte); }
.onglets button[aria-selected="true"] { color: var(--azur-vif); border-bottom-color: var(--azur); }
.volet[hidden] { display: none; }


/* ------------------------------------------------------------
   News — fil d'actualités
   ------------------------------------------------------------ */
.news-live {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: rgba(10, 15, 29, .72);
  border: 1px solid var(--bord);
  border-radius: var(--rayon-sm);
  margin-bottom: 18px;
}
.news-live__etiquette {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--flamme);
}
.news-live__point {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--flamme);
  box-shadow: 0 0 10px var(--flamme);
  animation: bat 1.4s ease-in-out infinite;
}
.news-live__rebours {
  font-family: var(--mono);
  font-size: .84rem;
  min-width: 48px;
  text-align: center;
  background: rgba(6, 10, 20, .8);
  border: 1px solid var(--bord);
  border-radius: 4px;
  padding: 5px 8px;
}
.news-live select {
  background: rgba(6, 10, 20, .8);
  border: 1px solid var(--bord);
  border-radius: 4px;
  color: var(--texte);
  padding: 7px 10px;
  font-size: .84rem;
}
.news-live__pousse { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
@media (max-width: 700px) { .news-live__pousse { margin-left: 0; width: 100%; } }

/* --- article à la une --- */
.news-une {
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  overflow: hidden;
  background: rgba(10, 15, 28, .6);
  margin-bottom: 24px;
  transition: border-color .18s;
}
.news-une:hover { border-color: var(--bord-vif); }
.news-une__lien {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  text-decoration: none;
  color: inherit;
}
.news-une__lien .news-carte__image { height: 100%; min-height: 300px; border-radius: 0; }
.news-une__corps { padding: clamp(20px, 3vw, 34px); align-self: center; }
.news-une__titre {
  font-family: var(--titre);
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  line-height: 1.2;
  margin: 10px 0 12px;
}
.news-une__resume { color: var(--texte-2); font-size: .96rem; }
@media (max-width: 860px) {
  .news-une__lien { grid-template-columns: 1fr; }
  .news-une__lien .news-carte__image { min-height: 200px; }
}

/* --- grille de dépêches --- */
.news-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

.news-carte {
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  overflow: hidden;
  background: rgba(10, 15, 28, .55);
  transition: border-color .18s;
  display: flex;
  flex-direction: column;
}
.news-carte:hover { border-color: var(--bord-vif); }
.news-carte__lien {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.news-carte__image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(140deg, var(--nuit-3), var(--nuit-1));
  flex: none;
}
.news-carte__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.news-carte:hover .news-carte__image img,
.news-une:hover .news-carte__image img { transform: scale(1.04); }
.news-carte__image--vide {
  display: grid;
  place-items: center;
}
.news-carte__image--vide span {
  font-family: var(--titre);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--bord-vif);
  letter-spacing: .1em;
}
.news-carte__corps { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-carte__meta {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  font-size: .74rem;
  color: var(--texte-3);
  font-family: var(--mono);
}
.news-source {
  color: var(--azur-vif);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .68rem;
}
.news-lien-vol {
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(255, 107, 53, .14);
  border: 1px solid rgba(255, 107, 53, .32);
  color: var(--flamme-2);
}
.news-carte__titre {
  font-family: var(--titre);
  font-size: 1.02rem;
  line-height: 1.34;
  font-weight: 600;
}
.news-carte__resume {
  font-size: .88rem;
  color: var(--texte-2);
  line-height: 1.6;
}
.news-carte__auteur {
  margin-top: auto;
  padding-top: 6px;
  font-size: .76rem;
  color: var(--texte-3);
  font-style: italic;
}

/* dépêche qui vient d'arriver */
.news-carte--neuf {
  border-color: var(--flamme);
  animation: arrivee 6s ease-out;
}
.news-carte--neuf::before {
  content: "New";
  position: absolute;
  z-index: 2;
  margin: 10px;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: var(--flamme);
  color: #1b0a02;
  padding: 3px 8px;
  border-radius: 3px;
  font-weight: 700;
}
.news-carte { position: relative; }
@keyframes arrivee {
  0%   { box-shadow: 0 0 0 3px rgba(255, 107, 53, .5); }
  70%  { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0); }
  100% { box-shadow: none; }
}

/* squelette de chargement */
.news-carte--sq { pointer-events: none; }
.news-carte--sq .news-carte__image,
.sq-ligne {
  background: linear-gradient(90deg, rgba(30,41,66,.5) 25%, rgba(44,59,96,.75) 50%, rgba(30,41,66,.5) 75%);
  background-size: 220% 100%;
  animation: balayage 1.3s linear infinite;
}
.sq-ligne { height: 12px; border-radius: 4px; }

/* pastille flottante « N nouvelles dépêches » */
.news-pilule {
  position: fixed;
  left: 50%;
  top: calc(var(--nav-h) + 16px);
  transform: translateX(-50%);
  z-index: 600;
  background: linear-gradient(135deg, var(--flamme-2), var(--flamme));
  color: #1b0a02;
  font-weight: 700;
  font-size: .88rem;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: 0 10px 30px -8px rgba(255, 107, 53, .7);
  animation: monteDoux .25s ease-out;
}
.news-pilule:hover { filter: brightness(1.06); }
.news-pilule[hidden] { display: none; }

/* bandeau des dernières dépêches sur l'accueil */
.depeches { display: grid; gap: 0; }
.depeche {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 13px 4px;
  border-bottom: 1px solid var(--bord);
  text-decoration: none;
  color: inherit;
  transition: background .15s;
}
.depeche:first-child { border-top: 1px solid var(--bord); }
.depeche:hover { background: rgba(255, 255, 255, .028); }
.depeche__quand {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--texte-3);
  white-space: nowrap;
}
.depeche__titre { font-size: .94rem; font-weight: 500; line-height: 1.45; }
.depeche__source {
  display: block;
  font-family: var(--mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--azur-vif);
  margin-top: 3px;
}

/* ------------------------------------------------------------
   Retouches diverses
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  #grille-fils { grid-template-columns: 1fr !important; }
}


/* les cartes cliquables de l'accueil */
a.carte { display: block; transition: border-color .18s, transform .18s; }
a.carte:hover { border-color: var(--azur); transform: translateY(-3px); }
a.carte h3 { color: var(--azur-vif); }

/* la trace au sol : le conteneur Leaflet doit avoir une hauteur
   même quand son onglet vient d'être révélé */
.volet[hidden] { display: none; }
#v-trace .carte-boite { min-height: 360px; }
