:root {
  --bg: #0C1020;
  --surface: #151B30;
  --surface2: #1D2542;
  --text: #EEF1F8;
  --muted: #A9B3CC;
  --line: #2A3355;
  --gel: #FF3D8B;
  color-scheme: dark;
}
html[data-profile="son"]        { --gel: #2EC4F1; }
html[data-profile="lumiere"]    { --gel: #FF3D8B; }
html[data-profile="video"]      { --gel: #FFB020; }
html[data-profile="polyvalent"] { --gel: #A78BFA; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Archivo", system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
a { color: var(--text); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gel);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 1.25rem; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(12, 16, 32, .9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav .in {
  max-width: 1000px; margin: 0 auto; padding: .7rem 1.25rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1.5rem;
}
.brand { font-weight: 800; letter-spacing: -.01em; text-decoration: none; font-size: 1.1rem; }
.nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; margin: 0; padding: 0; }
.nav ul a { text-decoration: none; padding: .2rem 0; border-bottom: 3px solid transparent; }
.nav ul a:hover { border-bottom-color: var(--line); }
.nav ul a[aria-current="page"] { border-bottom-color: var(--gel); }

/* Décor de scène */
.hero, .pagehead {
  position: relative;
  background-color: var(--bg);
  background-image: url("../images/scene.svg");
  background-repeat: no-repeat;
  background-size: cover;
}
.hero { background-position: center bottom; min-height: 82vh; display: flex; align-items: center; }
.hero::before, .pagehead::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(12,16,32,.88) 0%, rgba(12,16,32,.55) 55%, rgba(12,16,32,.15) 100%),
    linear-gradient(to bottom, rgba(12,16,32,0) 60%, var(--bg) 100%);
}
.hero .wrap, .pagehead .wrap { position: relative; }
.hero .wrap { padding-top: 3rem; padding-bottom: 5rem; }

.pagehead { background-position: center 90%; padding: 3rem 0 2.5rem; }
.pagehead::before {
  background:
    linear-gradient(90deg, rgba(12,16,32,.9) 0%, rgba(12,16,32,.6) 60%, rgba(12,16,32,.3) 100%),
    linear-gradient(to bottom, rgba(12,16,32,0) 55%, var(--bg) 100%);
}

h1 {
  font-size: clamp(2.5rem, 8vw, 4.6rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.03em;
  margin: 0 0 .6rem;
}
.pagehead h1 { font-size: clamp(2rem, 6vw, 3rem); }
.role { font-size: 1.25rem; font-weight: 600; margin: 0 0 1.75rem; }
#intro { font-size: 1.2rem; max-width: 38rem; margin: 0 0 2rem; }

/* Sélecteur de profil */
.switchbox p { margin: 0 0 .5rem; color: var(--muted); font-size: .95rem; }
.switch { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.switch button {
  font: inherit; font-weight: 600;
  padding: .5rem 1rem;
  border: 2px solid var(--text);
  background: rgba(12,16,32,.4);
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
}
.switch button[aria-pressed="true"] {
  background: var(--gel);
  border-color: var(--gel);
  color: #0C1020;
}

.button {
  display: inline-block; font-weight: 800; text-decoration: none;
  background: var(--gel); color: #0C1020;
  padding: .75rem 1.4rem; border-radius: 4px;
}

/* Sections */
main section { padding: 2.5rem 0 1rem; }
h2 {
  font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em;
  margin: 0 0 1rem; padding-bottom: .5rem;
  border-bottom: 3px solid var(--gel);
  display: inline-block;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.card, .tile {
  display: flex; flex-direction: column; gap: .35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gel);
  border-radius: 4px;
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  transition: background-color .2s ease, transform .2s ease;
}
.card:hover, .tile:hover { background: var(--surface2); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .card, .tile { transition: none; } .card:hover, .tile:hover { transform: none; } }
.card .when { color: var(--muted); font-size: .9rem; }
.card h3, .tile h3 { margin: 0; font-size: 1.15rem; line-height: 1.25; font-weight: 800; }
.card .org { display: block; font-weight: 400; color: var(--muted); margin-top: .1rem; }
.card p, .tile p { margin: .25rem 0 0; color: var(--muted); font-size: .98rem; }
.card .go { margin-top: auto; padding-top: .6rem; font-weight: 600; color: var(--gel); }
.tile h3 { font-size: 1.3rem; }

details.more { margin-top: 2rem; }
summary { cursor: pointer; font-weight: 600; padding: .5rem 0; }
details.more .grid { margin-top: 1rem; }

/* Détail d'une expérience */
.detail { max-width: 720px; padding-bottom: 3rem; }
.detail .when { color: var(--muted); margin: 0 0 .4rem; }
.detail h1 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: .25rem; }
.detail .orgline { font-size: 1.3rem; font-weight: 600; margin: 0 0 1.5rem; color: var(--muted); }
.detail h2 { font-size: 1.25rem; margin-top: 2rem; }
.detail ul { padding-left: 1.2rem; }
.detail li { margin: .3rem 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.gallery img { width: 100%; height: auto; display: block; border-radius: 4px; }
.gallery figure { margin: 0; }
.back { display: inline-block; margin: 1.5rem 0 1rem; color: var(--muted); }

/* Compétences et formation */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.25rem; margin: 0; }
.skills div { border-top: 3px solid var(--gel); padding-top: .6rem; }
.skills dt { font-weight: 800; font-size: 1.15rem; }
.skills dd { margin: .25rem 0 0; color: var(--muted); }
.formation { list-style: none; padding: 0; margin: 0; max-width: 640px; }
.formation li { padding: .7rem 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.formation li:last-child { border-bottom: 0; }
.formation .sub { display: block; font-weight: 400; color: var(--muted); font-size: .95rem; }

.mail { font-size: clamp(1.3rem, 4.5vw, 2rem); font-weight: 800; word-break: break-word; }

footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.5rem 0 2.5rem; color: var(--muted); font-size: .95rem; }

@media (max-width: 640px) {
  .hero { min-height: 74vh; }
  .hero::before { background: linear-gradient(to bottom, rgba(12,16,32,.65) 0%, rgba(12,16,32,.8) 70%, var(--bg) 100%); }
}

main section.wrap { padding-top: 2.5rem; padding-bottom: 1rem; }

.contactlist { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1.1rem; }
.contactlist li { display: flex; align-items: center; gap: .9rem; font-size: clamp(1rem, 3.9vw, 1.6rem); font-weight: 800; overflow-wrap: anywhere; }
.contactlist svg { flex: none; }
.contactlist .ico { color: #A78BFA; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.videos { display: grid; gap: 1.25rem; }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 4px; background: var(--surface); display: block; }
.video p { margin: .4rem 0 0; color: var(--muted); font-size: .95rem; }

/* Onglets colorés par catégorie */
.switch button { border-color: var(--c, var(--text)); }
.switch button[aria-pressed="true"] { background: var(--c, var(--gel)); border-color: var(--c, var(--gel)); color: #0C1020; }

.catdesc { color: var(--muted); margin: 0 0 1.25rem; font-size: 1.05rem; }

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .7rem; }
.chips li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gel);
  border-radius: 4px;
  padding: .65rem 1.1rem;
  font-weight: 600;
  font-size: 1.1rem;
}

/* Photo */
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gel); }
.portrait {
  display: block; width: 168px; height: 168px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--gel); margin: 0 0 1.25rem;
  box-shadow: 0 0 0 6px rgba(12,16,32,.55), 0 0 40px -6px var(--gel);
}
@media (max-width: 640px) { .portrait { width: 132px; height: 132px; } }

