/* =========================================================================
   Thème « Aincrad » : l'interface de Sword Art Online posée sur le site.
   Chargé APRÈS style.css sur toutes les pages : il en reprend les composants
   (en-tête, boutons, cartes, portails) sans toucher à leur HTML.

   Langage visuel de l'anime : fenêtres de verre aux coins coupés, liseré clair
   en haut, orange pour la sélection, cyan pour le « système », pastilles
   blanches, motif d'hexagones très discret. Ce qui vient du jeu (icônes,
   écrans des établis) garde ses pixels nets.
   ========================================================================= */

:root {
  --sao-orange: #f7a531;
  --sao-orange-hi: #ffd27a;
  --sao-white: #f4f7fa;
  --sao-ink: #1c2530;
  --sao-gray: #66717d;
  --sao-cyan: #67e4ff;
  --sao-glass: rgba(8, 19, 35, 0.66);
  --sao-glass-hi: rgba(14, 32, 56, 0.74);
  --sao-line: rgba(255, 255, 255, 0.13);
  --sao-line-hi: rgba(255, 255, 255, 0.28);
  --display: "Exo 2", "Segoe UI", Roboto, sans-serif;
  --notch: 14px;
}

/* --- Fond : ciel d'Aincrad + hexagones + poussière lumineuse ------------------ */

body { font-family: var(--sans); }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 1 55 16.5v31L28 63 1 47.5v-31z M28 63v34 M1 16.5 28 1' fill='none' stroke='%2367e4ff' stroke-width='.7'/%3E%3C/svg%3E");
  background-size: 56px 97px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 75%, transparent 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 12% 80%, rgba(255, 236, 190, .55), transparent 60%),
    radial-gradient(1.5px 1.5px at 28% 60%, rgba(103, 228, 255, .5), transparent 60%),
    radial-gradient(2px 2px at 46% 90%, rgba(255, 255, 255, .45), transparent 60%),
    radial-gradient(1.5px 1.5px at 63% 70%, rgba(255, 210, 122, .5), transparent 60%),
    radial-gradient(2px 2px at 78% 85%, rgba(103, 228, 255, .45), transparent 60%),
    radial-gradient(1.5px 1.5px at 90% 65%, rgba(255, 255, 255, .4), transparent 60%);
  background-size: 100% 100%;
  animation: dust 18s linear infinite;
  opacity: .8;
}
@keyframes dust {
  from { transform: translateY(6%); opacity: 0; }
  15% { opacity: .8; }
  85% { opacity: .8; }
  to { transform: translateY(-14%); opacity: 0; }
}

/* --- Titres ------------------------------------------------------------------- */

h1, h2, h3, .brand span { font-family: var(--display); }
h1 { font-weight: 800; letter-spacing: .08em; text-shadow: 0 0 28px rgba(103, 228, 255, .25), 0 3px 18px rgba(0, 10, 25, .7); }
h2 { display: flex; align-items: center; gap: .7rem; font-weight: 700; }
h2::before {
  content: "";
  width: .62em;
  height: .62em;
  flex: none;
  background: var(--sao-orange);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(247, 165, 49, .7);
}
.eyebrow { color: var(--sao-cyan); display: flex; align-items: center; gap: .6rem; }
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--sao-cyan), transparent);
}
.eyebrow a { color: inherit; }

/* --- En-tête : barre de menu de l'anime ------------------------------------------ */

.site-header {
  background: linear-gradient(180deg, rgba(6, 15, 30, .86), rgba(6, 15, 30, .62));
  border-bottom: 1px solid var(--sao-line);
  box-shadow: 0 1px 0 rgba(103, 228, 255, .12), 0 10px 30px rgba(0, 8, 20, .35);
}
.brand span { font-size: 1.05rem; font-weight: 800; letter-spacing: .18em; }
.brand img { filter: drop-shadow(0 0 6px rgba(247, 165, 49, .55)); }
.nav { gap: .35rem; }
.nav a {
  position: relative;
  font-family: var(--display);
  font-size: .82rem;
  letter-spacing: .16em;
  border-radius: 999px;
  color: rgba(244, 247, 250, .72);
}
.nav a:hover { color: var(--sao-white); background: rgba(255, 255, 255, .08); }
.nav a[aria-current="page"] {
  color: var(--sao-ink);
  background: var(--sao-white);
  box-shadow: 0 0 0 2px rgba(247, 165, 49, .0), 0 0 18px rgba(255, 255, 255, .35);
}
.lang-select { border-radius: 999px; }

/* --- Boutons : pastilles blanches, orange au survol --------------------------------- */

