:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #5f6470;
  --line: #e3e5ea;
  --soft: #f4f5f8;
  --blue: #1f4ba5;
  --blue-2: #173c86;
  --red: #e5332a;
  --orange: #d9730d;
  --green: #12805c;
  --display: "Archivo", system-ui, sans-serif;
  --body: "Archivo", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.45 var(--body); font-stretch: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 20px 16px 60px; }
.top { display: flex; align-items: center; gap: 16px; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 14px; min-width: 0; }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--fg); }
.crumbs b { color: var(--fg); font-weight: 600; }
.logo { background: #000; color: #fff; font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: 26px; letter-spacing: 1px; padding: 12px 34px; border-radius: 18px; box-shadow: 0 10px 24px rgba(0,0,0,.18); text-decoration: none; text-transform: uppercase; line-height: 1; }

h1 { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(26px, 4vw, 40px); text-transform: uppercase; margin: 0 0 6px; letter-spacing: .3px; line-height: 1.05; }
.lead { color: var(--muted); margin: 0 0 26px; }

.tabs { display: flex; gap: 6px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.tab { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.tab.on { color: var(--fg); border-color: var(--fg); }
.badge { background: var(--red); color: #fff; font-size: 12px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px; }
.tile { position: relative; aspect-ratio: 1; background: var(--blue); color: #fff; border: 0; border-radius: 34px; display: grid; place-items: center; text-align: center; padding: 18px; text-decoration: none; transition: transform .15s ease, background .15s ease; }
.tile:hover { transform: translateY(-3px); background: var(--blue-2); }
.tile .name { font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: clamp(22px, 2.6vw, 32px); text-transform: uppercase; line-height: 1.05; overflow-wrap: anywhere; }
.tile .badge { position: absolute; top: 16px; right: 16px; font-size: 13px; min-width: 26px; height: 26px; }
.tile.add { background: var(--soft); color: var(--muted); border: 2px dashed #c9cdd6; }
.tile.add:hover { background: #eceef3; }
.tile.add .name { font-size: 18px; }

.bubbles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 26px; }
.bubble { display: grid; justify-items: center; gap: 12px; text-decoration: none; text-align: center; background: none; border: 0; padding: 0; }
.bubble .av { width: 150px; height: 150px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-family: var(--display); font-stretch: 125%; font-weight: 900; font-size: 44px; overflow: hidden; box-shadow: 0 8px 22px rgba(31,75,165,.25); transition: transform .15s ease; }
.bubble:hover .av { transform: scale(1.04); }
.bubble .av img { width: 100%; height: 100%; object-fit: cover; }
.bubble .bn { font-weight: 700; font-size: 17px; }
.bubble .bs { color: var(--muted); font-size: 13px; margin-top: -8px; }
.bubble-wrap { display: grid; justify-items: center; gap: 10px; align-content: start; }
.bubble-copy { border: 1px solid var(--line); background: #fff; border-radius: 99px; font-size: 13px; font-weight: 600; padding: 8px 14px; min-height: 36px; white-space: nowrap; }
.bubble-copy:hover { border-color: #c4c8d1; }
.bubble.add .av { background: var(--soft); color: var(--muted); border: 2px dashed #c9cdd6; box-shadow: none; font-size: 54px; font-weight: 400; }

.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.proj { text-decoration: none; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: grid; background: #fff; transition: box-shadow .15s ease; }
.proj:hover { box-shadow: 0 10px 26px rgba(0,0,0,.08); }
.proj .th { aspect-ratio: 9 / 12; background: #0d0f14; position: relative; }
.proj .th video { width: 100%; height: 100%; object-fit: cover; display: block; }
.proj .pi { padding: 12px 14px; display: grid; gap: 6px; }
.proj .pt { font-weight: 700; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--soft); color: var(--muted); width: fit-content; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.blue { color: var(--blue); background: #e8eefb; }
.chip.orange { color: var(--orange); background: #fdf0e3; }
.chip.green { color: var(--green); background: #e3f4ee; }
.chip.red { color: var(--red); background: #fdeaea; }

.btn { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 16px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; justify-content: center; min-height: 44px; text-decoration: none; }
.btn:hover { border-color: #c4c8d1; }
.btn.dark { background: #000; color: #fff; border-color: #000; }
.btn.blue { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn.green { background: var(--green); color: #fff; border-color: var(--green); }
.btn.big { font-size: 17px; padding: 14px 22px; border-radius: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn[aria-pressed="true"] { border-color: var(--blue); color: var(--blue); background: #e8eefb; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.empty { color: var(--muted); padding: 30px; border: 1px dashed var(--line); border-radius: 18px; text-align: center; }

/* review */
.review { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .review { grid-template-columns: minmax(0, 1fr); } }
.stage { display: grid; gap: 12px; min-width: 0; }
.vtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.player { position: relative; margin: 0 auto; background: #000; border-radius: 16px; overflow: hidden; width: min(100%, calc(70vh * var(--ar, 0.5625))); aspect-ratio: var(--ar, 0.5625); }
.player video, .player canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.player video { object-fit: contain; }
.player.drawing canvas { cursor: crosshair; touch-action: none; }
.player .pin { position: absolute; left: 12px; top: 12px; background: rgba(0,0,0,.7); color: #fff; font-size: 13px; padding: 6px 10px; border-radius: 10px; max-width: calc(100% - 24px); pointer-events: none; }
.scrub { position: relative; height: 40px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; touch-action: none; }
.scrub .fill { position: absolute; inset: 0 auto 0 0; background: rgba(31,75,165,.13); border-radius: 12px 0 0 12px; pointer-events: none; }
.scrub .head { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1px; background: var(--blue); border-radius: 2px; pointer-events: none; }
.scrub .mk { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.transport { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.transport .btn { min-height: 40px; padding: 8px 12px; }
.tc { font-family: var(--mono); font-size: 13px; background: var(--soft); border-radius: 10px; padding: 9px 12px; }
.spacer { flex: 1; }

.side { display: grid; gap: 14px; min-width: 0; }
.card { border: 1px solid var(--line); border-radius: 18px; padding: 16px; background: #fff; display: grid; gap: 12px; }
.card h2 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); }
.banner { border-radius: 14px; padding: 12px 14px; font-weight: 600; }
.banner.orange { background: #fdf0e3; color: #8a4a08; }
.banner.green { background: #e3f4ee; color: #0b5c41; }
.banner.blue { background: #e8eefb; color: var(--blue-2); }
.kinds { display: flex; gap: 6px; flex-wrap: wrap; }
.kind { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; min-height: 36px; }
.kind[aria-pressed="true"] { border-color: var(--fg); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
textarea, input[type=text] { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
textarea { min-height: 90px; resize: vertical; }
.notes { display: grid; gap: 8px; max-height: 52vh; overflow: auto; }
.note { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 6px; cursor: pointer; background: #fff; text-align: left; }
.note.on { border-color: var(--blue); box-shadow: 0 0 0 2px #e8eefb; }
.note .meta { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.note .f { font-family: var(--mono); color: var(--fg); }
.note .tx { white-space: pre-wrap; overflow-wrap: anywhere; }
.note .del { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 12.5px; padding: 2px 4px; }
.note .del:hover { color: var(--red); }
.status { font-size: 13px; color: var(--muted); min-height: 18px; }
.link-box { display: flex; gap: 8px; }
.link-box input { font-family: var(--mono); font-size: 12px; }

.vlist { display: grid; gap: 12px; }
.vrow { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 16px; padding: 10px; text-decoration: none; }
.vrow:hover { border-color: #c4c8d1; }
.vrow .th { width: 64px; aspect-ratio: 9/16; background: #0d0f14; border-radius: 10px; overflow: hidden; }
.vrow .th video { width: 100%; height: 100%; object-fit: cover; }
.vrow .vt { font-weight: 700; }
h3 { font-size: 15px; margin: 26px 0 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }

dialog { border: 0; border-radius: 22px; padding: 26px; max-width: 440px; width: calc(100% - 32px); box-shadow: 0 30px 80px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10,12,20,.45); }
dialog h2 { margin: 0 0 10px; font-size: 20px; }
dialog p { margin: 0 0 16px; color: var(--muted); }
dialog label.check { display: flex; gap: 10px; align-items: center; margin: 4px 0 20px; font-size: 14px; }
dialog label.check input { width: 18px; height: 18px; }
.av-pick { display: flex; gap: 14px; align-items: center; margin: 14px 0 20px; }
.av-pick .av { width: 72px; height: 72px; border-radius: 50%; background: var(--blue); overflow: hidden; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 24px; flex: none; }
.av-pick .av img { width: 100%; height: 100%; object-fit: cover; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #000; color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 50; max-width: calc(100% - 32px); }
.center { min-height: 70vh; display: grid; place-items: center; text-align: center; }
@media (max-width: 600px) {
  .logo { font-size: 15px; letter-spacing: 0.5px; padding: 9px 16px; border-radius: 12px; white-space: nowrap; flex: none; margin-left: auto; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .tile { border-radius: 24px; }
  .bubbles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bubble .av { width: 120px; height: 120px; }
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* espaces clients : logo + copie du lien */
.tile-wrap { position: relative; display: grid; }
.tile-in { display: grid; justify-items: center; gap: 14px; }
.tile-copy { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); border: 0; border-radius: 99px; background: rgba(255,255,255,.16); color: #fff; font-size: 13px; font-weight: 600; padding: 8px 14px; min-height: 36px; white-space: nowrap; transition: background .15s ease; }
.tile-copy:hover { background: rgba(255,255,255,.3); }
.logo-mini { width: 76px; height: 76px; border-radius: 20px; background: #fff; display: grid; place-items: center; overflow: hidden; padding: 8px; flex: none; }
.logo-mini img { width: 100%; height: 100%; object-fit: contain; }
.logo-mini.big { width: 64px; height: 64px; border: 1px solid var(--line); }
.av-pick .av.logo { border-radius: 18px; background: var(--soft); color: var(--muted); border: 1px solid var(--line); padding: 6px; }
.av-pick .av.logo img { object-fit: contain; }
@media (max-width: 600px) { .logo-mini { width: 54px; height: 54px; border-radius: 14px; } .tile-copy { font-size: 12px; padding: 6px 10px; bottom: 10px; } }
.tile-wrap .tile { padding: 18px 16px 62px; }
.tile-wrap .logo-mini { width: 64px; height: 64px; border-radius: 16px; }
.tile-wrap .tile .name { font-size: clamp(18px, 2.2vw, 28px); }
select { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; min-height: 44px; flex: 1; min-width: 0; }
label.card.row { display: flex; align-items: center; flex-wrap: wrap; }
.final-slot:empty { display: none; }
.final-slot { margin-top: 28px; }
.final-card { display: grid; gap: 12px; justify-items: start; }
.final-card .banner { width: 100%; box-sizing: border-box; }