/* Compétences avec icônes */
.chips li { display: inline-flex; align-items: center; gap: .65rem; }
.chips .ic, .chips .logo { flex: none; color: var(--gel); }
.chips .logo { object-fit: contain; }

/* Formation */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.5rem; padding: 1rem 0 0; }
.fcard {
  position: relative;
  background: var(--surface);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, var(--surface)) 0%, var(--surface) 65%);
  border: 1px solid var(--line);
  border-top: 6px solid var(--c);
  border-radius: 6px;
  padding: 1.5rem 1.4rem 1.6rem;
  display: flex; flex-direction: column; gap: .4rem;
}
.fcard h3 { margin: .6rem 0 0; font-size: 1.25rem; line-height: 1.25; font-weight: 800; }
.fcard .fic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--c); color: #0C1020;
}
.fcard .fic svg { width: 24px; height: 24px; }
.fdate { margin: 0; font-weight: 800; color: var(--c); }
.fplace { margin: 0; color: var(--muted); }
.fnote { margin: .6rem 0 0; padding-top: .7rem; border-top: 1px solid var(--line); }

.chips .logo { width: 26px; height: 26px; border-radius: 6px; object-fit: contain; background: transparent; }

/* Projets */
.pintro { margin: .75rem 0 0; max-width: 40rem; color: var(--text); }
.psec { padding: 2rem 0 0; }
.psec h2 { border-bottom-color: var(--c); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.pcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 6px solid var(--c);
  border-radius: 6px;
  padding: 1.4rem 1.4rem 1.5rem;
  display: flex; flex-direction: column; gap: .35rem;
}
.pcard h3 { margin: 0; font-size: 1.25rem; font-weight: 800; line-height: 1.25; }
.pmeta { margin: 0; font-weight: 800; color: var(--c); }
.pcredit { margin: 0; color: var(--muted); }
.pcard .videos { margin-top: .8rem; }

