/* www.rudwolf.fr : plan de réseau rétroéclairé, trois lignes (Maison, Portefeuille, Sécurité : test de mot de passe) */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-display: swap; src: url("fonts/barlow-sc-700.woff2") format("woff2"); }

:root {
  --mur: #0d1015;            /* mur de la station, autour du panneau */
  --plan: #141a21;           /* panneau rétroéclairé */
  --filet: #252d37;
  --texte: #e8ecf0;
  --doux: #a3adb8;           /* 7,6:1 sur --plan */
  --email: #efebe2;          /* plaque émaillée */
  --encre: #121820;
  --vert: 98 196 84;         /* ligne M : pelouse de la maquette */
  --ambre: 240 166 58;       /* ligne P : accent de Portefeuille */
  --bleu: 92 172 238;        /* ligne S : test de mot de passe (26/11/2026) */
  --x: 22px;                 /* abscisse du trait dans chaque colonne */
  --pad: 58px;               /* retrait du contenu à droite du trait */
  --trait: 6px;
  --sign: "Barlow Semi Condensed", "Arial Narrow", "Segoe UI", sans-serif;
  --sans: "Barlow", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--mur); scrollbar-color: #39434f var(--mur); }
body {
  margin: 0; min-height: 100vh; padding: clamp(12px, 2.5vw, 32px) 16px;
  color: var(--texte); font: 400 16px/1.55 var(--sans);
  background: var(--mur);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: rgb(var(--ambre) / .35); color: var(--texte); }
:focus-visible { outline: 2px solid rgb(var(--c, var(--ambre))); outline-offset: 4px; border-radius: 4px; }
a { color: inherit; }

