/* ==========================================================================
   GIFR - Page d'accueil
   Depend de gi-tokens.css (a charger avant).
   ========================================================================== */

/* ==========================================================================
   1. BARRE HAUTE
   ========================================================================== */
.gi-topbar {
  position: relative;
  z-index: calc(var(--z-header) + 1);
  background: linear-gradient(90deg, var(--gi-ink-950), var(--gi-ink-900) 50%, var(--gi-ink-950));
  border-bottom: 1px solid var(--gi-line-soft);
  font-size: var(--fs-xs);
}
.gi-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-height: 46px;
  padding-block: 0.35rem;
}

.gi-topbar__notice {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
  color: var(--gi-text-muted);
}
.gi-topbar__notice strong {
  font-family: var(--gi-font-display);
  font-weight: 700;
  color: var(--gi-sand-100);
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.gi-topbar__spark {
  width: 13px; height: 13px;
  flex: none;
  color: var(--gi-gold-400);
  animation: gi-pulse-glow 3.4s var(--ease-in-out) infinite;
}
.gi-topbar__desc {
  color: var(--gi-sand-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gi-topbar__desc::before { content: "· "; color: var(--gi-gold-600); }
.gi-topbar__more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex: none;
  font-weight: 600;
  color: var(--gi-gold-400);
  transition: color var(--t-fast);
}
.gi-topbar__more svg { width: 12px; height: 12px; transition: translate var(--t-base) var(--ease-out); }
.gi-topbar__more:hover { color: var(--gi-gold-200); }
.gi-topbar__more:hover svg { translate: 3px 0; }

.gi-topbar__tools { display: flex; align-items: center; gap: var(--sp-5); flex: none; }
.gi-topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: var(--gi-sand-300);
  transition: color var(--t-fast);
}
.gi-topbar__item svg { width: 15px; height: 15px; color: var(--gi-sand-500); transition: color var(--t-fast); }
.gi-topbar__item:hover { color: var(--gi-gold-200); }
.gi-topbar__item:hover svg { color: var(--gi-gold-400); }

.gi-searchbar {
  display: flex;
  align-items: center;
  width: 220px;
  padding: 0.3rem 0.3rem 0.3rem 0.9rem;
  border-radius: var(--r-pill);
  background: rgba(8, 14, 20, 0.75);
  box-shadow: inset 0 0 0 1px var(--gi-line-soft);
  transition: box-shadow var(--t-base) var(--ease-out), width var(--t-base) var(--ease-out);
}
.gi-searchbar:focus-within {
  width: 280px;
  box-shadow: inset 0 0 0 1px var(--gi-gold-600), var(--glow-gold);
}
.gi-searchbar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: var(--fs-xs);
  color: var(--gi-sand-100);
}
.gi-searchbar input::placeholder { color: var(--gi-sand-600); }
.gi-searchbar button {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  flex: none;
  border-radius: 50%;
  color: var(--gi-gold-400);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.gi-searchbar button svg { width: 15px; height: 15px; }
.gi-searchbar button:hover { background: rgba(198, 165, 93, 0.16); color: var(--gi-gold-200); }

/* ==========================================================================
   2. EN-TETE
   ========================================================================== */
.gi-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: linear-gradient(180deg, var(--gi-ink-850), var(--gi-ink-950));
  box-shadow:
    inset 0 1px 0 rgba(198, 165, 93, 0.16),
    inset 0 -1px 0 rgba(198, 165, 93, 0.16);
  transition: box-shadow var(--t-base) var(--ease-out), background-color var(--t-base) var(--ease-out);
}
.gi-header.is-scrolled {
  background: rgba(11, 19, 28, 0.93);
  backdrop-filter: blur(16px) saturate(130%);
  box-shadow:
    inset 0 -1px 0 rgba(198, 165, 93, 0.22),
    0 14px 34px -20px rgba(0, 0, 0, 1);
}
.gi-header__corners { inset: 7px 12px; color: var(--gi-gold-700); opacity: 0.8; }

.gi-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  min-height: 74px;
  transition: min-height var(--t-base) var(--ease-out);
}
.gi-header.is-scrolled .gi-header__inner { min-height: 62px; }