/* Volet latéral flottant (projets) */
.psections { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 2rem; align-items: start; }
.psec { padding: 0; }
.pgrid { grid-template-columns: 1fr; }
.pcard { cursor: pointer; transition: background-color .2s ease; }
.pcard:hover { background: var(--surface2); }
.pcard p { margin: .25rem 0 0; color: var(--muted); }
.pbtn {
  align-self: flex-start; margin-top: .9rem; font: inherit; font-weight: 800;
  background: var(--c); color: #0C1020; border: 0; border-radius: 4px; padding: .6rem 1rem; cursor: pointer;
}
.drawer {
  position: fixed; top: 50%; right: 1rem; z-index: 30;
  width: min(440px, calc(100vw - 2rem)); max-height: 82vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--gel);
  border-radius: 10px; padding: 1rem 1.25rem 1.5rem;
  transform: translate(calc(100% + 2rem), -50%); transition: transform .25s ease;
  box-shadow: 0 18px 48px rgba(0,0,0,.5);
}
.drawer.open { transform: translate(0, -50%); }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: .6rem; }
.drawer-head h2 { font-size: 1.2rem; border: 0; padding: 0; margin: 0; display: block; line-height: 1.25; }
.drawer-close { font: inherit; font-size: 1.6rem; line-height: 1; background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 4px; width: 40px; height: 40px; cursor: pointer; flex: none; }
.drawer .pmeta { margin: 0 0 .5rem; }
.drawer p { margin: .5rem 0; }
.drawer .video { margin-top: 1rem; }
.drawer .gallery { margin-top: 1rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.alink { display: flex; flex-direction: column; gap: .2rem; margin-top: 1.25rem; padding: 1rem 1.1rem; background: var(--surface2); border-left: 5px solid var(--gel); border-radius: 4px; text-decoration: none; }
.alink .alabel { color: var(--gel); font-weight: 600; }
.alink .ahost { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .drawer, .pcard { transition: none; } }

/* Aperçu d'article (résumé + lien vers la source) */
.apreview { display: flex; flex-direction: column; gap: .4rem; margin-top: 1.25rem; padding: 1rem 1.1rem; background: var(--surface2); border-left: 5px solid var(--gel); border-radius: 4px; text-decoration: none; }
.apreview .asrc { color: var(--muted); font-size: .9rem; }
.apreview strong { font-size: 1.05rem; line-height: 1.3; }
.apreview .aexcerpt {
  color: var(--text); line-height: 1.5; max-height: 6.6em; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent);
  mask-image: linear-gradient(to bottom, #000 45%, transparent);
}
.apreview .amore { margin-top: .2rem; font-weight: 800; color: var(--gel); }
.apreview:hover .amore { text-decoration: underline; }

/* Lien vidéo quand le lecteur intégré n'est pas disponible */
.vbtn { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem; background: var(--surface2); border-left: 5px solid var(--gel); border-radius: 4px; text-decoration: none; font-weight: 800; }
.vbtn:hover { text-decoration: underline; }
.vplay { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--gel); position: relative; }
.vplay::before { content: ""; position: absolute; left: 13px; top: 9px; border-left: 12px solid #0C1020; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }

/* Visionneuse de photos (par-dessus le site) */
.lightbox { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; background: rgba(6, 8, 18, .88); padding: 1rem; }
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: min(1200px, 92vw); text-align: center; }
.lightbox img { display: block; margin: 0 auto; max-width: 100%; max-height: 80vh; border-radius: 6px; box-shadow: 0 18px 48px rgba(0,0,0,.6); }
.lightbox figcaption { margin-top: .7rem; color: var(--muted); font-size: .95rem; }
.lb-close, .lb-nav {
  position: absolute; width: 48px; height: 48px; border-radius: 50%;
  font: inherit; font-size: 1.8rem; line-height: 1; cursor: pointer;
  background: rgba(21, 27, 48, .9); color: var(--text); border: 1px solid var(--line);
}
.lb-close { top: 1rem; right: 1rem; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lightbox.single .lb-nav { display: none; }
.lb-close:hover, .lb-nav:hover { background: var(--surface2); }
.gallery a { display: block; cursor: zoom-in; }

/* Bio de l'accueil */
.hero .role { margin-bottom: .75rem; }
.bio { font-size: 1.1rem; max-width: 38rem; margin: 0 0 1.75rem; color: var(--text); }

/* Bouton qui ouvre le volet vidéo, et volet élargi pour les vidéos */
.vopen { display: block; width: fit-content; margin: 0 0 1.5rem; font: inherit; font-weight: 800; background: var(--gel); color: #0C1020; border: 0; border-radius: 4px; padding: .75rem 1.3rem; cursor: pointer; }
.vopen:hover { filter: brightness(1.08); }
.drawer.wide { width: min(680px, calc(100vw - 2rem)); }

/* Cartes de projets qui s'agrandissent */
.pcard { position: relative; overflow: hidden; }
.pcard > * { position: relative; }
.pcard::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .5s ease;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 26%, var(--surface)) 0%, var(--surface) 72%);
}
.pcard.open::before { opacity: 1; }
.pcard.open { cursor: default; border-top-width: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.pcard.moving {
  transition: top .55s cubic-bezier(.2, .8, .2, 1), left .55s cubic-bezier(.2, .8, .2, 1),
              width .55s cubic-bezier(.2, .8, .2, 1), height .55s cubic-bezier(.2, .8, .2, 1), box-shadow .5s ease;
  will-change: top, left, width, height;
}
.pcard.open.settled { overflow: auto; }
.pcard:hover:not(.open) { transform: translateY(-2px); transition: transform .2s ease, background-color .2s ease; }
.pcard.open h3 { font-size: 1.5rem; padding-right: 3.2rem; }
.pcard.open .pc-sum { color: var(--text); font-size: 1.05rem; animation: pcfade .5s ease; }
@keyframes pcfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pc-more { display: none; opacity: 0; transform: translateY(10px); }
.pcard.open .pc-more { display: block; }
.pcard.open.shown .pc-more { opacity: 1; transform: none; transition: opacity .45s ease .22s, transform .45s ease .22s; }
.pc-more p { color: var(--text); }
.pc-more .video { margin-top: 1rem; }
.pc-more .gallery { margin-top: 1rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pc-close {
  position: absolute; top: .9rem; right: .9rem; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(12, 16, 32, .6); color: var(--text);
  font: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .3s ease .2s;
}
.pcard.open .pc-close { opacity: 1; pointer-events: auto; }
.pcard .pbtn { transition: background-color .35s ease, color .35s ease, box-shadow .35s ease; }
.pcard.open .pbtn { background: transparent; color: var(--c); box-shadow: inset 0 0 0 2px var(--c); }
.pc-ph { visibility: hidden; }
.pc-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(6, 8, 18, .72); opacity: 0; transition: opacity .45s ease; }
.pc-backdrop.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .pcard.moving, .pcard::before, .pcard.open.shown .pc-more, .pc-backdrop, .pcard .pbtn, .pc-close { transition: none; }
  .pcard.open .pc-sum { animation: none; }
}

