/* Palette et typo reprises du CV 2026 */
:root {
  --bg: #f9f3e9;          /* fond crème du CV */
  --bg-deep: #f1e7d6;     /* aplats, survols */
  --accent: #c2a182;      /* titres de section du CV */
  --accent-ink: #9a7653;  /* accent lisible sur fond crème (liens, petits textes) */
  --ink: #1e1e1e;
  --ink-soft: #4a443d;
  --line: #e6d9c4;
  --wrap: 1080px;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Forum", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }

/* ------------------------------------------------------------- en-tête */
.site-header { padding-top: 56px; padding-bottom: 40px; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.name {
  margin: 0;
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.role {
  margin: 10px 0 2px;
  font-size: clamp(1.15rem, 2.6vw, 1.65rem);
  font-weight: 400;
  line-height: 1.25;
}
.tagline {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  color: var(--ink-soft);
}

.avatar {
  flex: none;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  object-fit: cover;
}

/* --------------------------------------------------------------- onglets */
.tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.tabs-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.tabs-side { display: flex; align-items: center; gap: 22px; }
.tabs-side a { font-size: .9rem; }
.tabs-label {
  color: var(--accent-ink);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.tabs a {
  position: relative;
  padding: 16px 0 14px;
  color: var(--ink-soft);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.tabs a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.tabs a[aria-current="page"]::after { transform: scaleX(1); }
.tabs-side a::after { height: 2px; }

/* ------------------------------------------------- en-tête des pages perso */
.panel-head { margin-bottom: 18px; }
.back {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--ink-soft);
  font-size: .9rem;
  text-decoration: none;
}
.back:hover { color: var(--ink); }
.eyebrow {
  margin: 0;
  color: var(--accent-ink);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.panel-head h2 {
  margin: 4px 0 0;
  font-size: clamp(2rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* --------------------------------------- encart « After hours » sous le CV */
.beyond { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.beyond-title {
  margin: 0;
  color: var(--accent-ink);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.beyond-intro { margin: 6px 0 18px; color: var(--ink-soft); }
.beyond-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.beyond-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.beyond-card:hover { background: var(--bg-deep); border-color: var(--accent); color: var(--ink); }
.beyond-thumb {
  flex: none;
  width: 60px;
  height: 60px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(140deg, #e3d0b2, #c2a182);
}
.beyond-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.beyond-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.beyond-text strong { font-size: .98rem; }
.beyond-text span { color: var(--ink-soft); font-size: .85rem; }

/* -------------------------------------------------------------- sections */
main.wrap { padding-top: 44px; padding-bottom: 80px; min-height: 60vh; }

.panel { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.section-title {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ------------------------------------------------------------------ CV */
/* La colonne de droite est avant le CV dans le HTML (pour l'impression, où
   elle flotte à droite) : on fixe ici la place de chaque colonne. */
.cv-main { grid-column: 1; grid-row: 1; }
.cv-side { grid-column: 2; grid-row: 1; }
.cv {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 64px;
}

.job { margin-bottom: 34px; }
.job h3 { margin: 0; font-size: 1.12rem; font-weight: 700; line-height: 1.35; }
.job .job-meta { margin: 2px 0 10px; font-style: italic; font-size: 1.05rem; color: var(--ink-soft); }
.job h4 { margin: 16px 0 4px; font-size: .95rem; font-weight: 700; }
.job p { margin: 0 0 8px; }
.job ul { margin: 0 0 8px; padding-left: 20px; }
.job ul li { margin: 3px 0; font-style: italic; color: var(--ink-soft); }
.job ul li strong { color: var(--ink); }
.job ul.plain li { font-style: normal; color: var(--ink); }
.job .tech { font-size: .93rem; font-style: italic; color: var(--ink-soft); }
.job .tech strong { color: var(--ink); }
.cv-main .section-title + .job { margin-top: 0; }
.cv-main .job + .section-title { margin-top: 48px; }

.cv-side .section-title { font-size: 1.5rem; margin-top: 36px; margin-bottom: 10px; }
.cv-side ul { margin: 0; padding-left: 20px; }
.cv-side li { margin: 4px 0; }
.contact { margin: 0; }
.contact dt { font-weight: 700; margin-top: 12px; }
.contact dd { margin: 0; overflow-wrap: anywhere; }
.print-only { display: none; }   /* affiché seulement par css/print.css */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--ink); color: var(--bg); }

/* ------------------------------------------------------------- musique */
.lead {
  max-width: 680px;
  margin: 0 0 40px;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  line-height: 1.45;
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  overflow: hidden;
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.project-body { padding: 36px; }
.project-body h3 { margin: 4px 0 12px; font-size: 2rem; letter-spacing: -0.02em; line-height: 1.1; }
.project-body p { margin: 0 0 12px; color: var(--ink-soft); }
.project-body .music-meta { margin: 0; }
.project-role { margin-bottom: 24px !important; }
.project-role strong { color: var(--ink); }
.project-visual {
  position: relative;
  display: block;
  min-height: 300px;
  overflow: hidden;
  background: #8a3a3f;  /* teinte du coucher de soleil, le temps que l'image charge */
}
.project-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.project:hover .project-visual img { transform: scale(1.03); }

.music-list { display: grid; gap: 20px; }
.music-list:not(:empty) { margin-top: 20px; }

.music-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 32px;
  align-items: center;
  padding: 24px;
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.music-body h3 { margin: 2px 0 6px; font-size: 1.35rem; line-height: 1.25; }
.music-body p { margin: 0 0 8px; color: var(--ink-soft); }
.music-meta {
  margin: 0;
  color: var(--accent-ink) !important;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.link { font-weight: 500; }

.music-item audio { width: 100%; }
.embed-sc { width: 100%; height: 166px; border: 0; border-radius: 10px; }
.embed-bc { width: 100%; height: 120px; border: 0; border-radius: 10px; }

/* ---------------------------------------------------------- photographie */
/* Lignes justifiées calculées en JS (main.js > layoutGallery) */
.gallery { display: flex; flex-direction: column; gap: 12px; }
.gallery-row { display: flex; gap: 12px; }
.tile {
  display: block;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-deep);
  cursor: zoom-in;
}
.photo-group + .photo-group { margin-top: 56px; }
.tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.tile:hover img { transform: scale(1.03); }
.tile.is-placeholder { cursor: default; }

.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 18, 15, .97);
  color: #f9f3e9;
}
body:has(.lightbox[open]) { overflow: hidden; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; max-width: 92vw; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 84vh; object-fit: contain; border-radius: 4px; }
.lightbox figcaption { margin-top: 12px; font-family: var(--serif); font-size: 1.2rem; }
.lb-btn {
  position: absolute;
  width: 48px; height: 48px;
  border: 0; border-radius: 50%;
  background: rgba(249, 243, 233, .1);
  color: #f9f3e9;
  font-size: 2rem; line-height: 1;
  cursor: pointer;
}
.lb-btn:hover { background: rgba(249, 243, 233, .22); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ------------------------------------------------------------ filmmaking */
.videos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 24px;
}
.video:first-child { grid-column: 1 / -1; }   /* la première vidéo en vedette */
.video-body h3 { margin: 14px 0 2px; font-size: 1.12rem; line-height: 1.3; }
.video-body p { margin: 4px 0 0; color: var(--ink-soft); }
.video:first-child .video-body h3 { font-size: 1.6rem; }

.facade, .frame, .ph-video, .ph-music {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
}
.facade { padding: 0; border: 0; background: #2a2622; cursor: pointer; }
.facade img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s; }
.facade:hover img { opacity: .85; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.play {
  position: absolute;
  top: 50%; left: 50%;
  width: 68px; height: 68px;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
  transition: transform .2s;
}
.play svg { width: 28px; height: 28px; margin-left: 3px; }
.facade:hover .play { transform: translate(-50%, -50%) scale(1.07); }

/* ----------------------------------------------------------- placeholders */
.ph {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #ead9bf, #d9bf9c);
}
.ph-1 { background: linear-gradient(160deg, #e3d3bb, #c9ad8c); }
.ph-2 { background: linear-gradient(120deg, #efe2cc, #d4b894); }
.ph-3 { background: linear-gradient(200deg, #e6d4b8, #bfa07e); }
.ph-music, .ph-video { height: auto; background: linear-gradient(135deg, #e3d0b2, #c2a182); }
.ph-label {
  margin: 14px 16px;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: rgba(30, 30, 30, .55);
}
.ph .play { background: rgba(249, 243, 233, .85); }

/* -------------------------------------------------------------- pied */
.site-footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .92rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.site-footer a { color: inherit; }
.site-footer .credits { margin-left: auto; opacity: .75; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .cv { grid-template-columns: 1fr; gap: 8px; }
  .cv-main, .cv-side { grid-column: auto; grid-row: auto; }
  .cv-side { order: -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
  .cv-side .btn { grid-column: 1 / -1; justify-self: start; }
  .cv-side .section-title { margin-top: 28px; }
  .music-item { grid-template-columns: 1fr; gap: 18px; }
  .project { grid-template-columns: 1fr; }
  .videos { grid-template-columns: 1fr; gap: 32px; }
  .project-visual { order: -1; min-height: 0; aspect-ratio: 16 / 9; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .site-header { padding-top: 32px; }
  .header-inner { flex-direction: column-reverse; align-items: flex-start; gap: 18px; }
  .avatar { width: 96px; height: 96px; }
  .site-header { padding-bottom: 24px; }
  .tabs-inner { gap: 12px; }
  .tabs a { padding: 14px 0 12px; }
  .tabs-label { display: none; }
  .tabs-side { gap: 14px; }
  .tabs-side a { font-size: .82rem; }
  .beyond-grid { grid-template-columns: 1fr; }
  .tabs-inner::-webkit-scrollbar { display: none; }
  main.wrap { padding-top: 28px; }
  .cv-side { display: block; }
  .section-title { font-size: 1.5rem; }
  .music-item { padding: 18px; }
  .project-body { padding: 24px 20px; }
  .lead { margin-bottom: 28px; }
  .videos { gap: 28px; }
  .video:first-child .video-body h3 { font-size: 1.3rem; }
  .play { width: 56px; height: 56px; }
}

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