/* --- Logo --- */
.gi-logo { display: inline-flex; align-items: center; gap: var(--sp-3); flex: none; }
.gi-logo__mark {
  width: 34px; height: 34px;
  flex: none;
  filter: drop-shadow(0 0 12px rgba(198, 165, 93, 0.45));
  transition: rotate var(--t-slow) var(--ease-out), filter var(--t-base) var(--ease-out);
}
.gi-logo:hover .gi-logo__mark {
  rotate: 90deg;
  filter: drop-shadow(0 0 18px rgba(219, 192, 132, 0.85));
}
.gi-logo__text {
  font-family: var(--gi-font-display);
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: 0.07em;
  color: var(--gi-sand-50);
  text-transform: uppercase;
  white-space: nowrap;
}
.gi-logo__suffix { color: var(--gi-gold-400); }

/* --- Navigation --- */
.gi-nav__list { display: flex; align-items: center; gap: 0.1rem; }
.gi-nav__item { position: relative; }

.gi-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 1.5rem 0.95rem;
  font-family: var(--gi-font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gi-sand-200);
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease-out);
}
.gi-nav__link:hover { color: var(--gi-gold-200); }

/* Losange sous l'onglet actif */
.gi-nav__link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1rem;
  translate: -50% 0;
  width: 6px; height: 6px;
  rotate: 45deg;
  background: var(--gi-gold-500);
  box-shadow: 0 0 10px rgba(198, 165, 93, 0.8);
  opacity: 0;
  scale: 0.4;
  transition: opacity var(--t-base) var(--ease-out), scale var(--t-base) var(--ease-out);
}
.gi-nav__link:hover::after { opacity: 0.55; scale: 1; }
.gi-nav__link.is-active { color: var(--gi-gold-300); }
.gi-nav__link.is-active::after { opacity: 1; scale: 1; }

.gi-nav__caret { width: 13px; height: 13px; opacity: 0.6; transition: rotate var(--t-base) var(--ease-out); }
.has-menu:hover .gi-nav__caret { rotate: 180deg; }

/* --- Mega menu --- */
.gi-megamenu {
  position: absolute;
  top: 100%;
  left: 50%;
  translate: -50% 0;
  width: min(680px, 82vw);
  padding-top: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--t-base) var(--ease-out),
              transform var(--t-base) var(--ease-out),
              visibility var(--t-base);
}
.gi-megamenu--sm { width: min(460px, 82vw); }
.has-menu:hover .gi-megamenu,
.has-menu:focus-within .gi-megamenu { opacity: 1; visibility: visible; transform: none; }

.gi-megamenu__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: var(--sp-6);
  padding: var(--sp-6);
  border-radius: var(--r-md);
  background: linear-gradient(165deg, rgba(23, 37, 51, 0.98), rgba(11, 19, 28, 0.99));
  backdrop-filter: blur(18px);
  box-shadow: inset 0 0 0 1px var(--gi-line), var(--sh-3), var(--glow-gold);
}
.gi-megamenu--sm .gi-megamenu__inner { grid-template-columns: 1fr 1fr; }

.gi-megamenu__label {
  font-family: var(--gi-font-display);
  font-size: 0.68rem;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--gi-gold-500);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--gi-line-soft);
}
.gi-megamenu__links a {
  display: block;
  padding: 0.4rem 0.6rem;
  margin-inline: -0.6rem;
  border-radius: var(--r-sm);
  font-size: var(--fs-base);
  color: var(--gi-sand-200);
  transition: background-color var(--t-fast), color var(--t-fast), padding-left var(--t-fast);
}
.gi-megamenu__links a:hover {
  background: rgba(198, 165, 93, 0.10);
  color: var(--gi-gold-200);
  padding-left: 0.95rem;
}

.gi-megamenu__feature {
  position: relative;
  display: block;
  min-height: 190px;
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--gi-line-soft);
  transition: box-shadow var(--t-base) var(--ease-out);
}
.gi-megamenu__feature:hover { box-shadow: inset 0 0 0 1px var(--gi-gold-500), var(--glow-gold); }
.gi-megamenu__feature-body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: var(--sp-4);
}
.gi-megamenu__feature-title {
  font-family: var(--gi-font-title);
  font-size: var(--fs-t-md);
  font-weight: 600;
  letter-spacing: -0.014em;
  color: var(--gi-sand-50);
}
.gi-megamenu__feature-desc { font-size: var(--fs-xs); color: var(--gi-sand-300); }

/* --- Burger --- */
.gi-burger {
  display: none;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  color: var(--gi-sand-100);
  background: rgba(36, 53, 71, 0.55);
  box-shadow: inset 0 0 0 1px var(--gi-line-soft);
}
.gi-burger svg { width: 22px; height: 22px; }
.gi-burger__close { display: none; }
.gi-nav-open .gi-burger__open { display: none; }
.gi-nav-open .gi-burger__close { display: block; }