/* Miniatures de taille fixe : la hauteur de la carte est connue avant le chargement des images */
.gallery img { aspect-ratio: 3 / 2; object-fit: cover; }

/* Carte née d'un bouton (page Club Med) : part de la couleur du bouton puis se teinte */
.pcard.floating { background-color: var(--surface); }
.pcard.from-btn { background-color: var(--c); }
.pcard.from-btn > * { opacity: 0; }
.pcard > h3, .pcard > .pc-sum { transition: opacity .35s ease .15s; }
.pcard.moving { transition: top .55s cubic-bezier(.2, .8, .2, 1), left .55s cubic-bezier(.2, .8, .2, 1), width .55s cubic-bezier(.2, .8, .2, 1), height .55s cubic-bezier(.2, .8, .2, 1), box-shadow .5s ease, background-color .5s ease; }
.pc-sum:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .pcard > h3, .pcard > .pc-sum { transition: none; } }

/* Carte de formation avec diplôme à afficher */
.fcard:has(.fview) { cursor: zoom-in; }
.fview { align-self: flex-start; margin-top: .9rem; font-weight: 800; text-decoration: none; color: #0C1020; background: var(--c); padding: .6rem 1rem; border-radius: 4px; }
.fview:hover { filter: brightness(1.08); }

/* Cartes de formation dépliables (même effet que les projets) */
.fcard.pcard .fdate { color: var(--c); }
.fcard.pcard .fplace { color: var(--muted); }
.fcard.pcard h3 { margin: .6rem 0 0; }
.fcard.pcard .pbtn { margin-top: .9rem; }
.fcard.pcard.open h3 { padding-right: 3.2rem; }
.pcard .vbtn { border-left-color: var(--c); }
.pcard .vplay { background: var(--c); }

.vcap { margin: .45rem 0 0; color: var(--muted); font-size: .95rem; font-weight: 600; }

/* Crédits photo : très petits, en gris */
.gcredit { margin: .5rem 0 0; font-size: .72rem; line-height: 1.4; color: #8791AB; font-weight: 400; }
.pc-more p.gcredit { color: #8791AB; }

/* QR code WhatsApp */
.qr { margin: 2rem 0 0; width: fit-content; }
.qr img { display: block; width: 180px; height: 180px; border-radius: 8px; background: #fff; }
.qr figcaption { margin-top: .5rem; color: var(--muted); font-size: .9rem; }

/* Grande fenêtre vidéo */
.vbox { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; background: rgba(6, 8, 18, .88); padding: 2.5vh 2.5vw; }
.vbox.open { display: flex; animation: vbin .3s ease; }
@keyframes vbin { from { opacity: 0; } to { opacity: 1; } }
.vb-panel {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--gel); border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: vbpop .35s cubic-bezier(.2, .8, .2, 1);
}
@keyframes vbpop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.vb-bar { display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; }
.vb-title { flex: 1; margin: 0; font-weight: 800; font-size: 1.05rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; }
.vb-back, .vb-close {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(12, 16, 32, .6); color: var(--text); font: inherit; font-size: 1.7rem; line-height: 1; cursor: pointer;
}
.vb-back:hover, .vb-close:hover { background: var(--surface2); }
.vb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 .9rem .9rem; }
.vb-stage iframe { width: min(100%, calc((100vh - 15vh - 80px) * 16 / 9)); aspect-ratio: 16 / 9; max-height: 100%; border: 0; border-radius: 6px; background: #000; }
@media (prefers-reduced-motion: reduce) { .vbox.open, .vb-panel { animation: none; } }
.vbtn span:last-child { min-width: 0; }

/* Compétences : deux lignes (savoir-faire, puis logiciels et matériel) */
.sgroup { margin: 1.9rem 0 .6rem; color: var(--muted); font-size: .8rem; font-weight: 600; }
.sgroup:first-child { margin-top: 0; }

.vb-stage video { width: min(100%, calc((100vh - 15vh - 80px) * 16 / 9)); max-height: 100%; border-radius: 6px; background: #000; }

/* Fenêtre web dans le site : vidéo, publication Instagram (portrait) ou page */
.vb-stage.tall iframe { width: min(100%, 560px); aspect-ratio: auto; height: 100%; max-height: none; background: #fff; }
.vb-stage.page iframe { width: 100%; aspect-ratio: auto; height: 100%; max-height: none; background: #fff; }
.vb-out {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  background: rgba(12, 16, 32, .6); color: var(--text); font-size: 1.4rem; line-height: 1; text-decoration: none; cursor: pointer;
}
.vb-out:hover { background: var(--surface2); }
.chips .logo.wide { width: auto; height: 20px; max-width: 96px; border-radius: 0; }

/* Publication Instagram (portrait) : la fenêtre se resserre autour du contenu */
.vbox.tall .vb-panel { width: min(100%, 600px); }

.vb-foot { margin: 0; padding: .1rem .9rem .8rem; text-align: center; color: var(--muted); font-size: .9rem; }
.vb-foot a { color: var(--gel); font-weight: 800; }

/* Pied de page collé en bas de la fenêtre, même quand la page est courte */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > .nav, body > .hero, body > .pagehead, body > main, body > footer { width: 100%; }
body > footer { margin-top: auto; }
