/* Site public Lyssa Pestis : charte du panel du bot et du launcher.
   Decor photographique voile, brume, grain ; Western : marque et titres ;
   Catalogue : boutons, intitules, chiffres ; Lino : etiquettes ; Georgia : texte courant. */
@font-face { font-family: Catalogue; src: url('/assets/RDRCatalogueBold-Bold.ttf'); font-display: swap; }
@font-face { font-family: Lino; src: url('/assets/RDRLino-Regular.ttf'); font-display: swap; }
@font-face { font-family: Western; src: url('/assets/Western.woff2') format('woff2'); font-display: swap; }

:root {
    --charbon: #0d0e0e; --carte: #1b1815;
    --papier: #f1e8d8; --sourd: #d4c8b6; --faible: #a99e8e; --ombre: #81776b;
    --laiton: #bd9b69; --laiton-hi: #d9c298; --rouille: #a2493c; --rouille-hi: #cd8a68; --sauge: #a9b48a;
    --filet: #bd9b6926; --filet-mid: #bd9b6955;
    --ease: cubic-bezier(.22, .68, .25, 1);
    --gouttiere: clamp(16px, 6vw, 96px);
}
* { box-sizing: border-box; }
html { background: var(--charbon); scroll-behavior: smooth; scroll-padding-top: 80px; }
html, body { margin: 0; }
body { color: var(--papier); font: 17px/1.65 Georgia, 'Times New Roman', serif; background: var(--charbon); overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: var(--laiton-hi); text-underline-offset: 3px; }
a:hover { color: var(--papier); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--laiton); outline-offset: 3px; }
b { font-weight: normal; color: var(--papier); }