.gi-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: var(--r-pill);
  color: var(--gi-sand-200);
  background: rgba(36, 53, 71, 0.5);
  box-shadow: inset 0 0 0 1px var(--gi-line-soft);
  transition: color var(--t-fast), background-color var(--t-fast),
              box-shadow var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.gi-icon-btn svg { width: 19px; height: 19px; }
.gi-icon-btn:hover {
  color: var(--gi-gold-200);
  background: rgba(198, 165, 93, 0.14);
  box-shadow: inset 0 0 0 1px var(--gi-gold-600), var(--glow-gold);
  transform: translateY(-2px);
}

/* ==========================================================================
   3. TIROIR MOBILE
   ========================================================================== */
.gi-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-drawer) - 1);
  background: rgba(8, 14, 20, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease-out);
}
.gi-nav-open .gi-drawer-overlay { opacity: 1; pointer-events: auto; }

.gi-drawer {
  position: fixed;
  top: 0; right: 0;
  z-index: var(--z-drawer);
  width: min(380px, 88vw);
  height: 100dvh;
  padding: var(--sp-6) var(--sp-5) var(--sp-8);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(200deg, var(--gi-ink-850), var(--gi-ink-950));
  box-shadow: inset 1px 0 0 var(--gi-line), -30px 0 60px -30px rgba(0, 0, 0, 1);
  translate: 100% 0;
  /* visibility masque le tiroir ferme : sinon ses liens restent
     atteignables au clavier et il deborde horizontalement */
  visibility: hidden;
  transition: translate var(--t-base) var(--ease-out), visibility var(--t-base);
}
.gi-nav-open .gi-drawer { translate: 0 0; visibility: visible; }
.gi-nav-open { overflow: hidden; }

.gi-drawer__search {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: var(--sp-6) 0 var(--sp-5);
  padding: 0.8rem 1rem;
  border-radius: var(--r-sm);
  background: rgba(8, 14, 20, 0.6);
  box-shadow: inset 0 0 0 1px var(--gi-line-soft);
}
.gi-drawer__search svg { width: 18px; height: 18px; color: var(--gi-gold-500); flex: none; }
.gi-drawer__search input {
  width: 100%;
  border: 0; background: none; outline: none;
  font-size: var(--fs-base);
  color: var(--gi-sand-100);
}
.gi-drawer__search input::placeholder { color: var(--gi-sand-500); }

.gi-drawer__item { border-bottom: 1px solid var(--gi-line-soft); }
.gi-drawer__item > a,
.gi-drawer__row > a {
  display: block;
  padding: 0.95rem 0.2rem;
  font-family: var(--gi-font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--gi-sand-100);
}
.gi-drawer__row { display: flex; align-items: center; justify-content: space-between; }
.gi-drawer__row button { display: grid; place-items: center; width: 40px; height: 40px; color: var(--gi-gold-500); }
.gi-drawer__row button svg { width: 18px; height: 18px; transition: rotate var(--t-base) var(--ease-out); }
.gi-drawer__item.is-open .gi-drawer__row button svg { rotate: 180deg; }

.gi-drawer__sub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t-base) var(--ease-out);
}
.gi-drawer__item.is-open .gi-drawer__sub { grid-template-rows: 1fr; }
.gi-drawer__sub > li { overflow: hidden; }
.gi-drawer__sub li:first-child { padding-top: var(--sp-2); }
.gi-drawer__sub li:last-child { padding-bottom: var(--sp-4); }
.gi-drawer__sub a {
  display: block;
  padding: 0.55rem 0 0.55rem 1.1rem;
  font-size: var(--fs-base);
  color: var(--gi-sand-300);
  border-left: 1px solid var(--gi-line);
}
.gi-drawer__sub a:hover { color: var(--gi-gold-300); border-left-color: var(--gi-gold-500); }
.gi-drawer__cta { width: 100%; margin-top: var(--sp-6); }

/* ==========================================================================
   4. HERO EN BANDEAU
   Hauteur contenue : le contenu doit rester visible sans defiler.
   ========================================================================== */
.gi-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(340px, 29vw, 450px);
  overflow: hidden;
  background: var(--gi-ink-900);
}

/* --- Visuel (placeholder du key visual officiel) --- */
.gi-hero__media { position: absolute; inset: 0; z-index: -1; }

.gi-hero__sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--gi-ink-900) 26%, #1A2C44 48%, #33506F 70%, #52708F 100%);
}