.btn {
  font-family: var(--display);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #dde4ea);
  color: var(--sao-ink);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 6px 18px rgba(0, 10, 25, .35);
  transition: background .18s, color .18s, box-shadow .18s, transform .12s;
}
.btn:hover {
  color: var(--sao-ink);             /* encre sur orange : 7,6:1 (le blanc ne donnait que 2:1) */
  background: linear-gradient(180deg, #ffd27a, var(--sao-orange));
  box-shadow: 0 0 0 1px rgba(255, 210, 122, .6), 0 0 22px rgba(247, 165, 49, .55);
}
.btn:active { transform: translateY(1px); box-shadow: 0 0 0 1px rgba(255, 210, 122, .6); }
.btn-ghost {
  background: rgba(255, 255, 255, .04);
  color: var(--sao-white);
  box-shadow: inset 0 0 0 1px var(--sao-line-hi);
}
.btn-ghost:hover { color: var(--sao-ink); }

/* --- Fenêtres : verre, coins coupés, liseré ----------------------------------------- */

.card, .portal, .sao-window, .notice, .callout, .faq details, .ip-box {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, 0) 38%),
    var(--sao-glass);
  border: 1px solid var(--sao-line);
  border-radius: 6px;
  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, var(--notch) 100%, 0 calc(100% - var(--notch)));
}
.card::after, .sao-window::after {
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .55), rgba(103, 228, 255, .35) 40%, transparent 75%);
}
.portal { box-shadow: 0 18px 50px rgba(0, 10, 25, .45); }
a.portal:hover, .card.is-link:hover {
  border-color: rgba(247, 165, 49, .55);
  box-shadow: 0 0 0 1px rgba(247, 165, 49, .25), 0 0 34px rgba(247, 165, 49, .18), 0 18px 50px rgba(0, 10, 25, .45);
}
.portal-go { color: var(--sao-orange-hi); font-family: var(--display); }
.tag { border-radius: 999px; }

.notice { border-left: 3px solid var(--sao-orange); }

/* --- Pied de page --------------------------------------------------------------------- */

.site-footer {
  background: linear-gradient(0deg, rgba(4, 10, 20, .9), rgba(4, 10, 20, .55));
  border-top: 1px solid var(--sao-line);
}

/* --- Accueil : effet « Link Start » à l'ouverture --------------------------------------- */

.link-start {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(255, 255, 255, .0) 0, rgba(4, 10, 20, .0) 70%);
  animation: ls-fade 1.6s ease forwards;
}
.link-start span {
  position: absolute;
  width: 12vmax;
  height: 12vmax;
  border-radius: 50%;
  border: 3px solid;
  opacity: 0;
  animation: ls-ring 1.25s cubic-bezier(.2, .7, .3, 1) forwards;
}
.link-start span:nth-child(1) { border-color: #ff6b6b; animation-delay: 0s; }
.link-start span:nth-child(2) { border-color: var(--sao-orange); animation-delay: .08s; }
.link-start span:nth-child(3) { border-color: #ffe66b; animation-delay: .16s; }
.link-start span:nth-child(4) { border-color: #7cff8f; animation-delay: .24s; }
.link-start span:nth-child(5) { border-color: var(--sao-cyan); animation-delay: .32s; }
.link-start span:nth-child(6) { border-color: #9b8cff; animation-delay: .40s; }
.link-start b {
  font-family: var(--display);
  font-size: clamp(1.6rem, 5vw, 3.4rem);
  letter-spacing: .5em;
  color: #fff;
  text-shadow: 0 0 24px rgba(103, 228, 255, .9);
  animation: ls-text 1.4s ease forwards;
}
@keyframes ls-ring { 0% { transform: scale(.1); opacity: 0; } 25% { opacity: .95; } 100% { transform: scale(9); opacity: 0; } }
@keyframes ls-text { 0% { opacity: 0; letter-spacing: 1.2em; } 30% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; letter-spacing: .3em; } }
@keyframes ls-fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

@media (prefers-reduced-motion: reduce) {
  body::after, .link-start { display: none; animation: none; }
}

/* --- Onglets (page launcher) : sélection en pastille blanche ----------------------------- */

.tablist { border-radius: 999px; }
.tab { border-radius: 999px; font-family: var(--display); }
.tab[aria-selected="true"] {
  color: var(--sao-ink);
  background: var(--sao-white);
  box-shadow: 0 0 18px rgba(255, 255, 255, .3);
}
.tab[aria-selected="true"] svg { color: var(--sao-orange); }
