/* LMDM HUB — refonte 2026 (design d'origine : template Matrix) */

:root {
  --theme: #19a2de;
  --panel: #404040;
  --panel-txt: #bfbfbf;
  /* encres CMJN du logo lmdmparis.com */
  --paper: #1e1e21;
  --ink: #f2efe8;
  --c: #00a3d9;
  --m: #e6007e;
  --y: #ffcc00;
  --k: #16161a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font: 16px/1.5 "Segoe UI", Frutiger, "Helvetica Neue", Arial, sans-serif;
  color: #fff;
  background: #1a1a1a url(../images/bg_pattern.jpg) repeat fixed;
}
a { color: var(--theme); text-decoration: none; }
img { display: block; }

#container {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 5px 0;
}


/* ---------- Tuiles ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, 150px);
  grid-auto-rows: 150px;
  grid-auto-flow: dense;
  gap: 10px;
  justify-content: center;
  margin-bottom: 10px;
}
.tile {
  position: relative;
  overflow: hidden;
  transition: opacity .5s ease .1s, box-shadow .15s;
}
.tile img { width: 100%; height: 100%; }
.small  { grid-column: span 1; grid-row: span 1; }
.medium { grid-column: span 2; grid-row: span 1; }
.large  { grid-column: span 2; grid-row: span 2; }

.tile:hover {
  z-index: 2;
  box-shadow: 0 0 0 3px #fff, 0 0 8px 3px #000;
}
/* les autres tuiles s'estompent au survol */
.tiles:has(.tile:hover) .tile:not(:hover) { opacity: .5; }
/* coin "GO" en haut à droite */
a.tile::after {
  content: "GO";
  position: absolute;
  top: 0; right: 0;
  width: 50px; height: 50px;
  padding: 6px 6px 0 0;
  background: linear-gradient(225deg, #fff 50%, transparent 50%);
  color: #202124;
  font: 700 12px/1 "Space Grotesk", system-ui, sans-serif;
  letter-spacing: .04em;
  text-align: right;
  opacity: 0;
  transform: translate(8px, -8px);
  transition: opacity .15s, transform .15s;
  z-index: 3;
}
a.tile:hover::after { opacity: 1; transform: none; }
a.tile:focus-visible { outline: 3px solid var(--theme); outline-offset: 2px; }

@media (max-width: 340px) {
  .tiles { grid-template-columns: repeat(auto-fill, 140px); grid-auto-rows: 140px; }
}

/* ---------- Tuiles animées (champ ASCII façon lmdmparis.com) ---------- */
.live {
  background: var(--paper);
  display: grid;
  place-items: center;
}
.live .field { position: absolute; inset: 0; width: 100%; height: 100%; }
.live .ico {
  position: relative;
  z-index: 1;
  width: 58px; height: 58px;
  margin-bottom: 14px;
  fill: none;
  stroke: var(--fg);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  /* décalage de repérage, comme le logo LMDM */
  filter: drop-shadow(-2px 1px 0 var(--a)) drop-shadow(2px -1px 0 var(--b));
  transition: filter .25s ease, transform .25s ease;
}
.live .ico .cal-day {
  fill: #ee4266;
  font: 700 16px "Space Grotesk", system-ui, sans-serif;
}
/* vapeur du café */
.steam path { opacity: 0; animation: steam 2.4s ease-in-out infinite; }
.steam path:nth-child(2) { animation-delay: .8s; }
.steam path:nth-child(3) { animation-delay: 1.6s; }
@keyframes steam {
  0%   { opacity: 0; transform: translateY(4px); }
  35%  { opacity: .9; }
  100% { opacity: 0; transform: translateY(-4px); }
}
/* icône en couleurs d'origine (Gmail) : pas de décalage au repos */
.live .ico.brand-ico {
  width: 64px; height: 64px;
  stroke: none;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.45));
}
.live:hover .ico.brand-ico {
  filter: drop-shadow(-2px 1px 0 var(--a)) drop-shadow(2px -1px 0 var(--b)) drop-shadow(0 4px 8px rgba(0,0,0,.5));
}
/* G Google animé (reprend l'ancien google.gif) */
.gg .gg-arc { fill: none; stroke-width: 8; }
.gg-spin { transform-origin: 24px 24px; animation: gg-spin 3.6s cubic-bezier(.45,0,.25,1) infinite; }
.gg-blue { stroke-dasharray: 45 315; stroke-dashoffset: -40; animation: gg-close 3.6s ease-in-out infinite; }
.gg-bar  { transform-origin: 24px 24px; animation: gg-bar 3.6s ease-in-out infinite; }
@keyframes gg-spin {
  0%, 25% { transform: rotate(0); }
  75%, 100% { transform: rotate(-360deg); }
}
@keyframes gg-close {
  0%, 12%, 88%, 100% { stroke-dasharray: 45 315; stroke-dashoffset: -40; }
  25%, 75% { stroke-dasharray: 85 275; stroke-dashoffset: 0; }
}
@keyframes gg-bar {
  0%, 12%, 88%, 100% { transform: scaleX(1); }
  25%, 75% { transform: scaleX(.6); }
}