/* Illustration vectorielle, calee sur la moitie droite du bandeau */
.gi-hero__scene {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 76%;
  height: 100%;
  /* Indispensable quand .gi-hero__scene est une <img> et non le SVG :
     sans object-fit le visuel serait etire au lieu d'etre cadre. */
  object-fit: cover;
  object-position: center right;
  /* Le bord gauche de l'illustration se dissout dans le fond sombre :
     sans ce masque on verrait une coupure verticale nette. */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 42%);
}

/* Halo solaire chaud, anime par-dessus l'illustration */
.gi-hero__sun {
  position: absolute;
  top: 50%;
  right: 27%;
  width: clamp(200px, 26vw, 400px);
  aspect-ratio: 1;
  translate: 50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 250, 232, 0.42) 0%,
    rgba(246, 219, 163, 0.24) 26%,
    rgba(198, 165, 93, 0.09) 52%,
    transparent 74%);
  filter: blur(14px);
  animation: gi-pulse-glow 8s var(--ease-in-out) infinite;
}

.gi-hero__particles { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Fondu du visuel vers le fond sombre, a gauche puis en bas */
.gi-hero__fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,
      var(--gi-ink-900) 4%,
      rgba(13, 22, 32, 0.94) 22%,
      rgba(13, 22, 32, 0.60) 40%,
      rgba(13, 22, 32, 0.18) 60%,
      transparent 80%),
    linear-gradient(180deg,
      rgba(13, 22, 32, 0.45) 0%,
      transparent 26%,
      transparent 58%,
      rgba(13, 22, 32, 0.62) 86%,
      var(--gi-ink-900) 100%);
}

.gi-hero__corners { color: var(--gi-gold-600); opacity: 0.6; --corner-size: 54px; }

/* --- Contenu --- */
.gi-hero__inner { position: relative; z-index: var(--z-content); width: 100%; }
.gi-hero__content { max-width: 620px; padding-block: var(--sp-6); }

.gi-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: var(--sp-4);
  font-family: var(--gi-font-display);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--gi-gold-400);
}
.gi-hero__eyebrow svg { width: 15px; height: 15px; }

.gi-hero__title {
  font-family: var(--gi-font-display);
  font-weight: 700;
  font-size: var(--fs-t-xl);
  line-height: 1.17;
  letter-spacing: var(--ls-caps-lg);
  color: var(--gi-sand-50);
  text-wrap: balance;
}
.gi-hero__accent {
  background: linear-gradient(100deg, var(--gi-gold-200), var(--gi-gold-400) 55%, var(--gi-gold-300));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gi-hero__ornament {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 190px;
  margin-block: var(--sp-3) var(--sp-4);
}
.gi-hero__ornament::before {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gi-gold-500), transparent);
}
.gi-hero__ornament span {
  width: 7px; height: 7px;
  rotate: 45deg;
  background: var(--gi-gold-500);
  box-shadow: 0 0 10px rgba(198, 165, 93, 0.8);
  order: -1;
}

.gi-hero__lead {
  max-width: 440px;
  font-size: var(--fs-lg);
  color: var(--gi-sand-300);
  text-wrap: pretty;
}

.gi-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

/* ==========================================================================
   5. ACTUALITES
   ========================================================================== */
.gi-news {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 344px;
  gap: var(--sp-6);
  align-items: start;
}
.gi-news__main { min-width: 0; }
.gi-news__aside { display: grid; gap: var(--sp-5); }

.gi-section-head--inline {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
}
.gi-section-head--inline .gi-section-head__title { margin-top: 0; }

.gi-news__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
}
.gi-news__grid > li { display: flex; }
.gi-news__footer { display: flex; justify-content: center; margin-top: var(--sp-6); }

/* --- Carte article, surface parchemin --- */
.gi-post { width: 100%; border-radius: var(--r-md); }
.gi-post__link { display: flex; flex-direction: column; height: 100%; }
.gi-post__thumb { position: relative; aspect-ratio: 16 / 10; flex: none; }
.gi-post__tag { position: absolute; top: var(--sp-3); left: var(--sp-3); z-index: 4; }

.gi-post__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: var(--sp-4);
  flex: 1;
}
.gi-post__date {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gi-on-paper-muted);
}
.gi-post__title {
  font-family: var(--gi-font-title);
  font-size: var(--fs-t-sm);
  font-weight: 600;
  letter-spacing: -0.014em;
  line-height: 1.34;
  color: var(--gi-on-paper);
  text-wrap: balance;
  transition: color var(--t-fast) var(--ease-out);
}
.gi-card--paper.gi-card--hover:hover .gi-post__title { color: var(--gi-on-paper-accent); }
.gi-post__excerpt {
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--gi-on-paper-body);
}
.gi-post__more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: var(--sp-3);
  font-family: var(--gi-font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--gi-on-paper-accent);
}
.gi-post__more svg { width: 13px; height: 13px; transition: translate var(--t-base) var(--ease-out); }
.gi-card--hover:hover .gi-post__more svg { translate: 4px 0; }