/* ------------------------------------------------------------ decor fixe */
.brume { position: fixed; inset: 30% -15% -15% 35%; z-index: 0; pointer-events: none;
    background: radial-gradient(ellipse at 50% 75%, #c0b6a014, transparent 55%), radial-gradient(ellipse at 80% 30%, #9d5c341c, transparent 58%);
    filter: blur(25px); animation: brume 24s ease-in-out infinite alternate; }
.grain { position: fixed; inset: 0; z-index: 60; opacity: .035; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' d='M0 0h160v160H0z'/%3E%3C/svg%3E"); }
@keyframes developper { from { opacity: .2; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }
@keyframes brume { to { transform: translate(-5%, -3%) scale(1.08); } }
@keyframes lever { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
main, .pied, .barre { position: relative; z-index: 1; }

/* ------------------------------------------------------------ marque et etiquettes */
.marque { font: 52px/.83 Western, serif; letter-spacing: -.01em; color: #c4c2b4; text-decoration: none; }
.marque span { display: block; color: #984b3d; font-size: .82em; }
.marque small { display: block; font: 9px Lino, serif; letter-spacing: .45em; margin-top: 14px; color: #a4a497; }
.marque.petite { font-size: 26px; }
.marque.petite span { display: inline; margin-left: 6px; font-size: 1em; }
.surtitre { display: flex; align-items: center; gap: 12px; font: 12px Lino, serif; letter-spacing: .16em; color: var(--laiton); text-transform: uppercase; margin: 0 0 14px; }
.trait { width: 27px; height: 2px; background: var(--rouille); flex: 0 0 auto; }
.numero { font: 11px Lino, serif; color: var(--rouille-hi); letter-spacing: .08em; }
kbd { font: 14px Lino, serif; letter-spacing: .06em; padding: 1px 6px; border: 1px solid var(--filet-mid); color: var(--laiton-hi); white-space: nowrap; }

/* ------------------------------------------------------------ boutons */
.bouton {
    display: inline-flex; align-items: center; gap: 14px; padding: 14px 26px; text-decoration: none;
    border: 1px solid #bd9b6966; background: linear-gradient(110deg, #3c2d24eb, #211b17ed); box-shadow: 0 4px 14px #0003;
    color: var(--papier); font: 23px Catalogue, serif; letter-spacing: .01em; transition: background .18s, border-color .18s, color .18s;
}
.bouton::after { content: "→"; color: var(--laiton); font: 20px Georgia, serif; }
.bouton:hover, .bouton:focus-visible { background: linear-gradient(110deg, #65392ce6, #35231de8); border-color: var(--laiton); color: #fff4df; }
.bouton-second { background: #15131180; }
.bouton-second::after { content: "↓"; }
.discret { color: var(--sourd); padding: 8px 2px; font: 18px Catalogue, serif; letter-spacing: .02em; text-decoration: none; }
.discret:hover, .discret:focus-visible { color: var(--papier); text-decoration: underline; text-underline-offset: 5px; }

/* ------------------------------------------------------------ barre de navigation */
.barre {
    position: fixed; inset: 0 0 auto; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 16px var(--gouttiere); transition: background .3s, border-color .3s;
    border-bottom: 1px solid transparent;
}
.barre.posee { background: #0d0e0ee8; border-bottom-color: var(--filet); backdrop-filter: blur(6px); }
.barre nav { display: flex; gap: clamp(14px, 2.4vw, 34px); flex-wrap: wrap; justify-content: flex-end; }
.barre nav a { color: #b8b2a4; font: 19px Catalogue, serif; text-decoration: none; transition: color .2s; }
.barre nav a:hover, .barre nav a:focus-visible, .barre nav a[aria-current="page"] { color: var(--papier); }
.barre nav { align-items: center; }
.barre nav .externe { padding-left: clamp(14px, 2.4vw, 34px); border-left: 1px solid var(--filet-mid); }
.barre nav .bouton-barre { padding: 5px 14px; border: 1px solid #bd9b6966; background: linear-gradient(110deg, #3c2d24eb, #211b17ed); color: var(--papier); transition: background .18s, border-color .18s; }
.barre nav .bouton-barre:hover, .barre nav .bouton-barre:focus-visible { background: linear-gradient(110deg, #65392ce6, #35231de8); border-color: var(--laiton); }

/* ------------------------------------------------------------ ouverture */
.ouverture {
    position: relative; min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 780px) minmax(0, 360px);
    justify-content: space-between; align-items: end; gap: 6vw; padding: 120px var(--gouttiere) 9vh; isolation: isolate;
}
.projection { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.projection img {
    position: absolute; inset: -3%; width: 106%; height: 106%; object-fit: cover; object-position: 70% 40%;
    filter: sepia(.25) saturate(.6); opacity: 0; transition: opacity 2.4s ease;
}
.projection img.actif { opacity: 1; animation: derive 16s linear both; }
.projection::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, #0d0e0e 0%, #0d0e0ef0 28%, #0d0e0ec0 55%, #0d0e0e80 80%, #0d0e0eb3),
        linear-gradient(0deg, #0d0e0e 0%, transparent 50%), linear-gradient(180deg, #0d0e0ecc 0%, transparent 22%);
}
@keyframes derive { from { transform: scale(1.06) translateX(1%); } to { transform: scale(1) translateX(-1%); } }
.ouverture-texte { animation: lever .9s var(--ease) both; }
.ouverture-texte .marque { margin-bottom: 7vh; }
.ouverture h1 { margin: 0 0 24px; font: clamp(52px, 7vw, 108px)/.93 Western, serif; letter-spacing: -.02em; color: #d8d3c3; text-shadow: 0 3px 22px #0008; }
h1 em, h2 em { font: inherit; color: #b45e48; }
.devise { font-size: 20px; line-height: 1.55; color: #d5c7b2; margin: 0 0 32px; max-width: 560px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }

/* ------------------------------------------------------------ etat du serveur */
.etat {
    padding: 20px 22px; background: linear-gradient(120deg, #241e19e6, #151413e6); border: 1px solid var(--filet);
    box-shadow: inset 0 0 0 1px #0004, 0 8px 24px #0005; animation: lever .9s .15s var(--ease) both;
}
.etat .l, .releve dt { font: 12px Lino, serif; letter-spacing: .14em; color: var(--faible); text-transform: uppercase; }
.etat .v { font: 26px/1.2 Catalogue, serif; margin-top: 8px; display: flex; align-items: center; gap: 12px; }
.etat p { margin: 8px 0 0; color: var(--sourd); font-size: 15px; }
.etat p:empty { display: none; }
.point { display: inline-block; width: 8px; height: 8px; transform: rotate(45deg); background: var(--faible); flex: 0 0 auto; }
.point.ok { background: var(--sauge); box-shadow: 0 0 8px #a9b48a88; }
.point.ko { background: var(--rouille-hi); }
.releve { display: grid; gap: 10px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--filet); }
.releve div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.releve dd { margin: 0; font: 20px Catalogue, serif; color: var(--papier); }
.adresse { font: 17px Lino, serif; letter-spacing: .04em; color: var(--laiton-hi); border-bottom: 1px dashed var(--filet-mid); padding: 0; }
.adresse:hover { color: var(--papier); border-bottom-color: var(--laiton); }

/* ------------------------------------------------------------ chapitres */
.chapitre { padding: 15vh var(--gouttiere) 6vh; max-width: calc(1240px + 2 * var(--gouttiere)); }
.tete { margin-bottom: 48px; }
.chapitre h2 { margin: 0; font: clamp(40px, 5vw, 76px)/.95 Western, serif; letter-spacing: -.02em; color: #d8d3c3; }
.chapeau { margin: 20px 0 0; color: var(--sourd); font-size: 18px; }
.colonnes { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 6vw; align-items: start; }
.recit p { margin: 0 0 20px; color: #d5c7b2; font-size: 19px; max-width: 620px; }
.lettrine::first-letter { float: left; font: 74px/.8 Western, serif; color: #b45e48; margin: 6px 10px 0 0; }

.plaque { margin: 0; position: relative; border: 1px solid var(--filet-mid); box-shadow: 0 18px 40px #0008; transform: rotate(1.2deg); background: var(--carte); padding: 10px 10px 0; }
.plaque img { filter: sepia(.2) saturate(.7); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.plaque figcaption { font: 12px Lino, serif; letter-spacing: .2em; text-transform: uppercase; color: var(--faible); padding: 10px 2px 12px; text-align: center; }

/* piliers */
.piliers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--filet-mid); }
.piliers li { position: relative; isolation: isolate; padding: 28px 28px 34px 0; border-bottom: 1px solid var(--filet); }
.piliers li:not(:nth-child(3n + 1)) { padding-left: 28px; border-left: 1px solid var(--filet); }
.piliers li::before {
    content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s;
    background: radial-gradient(ellipse at 30% 40%, #a2493c33, transparent 70%);
}
.piliers li:hover::before { opacity: 1; }
.piliers h3 { margin: 10px 0 10px; font: 28px/1.1 Catalogue, serif; font-weight: normal; color: var(--papier); }
.piliers p { margin: 0; color: #a69b8b; font-size: 16px; }

/* panorama */
.panorama { position: relative; margin: 10vh 0 0; height: 62vh; min-height: 320px; overflow: hidden; }
.panorama img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; filter: sepia(.25) saturate(.6); }
.panorama::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #0d0e0e 0%, transparent 30%, transparent 55%, #0d0e0e 100%); }
.panorama figcaption {
    position: absolute; left: var(--gouttiere); right: var(--gouttiere); bottom: 8vh; z-index: 1;
    font: clamp(22px, 2.6vw, 36px)/1.2 Catalogue, serif; color: var(--papier); text-shadow: 0 2px 16px #000c; max-width: 820px;
}

/* rejoindre */
.etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.etapes li { position: relative; isolation: isolate; display: flex; gap: 20px; padding: 12px 12px 12px 0; }
.etapes li::before {
    content: ''; position: absolute; inset: -2px -14px -2px -24px; z-index: -1; opacity: 0; transition: opacity .3s;
    background: radial-gradient(ellipse at 25% 50%, #a2493c55, transparent 72%);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
.etapes li:hover::before { opacity: 1; }
.etapes .numero { min-width: 18px; padding-top: 10px; }
.etapes strong { display: block; font: 28px/1.1 Catalogue, serif; font-weight: normal; color: var(--papier); }
.etapes small { display: block; margin-top: 6px; font: 16px/1.5 Georgia, serif; color: #a69b8b; }
.etapes small b { color: var(--sourd); }
.porte-entree { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 28px; background: linear-gradient(120deg, #241e19cc, #151413cc); border: 1px solid var(--filet); }
.porte-entree .bouton { width: 100%; justify-content: space-between; }
.note { margin: 6px 0 0; color: var(--faible); font-size: 15px; font-style: italic; }

/* ------------------------------------------------------------ reglement */
.page-reglement main { padding-top: 120px; }
.reglement { display: grid; grid-template-columns: 300px minmax(0, 760px); gap: 6vw; padding: 0 var(--gouttiere) 10vh; max-width: calc(1360px + 2 * var(--gouttiere)); }
.sommaire { position: sticky; top: 100px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; padding-right: 8px; scrollbar-width: thin; scrollbar-color: #bd9b6944 transparent; }
.sommaire ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sommaire a { display: flex; gap: 12px; padding: 5px 0; color: #b8b2a4; font: 17px/1.25 Catalogue, serif; text-decoration: none; transition: color .2s, transform .25s var(--ease); }
.sommaire a .numero { min-width: 20px; padding-top: 3px; color: var(--ombre); }
.sommaire a:hover, .sommaire a.actif { color: var(--papier); transform: translateX(6px); }
.sommaire a.actif .numero { color: var(--rouille-hi); }
.texte-reglement h1 { margin: 0 0 18px; font: clamp(48px, 6vw, 92px)/.93 Western, serif; letter-spacing: -.02em; color: #d8d3c3; }
.texte-reglement .version { color: var(--faible); font-style: italic; margin: 0 0 40px; }
.article { padding: 36px 0 12px; border-top: 1px solid var(--filet-mid); }
.article h2 { position: relative; display: inline-block; font: 36px/1.1 Catalogue, serif; margin: 0 0 20px; padding-bottom: 12px; color: var(--papier); }
.article h2::after { content: ''; position: absolute; left: 0; bottom: 0; width: 70px; height: 2px; background: var(--rouille); }
.article h3 { font: 13px Lino, serif; letter-spacing: .16em; text-transform: uppercase; color: var(--laiton); margin: 30px 0 12px; }
.article p, .article li { color: #d5c7b2; }
.article ul { padding-left: 0; list-style: none; }
.article li { position: relative; padding-left: 24px; margin: 6px 0; }
.article li::before { content: ''; position: absolute; left: 4px; top: .62em; width: 6px; height: 6px; transform: rotate(45deg); background: var(--laiton); opacity: .7; }
.article blockquote { margin: 18px 0; padding: 14px 18px; border-left: 2px solid var(--rouille); background: #1b181599; color: var(--sourd); }
.article blockquote p { margin: 0; }
.article strong { font-weight: normal; color: var(--papier); font-family: Catalogue, serif; font-size: 1.08em; letter-spacing: .01em; }

/* ------------------------------------------------------------ pied et toast */
.pied { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin: 8vh var(--gouttiere) 0; padding: 22px 0 32px; border-top: 1px solid var(--filet); font: 11px Lino, serif; letter-spacing: .14em; text-transform: uppercase; color: var(--ombre); }
.pied a { color: var(--faible); text-decoration: none; }
.pied a:hover { color: var(--papier); }
#toast { position: fixed; left: 50%; bottom: 28px; z-index: 70; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease);
    padding: 10px 18px; background: #241e19f2; border: 1px solid var(--filet-mid); font: 18px Catalogue, serif; color: var(--papier); }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ apparitions au defilement */
.revele { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.revele.vu { opacity: 1; transform: none; }

/* ------------------------------------------------------------ tailles d'ecran */
@media (max-width: 1100px) {
    .piliers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .piliers li, .piliers li:not(:nth-child(3n + 1)) { padding: 26px 24px 30px 0; border-left: 0; }
    .piliers li:nth-child(2n) { padding-left: 24px; border-left: 1px solid var(--filet); }
}
@media (max-width: 900px) {
    .ouverture { grid-template-columns: minmax(0, 1fr); align-items: end; gap: 40px; }
    .colonnes { grid-template-columns: minmax(0, 1fr); gap: 48px; }
    .plaque { transform: none; }
    .reglement { grid-template-columns: minmax(0, 1fr); }
    .sommaire { position: static; max-height: none; border-bottom: 1px solid var(--filet); padding-bottom: 20px; }
    .marque { font-size: 42px; }
}
@media (max-width: 640px) {
    .barre { padding: 12px 16px; }
    .barre .marque.petite { font-size: 20px; }
    .barre nav { gap: 12px; }
    .barre nav a { font-size: 16px; }
    .barre nav a[href$="#monde"], .barre nav a[href$="#survie"], .barre nav .externe { display: none; }
    .barre nav .bouton-barre { padding: 3px 10px; }
    .ouverture { padding: 96px 16px 48px; }
    .ouverture-texte .marque { display: none; }
    .devise, .recit p { font-size: 17px; }
    .chapitre { padding: 12vh 16px 4vh; }
    .piliers { grid-template-columns: minmax(0, 1fr); }
    .piliers li, .piliers li:nth-child(2n) { padding: 22px 0 26px; border-left: 0; }
    .bouton { font-size: 20px; padding: 12px 20px; }
    .porte-entree { padding: 20px 16px; }
    .pied { margin: 6vh 16px 0; }
    .reglement { padding: 0 16px 8vh; }
    .article h2 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .revele { opacity: 1; transform: none; }
}
