/*
 * Vitrine publique (kamaraderie.fr/) — refonte du 09/10/2026, dans la même direction que le site de la guilde :
 * fond ardoise, texte blanc cassé, accent laiton, Inter et une police à chasse fixe pour les étiquettes.
 * Plus de fonds Dofus en fondu, de braises ni de logotype en autocollant : un nom de guilde bien posé, des
 * surfaces plates, un seul accent. Le thème clair (« papier ») suit le réglage de l'appareil.
 * Une feuille à part : cette page n'a besoin d'aucune règle de la vraie application, et elle est servie sans connexion.
 */

:root {
  color-scheme: dark;
  --fond: #0e1116;
  --haut: #12171e;
  --panneau: #171d26;
  --panneau-haut: #1d2430;
  --bord: #28313e;
  --bord-fort: #3a4657;
  --texte: #ecebe6;
  --texte-doux: #a7aebb;
  --texte-faible: #7c8696;
  --or: #c9a45c;
  --or-clair: #dfbf78;
  --sur-or: #15110a;
  --encre: #0b0e13;
  --or-fonce: #7d6128;
  --police-logo: "Titan One", "Segoe UI Black", sans-serif;
  --vert: #5fc08f;
  --voile: 255, 255, 255;
  --police: "Inter", "Segoe UI Variable", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --rayon: 8px;
  --rayon-carte: 10px;
  --courbe: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --fond: #ece8df; --haut: #f6f3ec; --panneau: #ffffff; --panneau-haut: #f4f1e9;
    --bord: #ddd8cb; --bord-fort: #c2bcab;
    --texte: #1c1a16; --texte-doux: #5a5548; --texte-faible: #787263;
    --or: #1f3a5f; --or-clair: #2b4f80; --sur-or: #ffffff; --vert: #1f7a52; --encre: #14294a; --or-fonce: #14294a;
    --voile: 40, 30, 10;
  }
  /* En clair, les fonds restent là mais sous un voile d'ivoire : sans lui, ils tournent au brun sale. */
  .decor .calque { filter: blur(3px) saturate(.8) brightness(1.2); }
  .decor::after {
    background:
      radial-gradient(70% 55% at 50% 45%, color-mix(in srgb, var(--fond) 55%, transparent), transparent 80%),
      linear-gradient(180deg, color-mix(in srgb, var(--fond) 72%, transparent), color-mix(in srgb, var(--fond) 86%, transparent));
  }
  .braises i { background: var(--or); box-shadow: 0 0 8px 2px color-mix(in srgb, var(--or) 40%, transparent); }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--fond);
  color: var(--texte);
  font: 400 15px/1.55 var(--police);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; flex: none; }

/* ── Décor : les fonds Dofus en fondu, un voile ardoise, des braises de laiton ── */
.decor { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.decor .calque {
  position: absolute; inset: -4%;
  background-size: cover; background-position: center;
  filter: blur(3px) saturate(.95) brightness(.5);
  opacity: 0; animation: derive 84s linear infinite;
}
.decor .calque:nth-child(2) { animation-delay: -7s; }
.decor .calque:nth-child(3) { animation-delay: -14s; }
.decor .calque:nth-child(4) { animation-delay: -21s; }
.decor .calque:nth-child(5) { animation-delay: -28s; }
.decor .calque:nth-child(6) { animation-delay: -35s; }
.decor .calque:nth-child(7) { animation-delay: -42s; }
.decor .calque:nth-child(8) { animation-delay: -49s; }
.decor .calque:nth-child(9) { animation-delay: -56s; }
.decor .calque:nth-child(10) { animation-delay: -63s; }
.decor .calque:nth-child(11) { animation-delay: -70s; }
.decor .calque:nth-child(12) { animation-delay: -77s; }
/* Le fondu SANS grossissement : `scale` sur une image plein écran oblige le
   navigateur à la ré-échantillonner à chaque image (et à recalculer son flou
   avec elle). Un fondu seul se compose sans rien repeindre. Mesuré sur un
   profil A23 bridé ×4 : −1,6 point au repos, −9 en défilement. */
@keyframes derive {
  0% { opacity: 0; }
  1.8% { opacity: 1; }
  6.5% { opacity: 1; }
  8.3% { opacity: 0; }
  100% { opacity: 0; }
}
/* Le voile : de l'ardoise (et non plus du brun), plus dense sur les bords, avec une lueur de laiton au centre. */
.decor::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 55% at 50% 45%, color-mix(in srgb, var(--or) 14%, transparent), transparent 70%),
    radial-gradient(120% 100% at 50% 50%, transparent 35%, color-mix(in srgb, var(--fond) 94%, #000) 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--fond) 55%, transparent), color-mix(in srgb, var(--fond) 78%, transparent));
}
.braises { position: absolute; inset: 0; z-index: 1; }
.braises i {
  position: absolute; bottom: -12px;
  width: var(--t, 4px); height: var(--t, 4px); border-radius: 50%;
  background: var(--or-clair);
  box-shadow: 0 0 10px 2px color-mix(in srgb, var(--or-clair) 50%, transparent);
  opacity: 0;
  animation: monte var(--d, 14s) linear infinite;
  animation-delay: var(--r, 0s);
}
@keyframes monte {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: .9; }
  60% { opacity: .55; }
  100% { transform: translate(var(--x, 30px), -105vh); opacity: 0; }
}