/* Sur papier, le filigrane des vignettes doit rester sombre */
.gi-post__thumb::after {
  background:
    repeating-linear-gradient(115deg, rgba(250, 246, 236, 0.05) 0 1px, transparent 1px 9px),
    radial-gradient(85% 75% at 50% 40%, transparent 42%, rgba(8, 14, 20, 0.40) 100%);
}

/* ==========================================================================
   6. PANNEAU LATERAL
   ========================================================================== */
.gi-panel {
  position: relative;
  padding: var(--sp-5);
  border-radius: var(--r-md);
  background: linear-gradient(168deg, var(--gi-ink-800) 0%, var(--gi-ink-900) 100%);
  box-shadow: inset 0 0 0 1px var(--gi-line), var(--sh-2);
}
.gi-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-2);
  border-bottom: 1px solid var(--gi-line-soft);
}
.gi-panel__title {
  font-family: var(--gi-font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: var(--ls-caps-md);
  color: var(--gi-sand-50);
}
.gi-panel__spark {
  width: 17px; height: 17px;
  color: var(--gi-gold-500);
  animation: gi-pulse-glow 4s var(--ease-in-out) infinite;
}

/* --- Liste d'outils --- */
.gi-tools__list { display: flex; flex-direction: column; }
.gi-tools__list li + li { border-top: 1px solid var(--gi-line-soft); }

.gi-tool {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0.72rem 0.4rem;
  margin-inline: -0.4rem;
  border-radius: var(--r-sm);
  transition: background-color var(--t-fast) var(--ease-out), padding-left var(--t-fast) var(--ease-out);
}
.gi-tool:hover { background: rgba(198, 165, 93, 0.07); padding-left: 0.7rem; }

.gi-tool__ico {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  flex: none;
  border-radius: 50%;
  transition: scale var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}
.gi-tool__ico svg { width: 18px; height: 18px; }
.gi-tool:hover .gi-tool__ico { scale: 1.08; }

/* Teintes des pastilles : une couleur d'element par outil */
.tone-hydro   { color: var(--el-hydro);   background: rgba(79, 166, 227, 0.16);  box-shadow: inset 0 0 0 1px rgba(79, 166, 227, 0.34); }
.tone-geo     { color: var(--el-geo);     background: rgba(229, 177, 58, 0.16);  box-shadow: inset 0 0 0 1px rgba(229, 177, 58, 0.34); }
.tone-pyro    { color: var(--el-pyro);    background: rgba(228, 105, 74, 0.16);  box-shadow: inset 0 0 0 1px rgba(228, 105, 74, 0.34); }
.tone-electro { color: var(--el-electro); background: rgba(177, 137, 221, 0.16); box-shadow: inset 0 0 0 1px rgba(177, 137, 221, 0.34); }
.tone-anemo   { color: var(--el-anemo);   background: rgba(116, 198, 172, 0.16); box-shadow: inset 0 0 0 1px rgba(116, 198, 172, 0.34); }
.tone-gold    { color: var(--gi-gold-400); background: rgba(198, 165, 93, 0.16); box-shadow: inset 0 0 0 1px rgba(198, 165, 93, 0.36); }

.gi-tool__body { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.gi-tool__body strong { font-size: var(--fs-md); font-weight: 600; color: var(--gi-sand-100); }
.gi-tool__body span { font-size: var(--fs-xs); color: var(--gi-text-faint); }
.gi-tool__arrow {
  width: 15px; height: 15px;
  margin-left: auto;
  flex: none;
  color: var(--gi-sand-600);
  transition: color var(--t-fast), translate var(--t-fast) var(--ease-out);
}
.gi-tool:hover .gi-tool__arrow { color: var(--gi-gold-400); translate: 3px 0; }

/* --- Bannieres en cours --- */
.gi-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(90% 55% at 50% 0%, rgba(147, 212, 232, 0.09), transparent 70%);
}
.gi-banner__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.gi-banner__phase { font-size: var(--fs-xs); color: var(--gi-text-faint); letter-spacing: var(--ls-wide); }
.gi-dot-live {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #E4694A;
  animation: gi-ping 2s var(--ease-out) infinite;
}
@keyframes gi-ping {
  0%   { box-shadow: 0 0 0 0 rgba(228, 105, 74, 0.65); }
  70%  { box-shadow: 0 0 0 7px rgba(228, 105, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(228, 105, 74, 0); }
}
.gi-banner__list { display: grid; gap: var(--sp-2); position: relative; z-index: 1; }
.gi-banner__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-sm);
  background: rgba(8, 14, 20, 0.5);
  box-shadow: inset 0 0 0 1px var(--gi-line-soft);
  transition: box-shadow var(--t-fast) var(--ease-out);
}
.gi-banner__item:hover { box-shadow: inset 0 0 0 1px var(--gi-line-strong); }
.gi-banner__avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: linear-gradient(150deg, var(--thumb-a), var(--thumb-b));
}
.gi-banner__avatar svg { width: 24px; height: 24px; color: rgba(8, 14, 20, 0.55); }
.gi-banner__meta { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.gi-banner__meta strong { font-family: var(--gi-font-title); font-size: var(--fs-md); font-weight: 600; letter-spacing: -0.01em; color: var(--gi-sand-50); }
.gi-banner__meta span { font-size: var(--fs-xs); color: var(--gi-text-faint); }
.gi-banner__stars {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-family: var(--gi-font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--gi-gold-300);
}
.gi-banner__stars svg { width: 12px; height: 12px; }

/* --- Compte a rebours --- */
.gi-count { position: relative; z-index: 1; margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--gi-line-soft); }
.gi-count__label {
  font-size: 0.66rem;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--gi-text-faint);
  margin-bottom: var(--sp-3);
}
.gi-count__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); }
.gi-count__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--sp-3) 0.2rem;
  border-radius: var(--r-sm);
  background: linear-gradient(165deg, rgba(36, 53, 71, 0.9), rgba(8, 14, 20, 0.9));
  box-shadow: inset 0 0 0 1px var(--gi-line-soft);
}
.gi-count__value {
  font-family: var(--gi-font-display);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--gi-gold-300);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.gi-count__unit { font-size: 0.6rem; letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--gi-text-faint); }