/* ---------- Panneau : un plan derrière sa vitre, éclairé par l'arrière ---------- */
.panneau {
  position: relative; max-width: 1240px; margin: 0 auto;
  padding: clamp(22px, 4vw, 52px) clamp(18px, 4vw, 56px) clamp(20px, 3vw, 36px);
  border-radius: 20px; border: 1px solid var(--filet);
  background:
    radial-gradient(900px 520px at 12% 0%, #1b222b 0%, transparent 70%),
    radial-gradient(700px 500px at 100% 100%, #171d25 0%, transparent 70%),
    var(--plan);
  box-shadow: 0 30px 80px -40px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.04);
}
.reseau { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 0; }
.reseau path { fill: none; stroke-width: var(--trait); stroke-linecap: round; stroke-linejoin: round; }
.reseau .m { stroke: rgb(var(--vert)); }
.reseau .p { stroke: rgb(var(--ambre)); }
.reseau .s { stroke: rgb(var(--bleu)); }

/* ---------- En-tête : plaque de station et annonce ---------- */
.tete { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: clamp(20px, 4vw, 48px); margin-bottom: 64px; }
.plaque {
  flex: none; margin: 0; padding: 7px; border-radius: 10px; background: var(--email);
  box-shadow: 0 10px 24px -12px rgba(0,0,0,.8), inset 0 -2px 0 rgba(0,0,0,.12);
}
.plaque span {
  display: block; padding: 6px 22px 8px; border: 2px solid var(--encre); border-radius: 6px;
  font: 700 clamp(30px, 4vw, 40px)/1 var(--sign); letter-spacing: .01em; color: var(--encre);
}
.intro { max-width: 50rem; padding-bottom: 4px; }
h1 { margin: 0; font: 700 clamp(25px, 2.9vw, 36px)/1.12 var(--sign); letter-spacing: -0.005em; text-wrap: balance; }
.intro p { margin: 8px 0 0; color: var(--doux); font-size: 17px; text-wrap: pretty; }

/* ---------- Lignes ---------- */
.lignes { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(28px, 4vw, 56px); row-gap: 48px; }
.ligne { position: relative; padding-left: var(--pad); }
.ligne-m { --c: var(--vert); }
.ligne-p { --c: var(--ambre); }
.ligne-s { --c: var(--bleu); }
/* trait de secours tant que le script n'a pas tracé le réseau */
.ligne::before { content: ""; position: absolute; left: calc(var(--x) - var(--trait) / 2); top: 15px; bottom: 16px; width: var(--trait); border-radius: 3px; background: rgb(var(--c)); }
.trace .ligne::before { display: none; }
.pastille {
  position: absolute; left: calc(var(--x) - 17px); top: 0; z-index: 2;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: rgb(var(--c)); color: var(--encre); font: 700 19px/1 var(--sign);
  box-shadow: 0 4px 10px -4px rgba(0,0,0,.7);
}

/* ---------- Carte : inclinaison 3D, lueur et liseré qui suivent le pointeur (système de carte-patrimoine) ---------- */
.stage { perspective: 1400px; }
.card {
  position: relative; isolation: isolate; display: block; overflow: hidden; text-decoration: none;
  aspect-ratio: 16 / 10; border-radius: 16px; background: #0f1318; border: 1px solid var(--filet);
  transform: rotateX(calc(var(--rx, 0) * 1deg)) rotateY(calc(var(--ry, 0) * 1deg));
  transform-style: preserve-3d;
  box-shadow:
    calc(var(--ry, 0) * -1.5px) calc(var(--rx, 0) * 1.5px + 26px) 60px -26px rgba(0,0,0,.85),
    inset 0 1px 0 rgba(255,255,255,.05);
}
.card::before, .card::after { content: ""; position: absolute; pointer-events: none; border-radius: inherit; opacity: var(--glow, 0); transition: opacity .6s var(--ease); }
.card::before { inset: 0; z-index: 2; mix-blend-mode: screen; background: radial-gradient(460px circle at calc(var(--mx, 50) * 1%) calc(var(--my, 0) * 1%), rgb(var(--c) / .16), transparent 60%); }
.card::after {
  inset: 0; z-index: 4; padding: 1.5px;
  background: radial-gradient(280px circle at calc(var(--mx, 50) * 1%) calc(var(--my, 0) * 1%), rgb(var(--c) / .95), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.vue { position: absolute; inset: 0; z-index: 0; }
.vue img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .7s var(--ease), object-position 1.4s var(--ease), transform 1.4s var(--ease); }
.ligne-m .img-a { object-position: 50% 40%; }
.ligne-m .img-b { opacity: 0; object-position: 50% 42%; transform: scale(1.04); }
.img-glisse { object-position: 0% 0%; transform: scale(2.1); transform-origin: 0% 0%; transition: transform-origin 1.6s var(--ease); } /* lisible : total et indices, puis la courbe au survol */
.card.on .img-b { opacity: 1; transform: scale(1); }
.card.on .img-glisse { transform-origin: 100% 66%; }
.ligne-s .img-a { transform: scale(1.75); transform-origin: 100% 18%; transition: transform-origin 1.6s var(--ease); } /* le verdict lisible, puis l'évaluation au survol */
.ligne-s .card.on .img-a { transform-origin: 100% 78%; }

.card-bas {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 64px clamp(16px, 2.4vw, 26px) clamp(14px, 2vw, 22px);
  background: linear-gradient(180deg, transparent, rgba(9,12,16,.72) 45%, rgba(9,12,16,.92));
}
.lift { transform: translateZ(var(--z, 0px)); transition: transform .5s var(--ease); }
.card.penche .lift { --z: 26px; }
.card-titre { margin: 0; font: 700 clamp(22px, 2.3vw, 30px)/1.05 var(--sign); color: #fff; text-wrap: balance; }
.action {
  flex: none; display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px 0 18px; border-radius: 999px;
  background: rgb(var(--c)); color: var(--encre); font: 700 16px/1 var(--sign); letter-spacing: .02em;
  box-shadow: 0 8px 18px -8px rgba(0,0,0,.8);
}
.action svg { width: 18px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s var(--ease); }
.card.on .action svg { transform: translateX(4px); }

/* ---------- Descriptif et stations ---------- */
.desc { margin: 22px 0 0; max-width: 54ch; font-size: 17px; text-wrap: pretty; }
.stations { list-style: none; margin: 18px 0 0; padding: 0; }
.stations li { position: relative; padding: 7px 0; color: var(--doux); font-size: 15.5px; }
.stations li::before {
  content: ""; position: absolute; left: calc(var(--x) - var(--pad) - 7px); top: calc(7px + .775em - 7px); /* centre de la première ligne */
  width: 14px; height: 14px; border-radius: 50%; background: var(--texte); box-shadow: 0 0 0 3.5px rgb(var(--c));
}
.terminus {
  position: relative; display: inline-block; margin-top: 14px; padding: 4px 0;
  font: 700 17px/1.2 var(--sign); letter-spacing: .02em; color: var(--texte);
  text-decoration: underline; text-decoration-color: rgb(var(--c)); text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.terminus::before { /* butoir de terminus : barre perpendiculaire au trait */
  content: ""; position: absolute; left: calc(var(--x) - var(--pad) - 13px); top: calc(50% - 3px); width: 26px; height: 6px; border-radius: 3px; background: rgb(var(--c));
}
.terminus:hover { text-decoration-thickness: 3px; }

/* ---------- Pied ---------- */
.pied { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--filet); color: var(--doux); font-size: 13.5px; }
.pied p { margin: 0; }
.pied .discret { color: inherit; text-decoration: none; }   /* lien vers dashboard.rudwolf.fr (derrière Authelia), invisible comme lien */

/* ---------- Téléphone : une seule colonne, les deux lignes partagent le couloir ---------- */
@media (max-width: 820px) {
  .lignes { grid-template-columns: minmax(0, 1fr); row-gap: 56px; }
  .tete { flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 40px; }
  .intro { padding-left: var(--pad); }
}
@media (max-width: 440px) {
  :root { --pad: 48px; --x: 18px; }
  .card { aspect-ratio: 1 / 1; }
  .card-bas { flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 40px; }
  .desc, .intro p { font-size: 16px; }
}

/* Tracé du réseau à l'arrivée : piloté par app.js (Web Animations), coupé si l'animation est réduite */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Contact : bouton en plaque émaillée, fenêtre posée sur le plan ---------- */
.contact-ouvrir, .bouton {
  display: inline-flex; align-items: center; height: 42px; padding: 0 20px; margin-top: 16px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--email); color: var(--encre); font: 700 17px/1 var(--sign); letter-spacing: .02em;
  box-shadow: 0 8px 18px -10px rgba(0,0,0,.9), inset 0 -2px 0 rgba(0,0,0,.14);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.contact-ouvrir:hover, .bouton:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -10px rgba(0,0,0,.9), inset 0 -2px 0 rgba(0,0,0,.14); }
.bouton[disabled] { opacity: .6; cursor: progress; transform: none; }
.bouton-second { height: 42px; padding: 0 16px; border: 1px solid var(--filet); border-radius: 8px; background: transparent; color: var(--texte); font: 700 16px/1 var(--sign); cursor: pointer; }
.bouton-second:hover { border-color: #3a4552; }
.lien { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pied-liens { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.pied-liens a { text-underline-offset: 3px; }
.pied-liens a:hover, .lien:hover { color: var(--texte); }

.contact {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; overflow: auto;
  border: 1px solid var(--filet); border-radius: 16px; color: var(--texte);
  background: radial-gradient(600px 300px at 0% 0%, #1b222b, transparent 70%), var(--plan);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.95);
}
.contact::backdrop { background: rgba(6, 8, 11, .72); backdrop-filter: blur(3px); }
.contact[open] { animation: ouvrir .45s var(--ease); }
@keyframes ouvrir { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.contact-form, .contact-ok { padding: clamp(20px, 4vw, 30px); }
.contact-tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.contact h2 { margin: 0; font: 700 26px/1.1 var(--sign); }
.fermer { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--filet); border-radius: 50%; background: none; color: var(--doux); cursor: pointer; }
.fermer:hover { color: var(--texte); border-color: #3a4552; }
.fermer svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.contact-intro, .contact-ok p { margin: 10px 0 0; color: var(--doux); }
.champs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 20px; }
.champ { display: grid; gap: 6px; font-size: 14.5px; color: var(--doux); }
.champ.large { grid-column: 1 / -1; }
.champ input, .champ textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #2c3541; border-radius: 8px; background: #0f1419; color: var(--texte);
  font: 400 16px/1.4 var(--sans); caret-color: rgb(var(--ambre)); transition: border-color .2s;
}
.champ textarea { resize: vertical; min-height: 130px; }
.champ input:focus, .champ textarea:focus { outline: none; border-color: rgb(var(--ambre)); box-shadow: 0 0 0 3px rgb(var(--ambre) / .18); }
.champ input:user-invalid, .champ textarea:user-invalid { border-color: #e0786a; }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-rgpd { margin: 16px 0 0; font-size: 13.5px; color: var(--doux); }
.contact-rgpd a { color: var(--texte); text-underline-offset: 3px; }
.contact-etat { min-height: 1.4em; margin: 12px 0 0; font-size: 15px; }
.contact-etat.erreur { color: #f0998c; }
.contact-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.contact-actions .bouton { margin-top: 0; }
.contact-ok h2 { color: rgb(var(--vert)); }
.contact-ok .contact-actions { margin-top: 22px; }
@media (max-width: 440px) { .champs { grid-template-columns: 1fr; } }

/* Bouton d'ouverture discret : pastille en haut à droite du panneau, jamais dans le texte */
.tete .contact-ouvrir {
  position: absolute; top: 0; right: 0; height: 36px; margin: 0; padding: 0 14px;
  background: transparent; color: var(--texte); border: 1px solid var(--filet); box-shadow: none;
  font: 700 15px/1 var(--sign);
}
.tete .contact-ouvrir:hover { border-color: rgb(var(--ambre)); transform: none; box-shadow: none; }
.tete { padding-right: 150px; }
@media (max-width: 820px) { .tete { padding-right: 0; } .tete .contact-ouvrir { top: 6px; } }
@media (max-width: 440px) {
  .intro p { display: none; }                       /* sur téléphone : le titre seul */
  .tete .contact-ouvrir { height: 32px; padding: 0 11px; font-size: 14px; }
}