.live:hover .ico {
  transform: scale(1.08);
  filter: drop-shadow(-4px 2px 0 var(--a)) drop-shadow(4px -2px 0 var(--b));
}
.live .label {
  position: absolute;
  left: 10px; right: 6px; bottom: 9px;
  z-index: 1;
  font: 500 12.5px/1.2 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  color: var(--fg);
  text-shadow: 0 1px 3px var(--paper);
}
.live .label::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--y);
  vertical-align: 1px;
}

/* ---------- Tuiles logo (Slug Fiction, Printing Paris) ---------- */
.logo-tile .logo { position: relative; z-index: 1; transition: transform .3s ease, filter .3s ease; }
.logo-tile:hover .logo { transform: scale(1.06); }

/* la limace se dandine */
.logo.slug {
  width: 122px; height: auto;
  transform-origin: 50% 90%;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.5));
  animation: wobble 3.2s ease-in-out infinite;
}
.logo-tile:hover .logo.slug { animation-duration: 1s; }
@keyframes wobble {
  0%, 100% { transform: rotate(-2.5deg) translateY(0); }
  50%      { transform: rotate(2.5deg) translateY(-3px); }
}

/* Printing Paris : reflet qui balaie le logo */
.logo.pp { display: block; width: 236px; }
.logo.pp img { display: block; width: 100%; height: auto; filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); }
.logo.pp::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.85) 50%, transparent 58%) no-repeat;
  background-size: 300% 100%;
  -webkit-mask: url(../images/logos/printingparis-light.png) center / contain no-repeat;
          mask: url(../images/logos/printingparis-light.png) center / contain no-repeat;
  animation: shine 4.5s ease-in-out infinite;
}
@keyframes shine {
  0%, 55% { background-position: 100% 0; }
  100%    { background-position: 0 0; }
}
.logo-tile:hover .logo.pp img {
  filter: drop-shadow(-2px 1px 0 rgba(41,163,224,.6)) drop-shadow(2px -1px 0 rgba(230,0,126,.5));
}