/* ==========================================================================
   7. GUIDES A LA UNE
   ========================================================================== */
.gi-guides {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 15% 20%, rgba(177, 137, 221, 0.09), transparent 65%),
    radial-gradient(55% 50% at 88% 76%, rgba(116, 198, 172, 0.08), transparent 68%),
    linear-gradient(180deg, var(--gi-ink-900), var(--gi-ink-950) 100%);
}
.gi-guides__particles { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }

.gi-guides__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-5); }
.gi-guides__grid > li { display: flex; }
.gi-guide { display: flex; flex-direction: column; width: 100%; }
.gi-guide__thumb { aspect-ratio: 16 / 10; flex: none; }
.gi-guide__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-5);
  flex: 1;
}
.gi-guide__title {
  font-family: var(--gi-font-title);
  font-size: var(--fs-t-md);
  font-weight: 600;
  letter-spacing: -0.014em;
  line-height: 1.34;
  color: var(--gi-sand-50);
  text-wrap: balance;
  transition: color var(--t-fast);
}
.gi-card--hover:hover .gi-guide__title { color: var(--gi-gold-200); }
.gi-guide__desc { font-size: var(--fs-base); color: var(--gi-text-muted); }
.gi-guide__more {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  margin-top: auto;
  border-radius: 50%;
  color: var(--gi-gold-400);
  box-shadow: inset 0 0 0 1px var(--gi-line);
  transition: background-color var(--t-base), color var(--t-base),
              box-shadow var(--t-base), translate var(--t-base) var(--ease-out);
}
.gi-guide__more svg { width: 16px; height: 16px; }
.gi-card--hover:hover .gi-guide__more {
  color: var(--gi-ink-950);
  background: linear-gradient(160deg, var(--gi-gold-300), var(--gi-gold-500));
  box-shadow: var(--glow-gold);
  translate: 4px 0;
}

/* ==========================================================================
   8. BASE DE DONNEES
   ========================================================================== */
