/* Pages projet · Mathias Wicht */
*,*::before,*::after{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
:root{
  --bg:#05070d;
  --bg-2:rgba(17,23,38,0.75);
  --card:rgba(20,27,45,0.62);
  --line:rgba(255,255,255,0.09);
  --line-2:rgba(255,255,255,0.16);
  --text:#e9edf5;
  --text-2:#a3adc2;
  --text-3:#6b7690;
  --blue:#3b82f6;
  --blue-2:#2563eb;
  --cyan:#38bdf8;
  --blue-soft:rgba(59,130,246,0.12);
  --w:1120px;
}
.bg{ position:fixed; inset:0; z-index:-1; pointer-events:none; overflow:hidden; background:var(--bg); }
.orb{ position:absolute; border-radius:50%; filter:blur(90px); opacity:0.5; }
.orb-1{ width:520px; height:520px; background:radial-gradient(circle, rgba(59,130,246,0.55), transparent 70%); top:-160px; left:-120px; animation:f1 22s ease-in-out infinite; }
.orb-2{ width:460px; height:460px; background:radial-gradient(circle, rgba(56,189,248,0.35), transparent 70%); bottom:-140px; right:-100px; animation:f2 26s ease-in-out infinite; }
@keyframes f1{ 50%{ transform:translate(60px,80px); } }
@keyframes f2{ 50%{ transform:translate(-70px,-50px); } }
.grid-bg{ position:absolute; inset:0; background-image:linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px); background-size:64px 64px; -webkit-mask-image:radial-gradient(ellipse 80% 60% at 50% 20%, black 40%, transparent 90%); mask-image:radial-gradient(ellipse 80% 60% at 50% 20%, black 40%, transparent 90%); }
#progress{ position:fixed; top:0; left:0; height:3px; width:0; z-index:60; background:linear-gradient(90deg,#1d4ed8,#3b82f6,#38bdf8); }