/* ---------- Tuile 2027 : barre de chargement ---------- */
@property --p { syntax: "<integer>"; inherits: true; initial-value: 0; }
.year-box {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 7px;
  margin-bottom: 16px;
  --p: 0;
  animation: load 5s cubic-bezier(.4,0,.2,1) infinite;
}
.year-num {
  font: 700 46px/.9 "Space Grotesk", system-ui, sans-serif;
  letter-spacing: -.03em;
  color: var(--fg);
}
.year .reg { display: inline-block; position: relative; }
.year .reg::before, .year .reg::after {
  content: attr(data-l);
  position: absolute; inset: 0;
  z-index: -1;
  opacity: .85;
}
.year .reg::before { color: var(--a); transform: translate(-.04em, .025em); }
.year .reg::after  { color: var(--b); transform: translate(.04em, -.02em); }
.loadbar {
  position: relative;
  width: 190px; height: 14px;
  padding: 2px;
  border: 2px solid var(--fg);
  border-radius: 9px;
}
.loadbar i {
  display: block;
  height: 100%;
  width: calc(var(--p) * 1%);
  border-radius: 5px;
  background:
    repeating-linear-gradient(-45deg, rgba(255,255,255,.28) 0 6px, transparent 6px 12px),
    linear-gradient(90deg, var(--a), var(--y));
  background-size: 17px 100%, 100% 100%;
  animation: stripes .6s linear infinite;
}
.loadbar::after {
  counter-reset: p var(--p);
  content: counter(p) "%";
  position: absolute;
  left: calc(100% + 8px); top: -2px;
  font: 500 11px "JetBrains Mono", ui-monospace, monospace;
  color: var(--fg);
}
.loadtxt {
  font: 500 11px "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: .8;
}
.loadtxt em::after { content: ""; animation: dots 1.2s steps(4) infinite; }
@keyframes load {
  0%   { --p: 0; }
  70%  { --p: 99; }   /* bloque à 99 %, comme tout projet qui se respecte */
  100% { --p: 99; }
}
@keyframes stripes { to { background-position: 17px 0, 0 0; } }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75%, 100% { content: "..."; } }