/* ── Barre du haut ── */
.barre {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 3vw, 32px);
  background: color-mix(in srgb, var(--fond) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bord);
}
.gauche { display: flex; align-items: center; gap: 16px; min-width: 0; }
.marque { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.marque img { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 0 0 1px var(--bord-fort); }
.live {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 11px; border-radius: var(--rayon);
  border: 1px solid var(--bord); background: var(--panneau);
  font-size: 12.5px; font-weight: 550; color: var(--texte-doux); white-space: nowrap;
}
.live small { font: 500 10.5px var(--mono); letter-spacing: .1em; color: var(--vert); }
.live .point { width: 7px; height: 7px; border-radius: 50%; background: var(--vert); }
.live.calme .point { background: var(--texte-faible); }
.pilule {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--rayon);
  border: 1px solid var(--bord-fort); background: transparent;
  color: var(--texte); font-weight: 600; font-size: 13.5px; white-space: nowrap;
  transition: background .18s var(--courbe), border-color .18s var(--courbe);
}
.pilule:hover { background: rgba(var(--voile), .06); border-color: var(--texte-faible); }

/* ── Scène : le nom de la guilde, une phrase, deux portes ── */
main { position: relative; z-index: 2; }
.scene {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: clamp(40px, 8vh, 96px) 20px clamp(72px, 10vh, 100px);
  gap: clamp(20px, 3.5vh, 32px);
  min-height: calc(100dvh - 58px);
  position: relative;
}
.defiler {
  position: absolute; left: 50%; bottom: 24px; translate: -50% 0;
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: var(--rayon);
  font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--texte-faible);
  border: 1px solid var(--bord); background: transparent;
  transition: color .18s var(--courbe), border-color .18s var(--courbe);
}
.defiler svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.defiler:hover { color: var(--texte); border-color: var(--bord-fort); }

.logotype {
  display: flex; flex-direction: column; align-items: center;
  max-width: 100%;
  will-change: transform;
  animation: arrivee 1.1s cubic-bezier(.34, 1.56, .64, 1) both, flotte 8.5s cubic-bezier(.45, .05, .55, .95) 1.1s infinite;
}
@keyframes arrivee { from { opacity: 0; transform: scale(.82) rotate(-3deg); } to { opacity: 1; transform: none; } }
/* Translation SEULE. La rotation, même d'un tiers de degré, oblige le navigateur
   à recalculer le `drop-shadow(0 0 40px …)` du titre à CHAQUE image — c'est le
   poste le plus cher de la page (2 animations, 5,6 points de CPU). Déplacer une
   couche ne la repeint pas : le flottement reste, le calcul disparaît. */