.gi-db__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); }
.gi-db__grid > li { display: flex; }
.gi-db { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-5); width: 100%; }
.gi-db__ico {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  flex: none;
  border-radius: var(--r-md);
  color: var(--gi-gold-400);
  background: radial-gradient(circle at 50% 25%, rgba(198, 165, 93, 0.20), rgba(198, 165, 93, 0.04));
  box-shadow: inset 0 0 0 1px var(--gi-line);
  transition: color var(--t-base), box-shadow var(--t-base), scale var(--t-base) var(--ease-out);
}
.gi-db__ico svg { width: 24px; height: 24px; }
.gi-card--hover:hover .gi-db__ico {
  color: var(--gi-gold-200);
  scale: 1.06;
  box-shadow: inset 0 0 0 1px var(--gi-gold-600), var(--glow-gold);
}
.gi-db__body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.gi-db__body strong { font-family: var(--gi-font-title); font-size: var(--fs-t-md); font-weight: 600; letter-spacing: -0.012em; color: var(--gi-sand-50); }
.gi-db__body span { font-size: var(--fs-sm); color: var(--gi-text-faint); }
.gi-db__count {
  margin-left: auto;
  flex: none;
  font-family: var(--gi-font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--gi-gold-500);
  padding: 0.3rem 0.6rem;
  border-radius: var(--r-xs);
  box-shadow: inset 0 0 0 1px var(--gi-line);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   9. APPEL COMMUNAUTE
   ========================================================================== */
.gi-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3.5rem, 2.5rem + 5vw, 7rem);
  background:
    radial-gradient(60% 90% at 50% 50%, rgba(79, 166, 227, 0.11), transparent 68%),
    linear-gradient(180deg, var(--gi-ink-950), #12202F 55%, var(--gi-ink-950));
}
.gi-cta__particles { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.gi-cta__inner {
  position: relative;
  z-index: var(--z-content);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 720px;
}
.gi-cta .gi-divider { width: 100%; margin-bottom: var(--sp-5); }
.gi-cta__title { font-size: var(--fs-t-2xl); letter-spacing: var(--ls-caps-lg); line-height: 1.16; margin-bottom: var(--sp-4); }
.gi-cta__lead { font-size: var(--fs-lg); color: var(--gi-sand-300); text-wrap: pretty; }
.gi-cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-4); margin-top: var(--sp-7); }

/* ==========================================================================
   10. PIED DE PAGE
   ========================================================================== */
.gi-footer {
  position: relative;
  background: linear-gradient(180deg, var(--gi-ink-950), #05090D);
  border-top: 1px solid var(--gi-line);
}
.gi-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 2.4fr);
  gap: var(--sp-8);
  padding-block: var(--sp-9) var(--sp-7);
}
.gi-footer__brand { display: flex; flex-direction: column; gap: var(--sp-4); align-items: flex-start; }
.gi-footer__pitch { font-size: var(--fs-base); color: var(--gi-text-faint); max-width: 40ch; }
.gi-footer__social { display: flex; gap: var(--sp-2); }

.gi-footer__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }
.gi-footer__label {
  font-family: var(--gi-font-display);
  font-size: 0.68rem;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--gi-gold-500);
  margin-bottom: var(--sp-4);
}
.gi-footer__col li + li { margin-top: 0.55rem; }
.gi-footer__col a { font-size: var(--fs-base); color: var(--gi-sand-300); transition: color var(--t-fast), padding-left var(--t-fast); }
.gi-footer__col a:hover { color: var(--gi-gold-300); padding-left: 0.3rem; }

.gi-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  padding-block: var(--sp-5);
  border-top: 1px solid var(--gi-line-soft);
  font-size: var(--fs-xs);
  color: var(--gi-sand-600);
}
.gi-footer__legal { max-width: 62ch; text-align: right; }

/* ==========================================================================
   11. RESPONSIVE
   Strategie par palier, du plus large au plus etroit.
   ========================================================================== */

/* --- 1280px : la navigation se resserre --- */
@media (max-width: 1280px) {
  .gi-nav__link { padding-inline: 0.7rem; letter-spacing: 0.07em; }
  .gi-news { grid-template-columns: minmax(0, 1fr) 320px; }
  .gi-searchbar { width: 180px; }
}

/* --- 1140px : guides et database en 2 colonnes --- */
@media (max-width: 1140px) {
  .gi-guides__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gi-db__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gi-hero__content { max-width: 480px; }
}