/* ---------- Logo LMDM (repris de lmdmparis.com) ---------- */
.brand .mark { position: relative; z-index: 1; text-align: center; color: var(--ink); pointer-events: none; }
.brand .word {
  display: block;
  font: 700 92px/.85 "Space Grotesk", system-ui, sans-serif;
  letter-spacing: -.045em;
}
/* tuile LMDM scindée : 3/4 logo, 1/4 THE HUB */
.brand-stack {
  grid-column: span 2;
  grid-row: span 2;
  display: grid;
  grid-template-rows: 3fr 1fr;
  gap: 10px;
}
.hub { font-weight: normal; }
.hub-word {
  position: relative;
  z-index: 1;
  font: 700 40px/1 "Space Grotesk", system-ui, sans-serif;
  letter-spacing: .02em;
  color: var(--fg);
}
.hub .reg { display: inline-block; position: relative; }
.hub .reg::before, .hub .reg::after {
  content: attr(data-l);
  position: absolute; inset: 0;
  z-index: -1;
  opacity: .9;
  transition: transform .25s ease;
}
.hub .reg::before { color: #0b3a5c; transform: translate(-.04em, .03em); }
.hub .reg::after  { color: var(--b); transform: translate(.04em, -.025em); }
.hub:hover .reg::before { transform: translate(-.07em, .05em); }
.hub:hover .reg::after  { transform: translate(.07em, -.04em); }

.brand .reg { display: inline-block; position: relative; }
.brand .reg::before,
.brand .reg::after {
  content: attr(data-l);
  position: absolute; inset: 0;
  opacity: .85;
  z-index: -1;
  transition: transform .25s ease;
}
/* décalage de repérage CMJN */
.brand .reg::before { color: var(--c); transform: translate(-.035em, .02em); }
.brand .reg::after  { color: var(--m); transform: translate(.035em, -.015em); }
.brand:hover .reg::before { transform: translate(-.07em, .04em); }
.brand:hover .reg::after  { transform: translate(.07em, -.03em); }
.brand .sub {
  display: block;
  margin-top: 12px;
  padding-left: .5em;
  font: 500 12px "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .5em;
  text-transform: uppercase;
}
.brand .sub b { display: inline-block; width: 8px; height: 8px; margin: 0 2px; border-radius: 50%; vertical-align: middle; }
.brand .sub b.k { background: var(--k); box-shadow: inset 0 0 0 1.5px var(--ink); }

/* ---------- Vimeo ---------- */
.vimeo {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4%;
  align-items: center;
  padding: 15px 0;
  background: #070a19;
}
#embed { color: var(--panel-txt); padding-right: 15px; }

/* visuel fusée Vimeo */
.rocket { position: relative; width: 300px; height: 300px; overflow: hidden; }
.rocket-svg { position: relative; z-index: 1; width: 230px; height: 230px; margin-bottom: 20px; }
.rocket .ship { animation: fly 3s ease-in-out infinite; }
.rocket .flame { transform-box: fill-box; transform-origin: 50% 0; animation: flicker .18s ease-in-out infinite alternate; }
.rocket .badge text { fill: #fff; font: italic 700 30px "Space Grotesk", system-ui, sans-serif; }
.rocket .badge { filter: drop-shadow(0 3px 6px rgba(0,0,0,.4)); }
.rocket:hover .ship { animation-duration: 1.2s; }
@keyframes fly {
  0%, 100% { transform: translate(-4px, 4px); }
  50%      { transform: translate(4px, -4px); }
}
@keyframes flicker {
  from { transform: scaleY(.85); opacity: .85; }
  to   { transform: scaleY(1.12); opacity: 1; }
}
#embed iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
@media (max-width: 700px) {
  .vimeo { grid-template-columns: 1fr; justify-items: center; }
  .vimeo > .rocket { width: 240px; height: 240px; }
  .rocket-svg { width: 190px; height: 190px; }
  #embed { width: 100%; padding: 0 15px; }
}

footer { text-align: right; padding: 10px 0 30px; }
footer small { font-size: 12px; color: var(--panel-txt); }

/* ---------- Fenêtres ---------- */
.window {
  margin: auto;
  width: 640px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 40px);
  display: none;
  grid-template-columns: 330px 1fr;
  background: var(--panel);
  color: var(--panel-txt);
  border: 0;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
}
.window[open] { display: grid; grid-template-rows: minmax(0, 1fr); animation: pop .35s cubic-bezier(.34,1.56,.64,1); }
.window.closing { animation: pop-out .12s ease-in forwards; }
.window::backdrop { background: rgba(255,255,255,.9); animation: fade .25s ease; }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
@keyframes pop-out { to { opacity: 0; transform: scale(.8); } }
@keyframes fade { from { opacity: 0; } }

.window-img { width: 330px; height: 100%; max-height: 580px; object-fit: cover; }
.window-body { padding: 25px 25px 20px; overflow-y: auto; font-size: 13px; }
.window h1 { color: #fbfbfb; font-size: 28px; font-weight: normal; line-height: 1.2; }
.window .intro { margin: 8px 0 4px; }
.window h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 8px;
  font: 500 11px "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #fbfbfb;
}
.window h2::before { content: ""; width: 14px; height: 3px; background: var(--theme); }
.window .note { margin-top: 16px; font-size: 12px; }
.window .note a:hover { text-decoration: underline; }

/* liste de liens */
.links { list-style: none; display: grid; gap: 4px; }
.links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  color: #fbfbfb;
  background: rgba(255,255,255,.04);
  border-left: 3px solid transparent;
  transition: background .2s, border-color .2s, transform .2s;
}
.links a::after { content: "→"; margin-left: auto; color: var(--theme); opacity: 0; transition: opacity .2s, transform .2s; transform: translateX(-4px); }
.links a:hover, .links a:focus-visible { background: rgba(255,255,255,.1); border-left-color: var(--theme); outline: none; }
.links a:hover::after, .links a:focus-visible::after { opacity: 1; transform: none; }
.badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  background: var(--b);
  color: #fff;
  font: 500 11px "JetBrains Mono", ui-monospace, monospace;
}
.links .t { display: flex; flex-direction: column; line-height: 1.25; font-size: 13px; }
.links small { font: 11px "JetBrains Mono", ui-monospace, monospace; color: #9a9a9a; }

/* fenêtres sans image, en tuiles */
.window.noimg { width: 600px; }
.window.noimg[open] { grid-template-columns: 1fr; }
.window.noimg .window-body { padding: 25px 25px 25px; }
.window.noimg .close { left: auto; right: 12px; top: 12px; }
.window.noimg h1 { padding-right: 40px; }
/* variante large : 4 tuiles par ligne */
.window.wide { width: 720px; }
.window.wide .wgrid { grid-template-columns: repeat(8, 1fr); grid-auto-rows: 76px; }

.wgrid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 84px;
  gap: 6px;
}
.wgrid:has(a.tile:hover) .tile:not(:hover) { opacity: .5; }
.wgrid .tile:hover { box-shadow: 0 0 0 2px #fff, 0 0 6px 2px #000; }
.window a.tile::after {
  width: 34px; height: 34px;
  padding: 4px 4px 0 0;
  font-size: 9px;
}

/* tuile de site / d'enseigne */
.wtile {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--b);
  color: #fff;
}
.wtile b {
  font: 700 26px/1 "Space Grotesk", system-ui, sans-serif;
  letter-spacing: -.03em;
  text-shadow: -1.5px 1px 0 rgba(0,163,217,.6), 1.5px -1px 0 rgba(230,0,126,.6);
}
.wtile span { font-size: 13px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wtile small {
  display: block;
  font: 10px "JetBrains Mono", ui-monospace, monospace;
  opacity: .75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* réseaux sociaux : une ligne par enseigne */
.social .brand-row { grid-column: 1 / span 2; }
.net {
  display: grid;
  place-items: center;
  padding-bottom: 14px;
  background: var(--n, #2e2e2e);
}
.net[href*="x.com"]       { --n: #14171a; }
.net[href*="facebook"]    { --n: #3b5998; }
.net[href*="instagram"]   { --n: linear-gradient(45deg, #f9a825, #e1306c 45%, #833ab4); }
.net[href*="yelp"]        { --n: #8f0000; }
.net[href*="goo.gl/maps"],
.net[href*="maps.app"]    { --n: #1e7e34; }
.net img { width: 42px; height: 42px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); transition: transform .25s ease; }
.net:hover img { transform: scale(1.12) rotate(-4deg); }
.net span {
  position: absolute;
  left: 0; right: 0; bottom: 5px;
  text-align: center;
  font: 500 10px "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

/* grille pause café */
.grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 14px; }
.grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px 8px;
  font-size: 11px;
  color: #e5e5e5;
  background: rgba(255,255,255,.04);
  transition: background .2s, transform .2s;
}
.grid img { width: 36px; height: 36px; }
.grid a:hover, .grid a:focus-visible { background: var(--theme); color: #fff; transform: translateY(-2px); outline: none; }

/* bouton fermer */
.close {
  position: absolute;
  top: 10px; left: 10px;
  width: 32px; height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  cursor: pointer;
  transition: background .2s;
}
.close::before, .close::after {
  content: "";
  position: absolute;
  top: 15px; left: 8px;
  width: 16px; height: 2px;
  background: #fff;
  transform: rotate(45deg);
}
.close::after { transform: rotate(-45deg); }
.close:hover, .close:focus-visible { background: var(--theme); outline: none; }

@media (max-width: 640px) {
  .window[open] { grid-template-columns: 1fr; grid-template-rows: 140px minmax(0, 1fr); }
  .window-img { width: 100%; height: 140px; }
  .window.noimg[open] { grid-template-rows: minmax(0, 1fr); }
  .window.noimg .window-body { padding: 20px 16px; }
  .wgrid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 72px; }
  .wtile span { font-size: 12px; }
  .window.wide .wgrid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 72px; }
  .wgrid.social { grid-auto-rows: auto; }
  .social .net { height: 72px; }
  .social .brand-row { grid-column: 1 / -1; height: 44px; margin-top: 6px; flex-direction: row; align-items: center; gap: 10px; justify-content: flex-start; }
  .social .brand-row b { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::backdrop { animation: none !important; transition: none !important; }
}