@keyframes flotte {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
/* L'article (« La ») en étiquette collée de travers au-dessus du nom. */
.logotype .la {
  align-self: flex-start; margin: 0 0 -.35em .6em; z-index: 1;
  font: 400 clamp(19px, 2.7vw, 32px)/1 var(--police-logo);
  text-transform: uppercase; letter-spacing: 0;
  color: var(--encre); background: var(--or-clair);
  padding: .18em .5em .12em; border-radius: .3em; border: 3px solid var(--encre);
  box-shadow: 0 4px 0 var(--or-fonce), 0 10px 22px rgba(0, 0, 0, .5);
  transform: rotate(-7deg);
}
/* La taille suit la longueur du nom (`--lettres`, posé par le serveur) : un nom plus long que « Kamaraderie »
   rapetisse au lieu de déborder. */
.nom {
  margin: 0;
  font: 400 clamp(30px, min(9vw, calc(110vw / var(--lettres, 11))), 128px)/.95 var(--police-logo);
  letter-spacing: .01em; text-transform: uppercase; white-space: nowrap; isolation: isolate;
  filter: drop-shadow(0 0 40px color-mix(in srgb, var(--or-clair) 20%, transparent));
}
/* Contour épais et extrusion sur un calque ::before, DERRIÈRE le remplissage (un texte en dégradé laisse voir à travers
   lui toute ombre qu'il porterait lui-même). */
.nom span { position: relative; display: inline-block; }
.nom span::before {
  content: attr(data-t);
  position: absolute; inset: 0; z-index: -1;
  color: var(--encre); -webkit-text-fill-color: var(--encre); -webkit-text-stroke: .14em var(--encre);
  text-shadow: 0 .04em 0 var(--encre), 0 .08em 0 var(--encre), 0 .11em 0 var(--encre), 0 .2em .28em rgba(0, 0, 0, .55);
}
.nom .or {
  background: linear-gradient(180deg, color-mix(in srgb, var(--or-clair) 55%, #fff) 10%, var(--or-clair) 45%, var(--or) 72%, var(--or-fonce) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.nom .creme { color: #fbf8f1; }

.accroche {
  margin: 0; max-width: 48ch;
  font-size: clamp(16px, 1.5vw, 19px); font-weight: 500; line-height: 1.55;
  color: var(--texte);
}
.accroche em { font-style: normal; color: var(--texte-faible); font-weight: 400; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 22px; border-radius: var(--rayon);
  font: 600 14.5px/1 var(--police);
  transition: background .18s var(--courbe), border-color .18s var(--courbe), color .18s var(--courbe);
}
.bouton svg { width: 17px; height: 17px; }
.bouton-or { color: var(--sur-or); background: var(--or); border: 1px solid var(--or); }
.bouton-or svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: translate .18s var(--courbe); }
.bouton-or:hover { background: var(--or-clair); border-color: var(--or-clair); }
.bouton-or:hover svg { translate: 3px 0; }
.bouton-verre { color: var(--texte); border: 1px solid var(--bord-fort); background: transparent; }
.bouton-verre svg { fill: currentColor; }
.bouton-verre:hover { background: rgba(var(--voile), .06); border-color: var(--texte-faible); }
.bouton:focus-visible, .pilule:focus-visible, .marque:focus-visible, .defiler:focus-visible { outline: 2px solid var(--or); outline-offset: 3px; }

/* ── Sous le premier écran : ce que la guilde y trouve ── */
.contenu {
  width: min(1120px, 100% - 40px); margin-inline: auto;
  display: grid; gap: clamp(56px, 9vw, 104px); padding-block: clamp(28px, 5vw, 56px) clamp(64px, 9vw, 112px);
}
.surtitre { margin: 0 0 12px; font: 500 11.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--or); }
.contenu h2 {
  margin: 0; max-width: 22ch; text-wrap: balance;
  font: 700 clamp(26px, 3.6vw, 40px)/1.12 var(--police); letter-spacing: -.025em;
}
.contenu h2 em { font-style: normal; color: var(--or); }
.intro { margin: 14px 0 0; max-width: 58ch; color: var(--texte-doux); font-size: 16px; }

/* Aujourd'hui : l'Almanax du jour et quelques totaux, rien qui identifie un membre. */
.vivant { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center; gap: 12px; }
.almanax-vitrine, .chiffre {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: var(--rayon-carte);
  border: 1px solid var(--bord); background: var(--panneau);
}
.almanax-vitrine img { width: 52px; height: 52px; object-fit: contain; padding: 4px; border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--fond); }
.almanax-vitrine div { display: grid; gap: 2px; text-align: left; }
.almanax-vitrine small { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--or); }
.almanax-vitrine strong { font-size: 17px; letter-spacing: -.01em; }
.almanax-vitrine span { font-size: 13px; color: var(--texte-faible); }
.chiffres { display: contents; }
.chiffre { flex-direction: column; align-items: flex-start; gap: 2px; min-width: 150px; justify-content: center; }
.chiffre b { font: 700 32px/1 var(--police); letter-spacing: -.03em; color: var(--texte); font-variant-numeric: tabular-nums; }
.chiffre span { font-size: 13px; color: var(--texte-doux); }

/* Les fonctions : une carte par page du site. */
.fonctions { text-align: left; }
.grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 32px; }
.fonction {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px 18px 18px;
  border-radius: var(--rayon-carte); border: 1px solid var(--bord); background: var(--panneau);
  transition: border-color .18s var(--courbe), background .18s var(--courbe);
}
.fonction:hover { border-color: var(--bord-fort); background: var(--panneau-haut); }
.fonction-icone {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 10px; border-radius: var(--rayon);
  background: var(--fond); border: 1px solid var(--bord);
}
.fonction-icone img { width: 32px; height: 32px; object-fit: contain; }
.fonction h3 { margin: 0; font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; }
.fonction p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--texte-doux); }

/* Pour commencer : trois étapes. */
.parcours { display: grid; justify-items: center; text-align: center; }
.parcours h2 { max-width: none; }
.etapes { list-style: none; margin: 32px 0 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; text-align: left; }
.etapes li {
  display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--rayon-carte);
  border: 1px solid var(--bord); background: var(--panneau);
}
.etapes b {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  font: 600 14px/1 var(--mono); color: var(--or); border: 1px solid var(--or);
}
.etapes strong { display: block; font-size: 15px; font-weight: 650; margin-bottom: 4px; }
.etapes span { font-size: 13.5px; color: var(--texte-doux); }
.actions.fin { margin-top: 36px; }