/* --- 1080px : bascule en menu mobile --- */
@media (max-width: 1080px) {
  .gi-nav { display: none; }
  .gi-burger { display: grid; }
  .gi-topbar__item { display: none; }
  .gi-topbar__tools { gap: var(--sp-3); }

  .gi-news { grid-template-columns: minmax(0, 1fr); }
  .gi-news__aside { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* --- 900px : les particules se coupent (seuil defini dans le JS) --- */
@media (max-width: 900px) {
  .gi-footer__top { grid-template-columns: 1fr; gap: var(--sp-7); }
  .gi-footer__cols { grid-template-columns: repeat(2, 1fr); }
  .gi-footer__legal { text-align: left; }
}

/* --- 860px : le hero passe en visuel de fond, texte par-dessus --- */
@media (max-width: 860px) {
  .gi-hero { min-height: 400px; }
  .gi-hero__content { max-width: none; padding-block: var(--sp-7); }
  .gi-hero__lead { max-width: 520px; }
  .gi-hero__sun { right: 12%; top: 34%; }
  /* L'illustration passe en fond plein cadre, le texte se pose dessus */
  .gi-hero__scene {
    width: 100%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 24%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 24%);
  }
  .gi-hero__fade {
    background:
      linear-gradient(180deg,
        rgba(13, 22, 32, 0.52) 0%,
        rgba(13, 22, 32, 0.66) 42%,
        rgba(13, 22, 32, 0.86) 80%,
        var(--gi-ink-900) 100%),
      linear-gradient(90deg, rgba(13, 22, 32, 0.72) 0%, rgba(13, 22, 32, 0.15) 55%, transparent 78%);
  }
  .gi-news__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gi-hero__corners { --corner-size: 38px; }
}

/* --- 760px : tout en pleine largeur --- */
@media (max-width: 760px) {
  .gi-news__aside { grid-template-columns: 1fr; }
  .gi-guides__grid { grid-template-columns: 1fr; }
  .gi-db__grid { grid-template-columns: 1fr; }
  .gi-section-head { align-items: flex-start; flex-direction: column; gap: var(--sp-3); }
  .gi-section-head--inline { flex-direction: row; align-items: center; }
  .gi-cta__actions { width: 100%; flex-direction: column; }
  .gi-cta__actions .gi-btn { width: 100%; }
  .gi-guide__thumb { aspect-ratio: 16 / 9; }
}

/* --- 620px : reglages fins mobile --- */
@media (max-width: 620px) {
  /* Elements masques en mobile : ornement ou redondance uniquement */
  .gi-topbar__desc { display: none; }
  .gi-topbar__spark { display: none; }
  .gi-searchbar { display: none; }
  .gi-hero__corners { display: none; }
  .gi-db__count { display: none; }

  .gi-topbar__inner { justify-content: space-between; gap: var(--sp-3); }
  .gi-topbar__notice { gap: var(--sp-2); }

  .gi-hero { min-height: 0; }
  .gi-hero__content { padding-block: var(--sp-7) var(--sp-8); }
  .gi-hero__lead { font-size: var(--fs-md); }
  .gi-hero__actions { flex-direction: column; align-items: stretch; }
  .gi-hero__actions .gi-btn { width: 100%; }

  .gi-news__grid { grid-template-columns: 1fr; }
  .gi-post__thumb { aspect-ratio: 16 / 9; }
  .gi-post__title { font-size: 1.12rem; }

  .gi-panel { padding: var(--sp-4); }
  .gi-db { padding: var(--sp-4); gap: var(--sp-3); }
  .gi-db__ico { width: 44px; height: 44px; }
  .gi-guide__body { padding: var(--sp-4); }

  .gi-footer__cols { grid-template-columns: 1fr; gap: var(--sp-5); }
  .gi-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* --- 400px : tres petits ecrans --- */
@media (max-width: 400px) {
  .gi-logo__text { font-size: 0.9rem; letter-spacing: 0.04em; }
  .gi-count__value { font-size: 1.08rem; }
}

/* --- 1600px et au-dela : la page s'elargit --- */
@media (min-width: 1600px) {
  /* Le pas global de la racine (gi-tokens.css) a deja fait grandir texte
     et espacements. Ici on ne touche qu'aux grilles. */
  /* La database garde 3 colonnes : 6 tuiles en 4 colonnes laisseraient
     une rangee orpheline de 2. Elles s'elargissent, c'est tout.
     A rebasculer sur 4 le jour ou la grille depassera 8 entrees. */
  .gi-db__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gi-news { grid-template-columns: minmax(0, 1fr) 380px; }
  .gi-hero__content { max-width: 680px; }
  /* Garde-fou : au-dela de 1600 les paragraphes larges decrochent */
  .gi-hero__lead { max-width: 34em; }
  .gi-cta__inner { max-width: 46em; }
}

/* --- Compensation quand les particules sont desactivees --- */
.gi-no-particles .gi-hero__sun { opacity: 0.9; }

/* --- Impression --- */
@media print {
  .gi-topbar, .gi-header, .gi-drawer, .gi-drawer-overlay,
  .gi-hero__media, .gi-corners, .gi-particles { display: none !important; }
  body { background: #fff; color: #000; }
}
