/* ============================================================
   FRITECHNEWS — design system web
   Bleu nuit · halos électriques · accents magenta · hexagones
   ============================================================ */

:root {
  --bg: #0a1230;
  --bg-2: #0c1633;
  --panel: #101e4a;
  --panel-2: #0d1a40;
  --line: rgba(120, 150, 220, 0.16);
  --blue: #1f6bff;
  --blue-bright: #2ea3ff;
  --magenta: #c0148f;
  --magenta-bright: #e23bb0;
  --text: #eaf0ff;
  --muted: #9fb0d8;
  --muted-2: #7485b4;
  --radius: 16px;
  --maxw: 760px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 12% -8%, rgba(192, 20, 143, 0.18), transparent 60%),
    radial-gradient(1100px 600px at 100% 0%, rgba(31, 107, 255, 0.20), transparent 55%),
    radial-gradient(800px 700px at 50% 120%, rgba(46, 163, 255, 0.10), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

/* Motif hexagonal très discret sur toute la page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'><g fill='none' stroke='%231f6bff' stroke-opacity='0.06' stroke-width='1'><path d='M28 0 L56 16 L56 50 L28 66 L0 50 L0 16 Z'/><path d='M28 34 L56 50 L56 84 L28 100 L0 84 L0 50 Z'/></g></svg>");
}

a { color: var(--blue-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- Barre supérieure : marque + sélecteur de langue ---------- */
.tn-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  background: rgba(8, 14, 38, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.tn-topbar__brand {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 15px;
  color: #fff;
}
.tn-topbar__brand b { color: var(--blue-bright); }
.tn-topbar__right { display: flex; align-items: center; gap: 14px; }
.tn-topbar__link { font-size: 13px; color: var(--muted); }
.tn-topbar__link:hover { color: var(--text); }

/* Sélecteur de langue (pills) */
.tn-lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 26, 64, 0.8);
}
.tn-lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 700 12px/1 var(--font);
  letter-spacing: 0.08em;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, box-shadow 0.18s;
}
.tn-lang button:hover { color: var(--text); }
.tn-lang button[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(90deg, var(--blue), var(--blue-bright));
  box-shadow: 0 4px 16px rgba(31, 107, 255, 0.45);
}

/* ---------- Conteneur ---------- */
.tn-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px 64px; }

/* ---------- Hero ---------- */
.tn-hero {
  max-width: 1100px;
  margin: 26px auto 0;
  padding: 0 20px;
}
.tn-hero__img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(46, 163, 255, 0.08);
}
.tn-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  margin: 22px auto 0;
  max-width: var(--maxw);
  padding: 0 20px;
}
.tn-meta__num {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-bright);
  font-weight: 700;
}
.tn-meta__date { font-size: 13px; color: var(--muted); }
.tn-meta__tag {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.tn-title {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 10px 0 0;
  font-weight: 800;
  background: linear-gradient(180deg, #ffffff, #c8d6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tn-edito {
  margin-top: 18px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
  border-left: 3px solid;
  border-image: linear-gradient(180deg, var(--magenta), var(--blue)) 1;
  padding-left: 18px;
}

/* ---------- Sections / articles ---------- */
.tn-section {
  margin-top: 30px;
  padding: 26px 26px 22px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}
.tn-section::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--blue-bright), var(--magenta));
  opacity: 0.9;
}
.tn-section__cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-bright);
  margin-bottom: 8px;
}
.tn-section__title {
  font-size: clamp(20px, 3.2vw, 26px);
  line-height: 1.25;
  margin: 0 0 12px;
  font-weight: 700;
  color: #fff;
}
.tn-section img.tn-section__img {
  border-radius: 12px;
  border: 1px solid var(--line);
  margin: 0 0 16px;
}
.tn-section p { margin: 0 0 14px; color: #d7e0f5; }
.tn-list { margin: 0 0 14px; padding: 0; list-style: none; }
.tn-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  color: #d7e0f5;
}
.tn-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--magenta-bright);
}
.tn-quote {
  margin: 0 0 16px;
  padding: 14px 18px;
  border-left: 3px solid var(--magenta);
  background: rgba(192, 20, 143, 0.08);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: #fff;
}
.tn-section__link { display: inline-block; margin-top: 4px; font-weight: 600; }
.tn-section__link::after { content: " →"; }

.tn-btn-wrap { margin: 6px 0 4px; }
.tn-btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--blue), var(--blue-bright));
  color: #fff !important;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 8px 22px rgba(31, 107, 255, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.tn-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(31, 107, 255, 0.5); }

/* ---------- Séparateur de marque ---------- */
.tn-sep {
  margin: 30px auto 0;
  max-width: var(--maxw);
  border-radius: 10px;
  opacity: 0.9;
}

/* ---------- Pied de page ---------- */
.tn-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: rgba(7, 12, 32, 0.6);
}
.tn-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px 20px 40px;
  text-align: center;
}
.tn-footer__img { width: 100%; max-width: 1100px; margin: 0 auto 22px; border-radius: 10px; }
.tn-footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-bottom: 12px; }
.tn-footer__links a { color: var(--muted); font-size: 13px; }
.tn-footer__note { color: var(--muted-2); font-size: 12px; line-height: 1.6; margin: 0; }

/* ---------- Page archive ---------- */
.tn-archive-head { text-align: center; margin: 40px auto 8px; max-width: var(--maxw); padding: 0 20px; }
.tn-archive-head h1 {
  font-size: clamp(26px, 4vw, 38px);
  margin: 0;
  background: linear-gradient(180deg, #fff, #c8d6ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tn-archive-head p { color: var(--muted); }
.tn-cards { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 26px; }
@media (min-width: 620px) { .tn-cards { grid-template-columns: 1fr 1fr; } }
.tn-card {
  display: block;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none !important;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.tn-card:hover {
  transform: translateY(-3px);
  border-color: rgba(46, 163, 255, 0.4);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
}
.tn-card__thumb { aspect-ratio: 16 / 7; width: 100%; object-fit: cover; }
.tn-card__body { padding: 16px 18px 20px; }
.tn-card__meta { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--blue-bright); font-weight: 700; }
.tn-card__title { color: #fff; font-size: 19px; line-height: 1.3; margin: 6px 0 0; font-weight: 700; }
.tn-card__date { color: var(--muted); font-size: 13px; margin-top: 6px; }

.tn-latest-badge {
  display: inline-block; margin-left: 8px; padding: 2px 8px;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700;
  color: #fff; background: linear-gradient(90deg, var(--magenta), var(--magenta-bright));
  border-radius: 999px; vertical-align: middle;
}

/* Bascule de langue : on masque la langue inactive */
[data-lang].is-hidden { display: none !important; }

@media (max-width: 520px) {
  .tn-topbar { padding: 10px 14px; }
  .tn-topbar__link { display: none; }
  .tn-section { padding: 20px 18px; }
}