/* Les cartes se révèlent en entrant à l'écran, là où le navigateur sait le faire ; ailleurs elles sont déjà là. */
@supports (animation-timeline: view()) {
  .fonction, .etapes li, .vivant > * {
    animation: revele linear both; animation-timeline: view(); animation-range: entry 0% entry 45%;
  }
}
@keyframes revele { from { opacity: 0; translate: 0 12px; } }

/* ── Pied ── */
.pied {
  position: relative; z-index: 2;
  text-align: center;
  padding: 14px clamp(16px, 3vw, 32px);
  background: var(--fond); border-top: 1px solid var(--bord);
  font-size: 13px; color: var(--texte-faible);
}
.pied .mentions { max-width: none; margin: 8px auto 0; font-size: 11.5px; line-height: 1.55; color: var(--texte-faible); opacity: .85; }

/* ── La visite en vidéo : un cadre plat, la présentation muette en boucle, un lien pour la voir avec le son ── */
.visite { text-align: left; }
.visite-cadre { position: relative; margin-top: 28px; overflow: hidden; border-radius: var(--rayon-carte); border: 1px solid var(--bord); background: #07070a; aspect-ratio: 16 / 9; }
.visite-video { display: block; width: 100%; height: 100%; object-fit: cover; background: #07070a; }
.visite-son {
  position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 11px;
  border-radius: var(--rayon); font: 600 13px var(--police); color: #fff; text-decoration: none;
  background: rgba(10, 10, 14, .72); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  transition: background .18s var(--courbe), color .18s var(--courbe);
}
.visite-son svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.visite-son:hover { background: var(--or); color: var(--sur-or); }
.visite-son:focus-visible { outline: 2px solid var(--or); outline-offset: 3px; }

/* ── Téléphone ── */
@media (max-width: 900px) { .grille { grid-template-columns: repeat(2, minmax(0, 1fr)); } .etapes { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .live small { display: none; }
  /* Empilés, les deux boutons prennent la largeur des cartes. */
  .actions { flex-direction: column; width: min(100%, 360px); }
  .bouton { width: 100%; }
}
@media (max-width: 560px) {
  .grille { grid-template-columns: minmax(0, 1fr); }
  .fonctions { text-align: center; }
  .fonctions .intro, .fonctions h2 { margin-inline: auto; }
  .fonction { text-align: left; }
  .defiler { display: none; }
}
@media (max-width: 640px) { .visite-cadre { margin-top: 20px; } .visite-son { right: 10px; bottom: 10px; padding: 7px 12px 7px 9px; font-size: 12.5px; } }
@media (max-width: 480px) {
  .barre .marque .texte { display: none; }
  .gauche { gap: 10px; }
}
/* ── Téléphone : moins de couches plein écran ──
   Chaque calque est une image plein écran composée en continu ; chaque braise,
   une couche de plus avec son ombre. Sur un écran étroit, quatre fonds suffisent
   à donner le mouvement (le fondu dure 5,5 s, les fonds sont décalés de 7 s —
   on n'en voit qu'un à la fois) et six braises suffisent à meubler le bas.
   Mesuré sur un profil A23 bridé ×4 : −2,6 points pour les fonds, −2,5 pour
   les braises, au repos comme en défilement. */
@media (max-width: 720px) {
  .decor .calque:nth-child(n+5) { display: none; }
  .braises i:nth-child(n+7) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .decor .calque:first-child { opacity: 1; }
}

/* ── La visite en grand : « Découvrir le site » ouvre la vidéo, avec le son ── */
.visite-modale { width: min(1100px, 94vw); padding: 0; border: 1px solid var(--bord); border-radius: var(--rayon-carte); background: #07070a; overflow: visible; color: inherit; }
.visite-modale::backdrop { background: rgba(4, 4, 8, .82); backdrop-filter: blur(6px); }
.visite-modale[open] { animation: visite-ouvre .35s cubic-bezier(.2, .8, .2, 1); }
.visite-modale[open]::backdrop { animation: visite-voile .35s ease; }
@keyframes visite-ouvre { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes visite-voile { from { opacity: 0; } }
.visite-lecteur { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: inherit; background: #07070a; }
.visite-fermer { position: absolute; top: -46px; right: 0; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--bord); border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; transition: background .2s, color .2s; }
.visite-fermer svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.visite-fermer:hover { background: var(--or); color: var(--sur-or); }
@media (prefers-reduced-motion: reduce) { .visite-modale[open], .visite-modale[open]::backdrop { animation: none; } }