body{ background:var(--bg); color:var(--text); font-family:'Instrument Sans',system-ui,sans-serif; line-height:1.65; -webkit-font-smoothing:antialiased; }
h1,h2,h3,h4{ font-family:'Bricolage Grotesque','Instrument Sans',sans-serif; font-weight:700; line-height:1.12; letter-spacing:-0.025em; }
a{ color:inherit; text-decoration:none; }
img{ display:block; max-width:100%; }
ul, ol{ list-style:none; }
button{ font:inherit; color:inherit; background:none; border:none; cursor:pointer; }
::selection{ background:var(--blue); color:#fff; }
:focus-visible{ outline:2px solid var(--blue); outline-offset:3px; border-radius:4px; }
.wrap{ max-width:var(--w); margin:0 auto; padding:0 28px; }

.btn{ display:inline-flex; align-items:center; gap:8px; padding:12px 20px; border-radius:4px; font-weight:500; font-size:0.95rem; border:1px solid var(--line-2); background:rgba(5,7,13,0.35); transition:border-color .2s, background .2s, transform .2s; }
.btn svg{ width:16px; height:16px; }
.btn:hover{ border-color:var(--blue); transform:translateY(-1px); }
.btn-blue{ background:var(--blue); border-color:var(--blue); color:#fff; box-shadow:none; }
.btn-blue:hover{ background:var(--blue-2); border-color:var(--blue-2); }
.tag{ display:inline-block; font-size:0.78rem; font-weight:500; color:var(--blue); background:var(--blue-soft); padding:4px 10px; border-radius:3px; }

header{ position:sticky; top:0; z-index:50; background:rgba(5,7,13,0.75); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); border-bottom:1px solid var(--line); }
.nav{ display:flex; align-items:center; justify-content:space-between; height:68px; gap:20px; }
.brand{ display:flex; align-items:center; gap:12px; font-family:'Bricolage Grotesque',sans-serif; font-weight:600; }
.brand img{ height:22px; width:auto; }
.brand i{ width:1px; height:22px; background:var(--line-2); }
.back{ display:inline-flex; align-items:center; gap:8px; color:var(--text-2); font-size:0.93rem; transition:color .2s; }
.back:hover{ color:var(--text); }
.back svg{ width:16px; height:16px; }
.nav .btn{ padding:9px 16px; font-size:0.9rem; }

/* Intro du projet */
.p-hero{ padding:64px 0 40px; }
.crumb{ font-size:0.86rem; color:var(--text-3); margin-bottom:18px; }
.crumb a:hover{ color:var(--text); }
.p-hero h1{ font-size:clamp(2.2rem,5vw,3.4rem); margin:14px 0 18px; max-width:860px; }
.p-hero .lead{ font-size:1.12rem; color:var(--text-2); max-width:720px; }
.p-actions{ display:flex; gap:12px; flex-wrap:wrap; margin-top:28px; }
.p-meta{ display:grid; grid-template-columns:repeat(4,1fr); margin-top:44px; border:1px solid var(--line); border-radius:4px; overflow:hidden; background:var(--bg-2); }
.p-meta div{ padding:16px 20px; }
.p-meta div + div{ border-left:1px solid var(--line); }
.p-meta small{ display:block; font-size:0.78rem; color:var(--text-3); margin-bottom:4px; }
.p-meta strong{ font-weight:500; font-size:0.94rem; }

.p-cover{ margin:8px 0 0; border-radius:6px; overflow:hidden; border:1px solid var(--line-2); box-shadow:0 30px 70px rgba(0,0,0,0.45); background:var(--card); }
.p-cover img{ width:100%; }
.p-cover.pad{ padding:40px; display:flex; justify-content:center; gap:28px; align-items:flex-end; flex-wrap:wrap; }
.p-cover.pad img{ width:auto; max-height:560px; border-radius:3px; box-shadow:0 20px 50px rgba(0,0,0,0.45); }
.p-cover.white{ background:#fff; }
.p-cover.lav{ background:linear-gradient(180deg,#a9b6d6,#e3c2c6); }

/* Contenu */
.p-body{ padding-top:72px; padding-bottom:24px; }
.p-sec{ display:grid; grid-template-columns:260px 1fr; gap:48px; padding:44px 0; border-top:1px solid var(--line); }
.p-sec:first-child{ border-top:none; padding-top:0; }
.p-sec > h2{ font-size:1.3rem; position:sticky; top:96px; align-self:start; }
.p-sec > h2 small{ display:block; font-family:'Instrument Sans',sans-serif; font-weight:600; font-size:0.78rem; letter-spacing:0.08em; text-transform:uppercase; color:var(--blue); margin-bottom:8px; }
.p-text p{ color:var(--text-2); margin-bottom:14px; font-size:1.02rem; }
.p-text p strong{ color:var(--text); font-weight:500; }
.p-text p:last-child{ margin-bottom:0; }

.p-steps{ display:grid; gap:12px; }
.p-steps li{ display:grid; grid-template-columns:44px 1fr; gap:14px; padding:18px 20px; border:1px solid var(--line); border-radius:4px; background:var(--card); }
.p-steps b{ font-family:'Bricolage Grotesque',sans-serif; color:var(--blue); font-size:0.9rem; padding-top:2px; }
.p-steps h4{ font-size:1rem; margin-bottom:4px; }
.p-steps p{ color:var(--text-2); font-size:0.94rem; }

.p-checks li{ position:relative; padding:10px 0 10px 30px; border-top:1px solid var(--line); color:var(--text-2); }
.p-checks li:first-child{ border-top:none; }
.p-checks li::before{ content:''; position:absolute; left:4px; top:18px; width:12px; height:7px; border-left:2px solid var(--blue); border-bottom:2px solid var(--blue); transform:rotate(-45deg); }
.p-checks li strong{ color:var(--text); font-weight:500; }

.swatches{ display:flex; flex-wrap:wrap; gap:14px; margin-bottom:22px; }
.sw{ width:120px; }
.sw i{ display:block; height:72px; border-radius:4px; border:1px solid var(--line-2); margin-bottom:8px; }
.sw strong{ display:block; font-size:0.88rem; font-weight:500; }
.sw small{ font-size:0.8rem; color:var(--text-3); font-family:ui-monospace,Consolas,monospace; }
.fonts{ display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; }
.font{ padding:16px 18px; border:1px solid var(--line); border-radius:4px; background:var(--card); }
.font span{ display:block; font-size:1.7rem; margin-bottom:4px; }
.font small{ color:var(--text-3); font-size:0.82rem; }

.p-gallery{ display:grid; grid-template-columns:repeat(var(--cols,3),minmax(0,1fr)); gap:16px; }
.p-gallery button{ text-align:left; display:flex; flex-direction:column; gap:8px; }
.p-gallery .pic{ border-radius:4px; overflow:hidden; border:1px solid var(--line-2); background:var(--card); }
.p-gallery .pic img{ width:100%; transition:transform .4s ease; }
.p-gallery .pic.fixed img{ aspect-ratio:var(--ar,4/3); object-fit:cover; object-position:top; }
.p-gallery button:hover .pic img{ transform:scale(1.03); }
.p-gallery small{ color:var(--text-3); font-size:0.84rem; }

.p-quote{ padding:24px 26px; border-left:3px solid var(--blue); background:var(--card); border-radius:0 4px 4px 0; color:var(--text); font-size:1.05rem; }

/* Projet suivant */
.p-next{ display:grid; grid-template-columns:1fr 1fr; gap:20px; padding:56px 0 24px; border-top:1px solid var(--line); margin-top:40px; }
.p-next a{ display:block; padding:22px 24px; border:1px solid var(--line); border-radius:6px; background:var(--card); transition:border-color .2s, transform .2s; }
.p-next a:hover{ border-color:var(--blue); transform:translateY(-2px); }
.p-next small{ display:block; font-size:0.8rem; color:var(--text-3); margin-bottom:6px; }
.p-next strong{ font-family:'Bricolage Grotesque',sans-serif; font-weight:600; font-size:1.1rem; }
.p-next a:last-child{ text-align:right; }

.p-cta{ margin:40px 0 0; padding:36px; border-radius:6px; border:1px solid rgba(59,130,246,0.35); background:linear-gradient(160deg, rgba(59,130,246,0.14), rgba(20,27,45,0.62) 60%); display:flex; justify-content:space-between; align-items:center; gap:24px; flex-wrap:wrap; }
.p-cta h3{ font-size:1.4rem; margin-bottom:4px; }
.p-cta p{ color:var(--text-2); }

footer{ padding:32px 0 40px; border-top:1px solid var(--line); margin-top:72px; }
.foot{ display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; font-size:0.88rem; color:var(--text-3); align-items:center; }
.foot a:hover{ color:var(--text); }

/* Visionneuse */
.viewer{ position:fixed; inset:0; z-index:100; background:rgba(3,5,10,0.95); backdrop-filter:blur(8px); display:flex; align-items:center; justify-content:center; padding:24px; opacity:0; visibility:hidden; transition:opacity .25s, visibility .25s; }
.viewer.open{ opacity:1; visibility:visible; }
.viewer figure{ max-width:min(92vw,1100px); text-align:center; }
.viewer img{ max-height:82vh; max-width:100%; margin:0 auto; border-radius:3px; }
.viewer.tall{ align-items:flex-start; overflow-y:auto; padding:70px 24px 40px; }
.viewer.tall figure{ width:min(88vw, var(--tw,1000px)); max-width:none; }
.viewer.tall img{ max-height:none; width:100%; }
.viewer figcaption{ margin-top:12px; color:var(--text-2); font-size:0.92rem; }
.v-btn{ position:fixed; width:44px; height:44px; border-radius:4px; border:1px solid var(--line-2); background:#111726; display:flex; align-items:center; justify-content:center; z-index:2; }
.v-btn:hover{ border-color:var(--blue); }
.v-btn svg{ width:18px; height:18px; stroke:var(--text); }
.v-close{ top:20px; right:20px; }
.v-prev{ left:20px; top:50%; margin-top:-22px; }
.v-next{ right:20px; top:50%; margin-top:-22px; }

.fade{ opacity:0; transform:translateY(16px); transition:opacity .6s ease, transform .6s ease; }
.fade.in{ opacity:1; transform:none; }
@media (prefers-reduced-motion:reduce){ *{ transition:none !important; animation:none !important; } .fade{ opacity:1; transform:none; } }

@media (max-width:900px){
  .p-meta{ grid-template-columns:1fr 1fr; }
  .p-meta div:nth-child(3){ border-left:none; }
  .p-meta div:nth-child(n+3){ border-top:1px solid var(--line); }
  .p-sec{ grid-template-columns:1fr; gap:20px; }
  .p-sec > h2{ position:static; }
  .p-gallery{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .p-cover.pad{ padding:24px; }
}
@media (max-width:560px){
  .wrap{ padding:0 20px; }
  .nav .btn .lbl, .brand span, .brand i{ display:none; }
  .p-hero{ padding-top:40px; }
  .p-meta{ grid-template-columns:1fr; }
  .p-meta div + div{ border-left:none; border-top:1px solid var(--line); }
  .p-next{ grid-template-columns:1fr; }
  .p-next a:last-child{ text-align:left; }
  .p-cover.pad{ flex-wrap:nowrap; gap:12px; padding:18px; align-items:center; }
  .p-cover.pad img{ min-width:0; flex:1 1 0; max-height:none; height:auto; }
  .p-body{ padding-top:48px; }
  .v-prev, .v-next{ top:auto; bottom:20px; margin:0; }
  .v-prev{ left:calc(50% - 54px); } .v-next{ right:calc(50% - 54px); }
}

.foot-links{ display:flex; flex-wrap:wrap; gap:18px; }
.foot-links a:hover{ color:var(--text); }

.p-gallery .pic{ position:relative; }
.ai-wrap{ position:relative; }
.ai-badge{ position:absolute; left:10px; bottom:10px; z-index:2; font-size:0.7rem; font-weight:600; letter-spacing:0.02em; color:#fff; background:rgba(5,7,13,0.78); border:1px solid rgba(255,255,255,0.18); padding:4px 8px; border-radius:3px; backdrop-filter:blur(4px); pointer-events:none; }

.nav-r{ display:flex; align-items:center; gap:12px; }
.lang{ display:inline-flex; border:1px solid var(--line, rgba(255,255,255,.12)); border-radius:3px; overflow:hidden; font-size:0.8rem; font-weight:600; letter-spacing:.04em; }
.lang a, .lang span{ padding:7px 10px; color:var(--text-2, #9aa3b5); }
.lang a:hover{ color:#fff; }
.lang .on{ background:rgba(59,130,246,.18); color:#fff; }
@media (max-width:560px){ .back{ font-size:0; gap:0; } .back svg{ width:22px; height:22px; } .brand i, .brand span{ display:none; } }
