/* Portfolio Lorenzo Agnese
   Reproduction du thème Adobe Portfolio « Ludwig » tel qu'il était personnalisé :
   fond #0A0A0A, en-tête #0C0C0D, textes en capitales, grille 2 colonnes à 5 px,
   titres qui apparaissent au survol sur un voile #111 à 90 %.
   Toutes les couleurs et tailles se règlent ici, dans :root. */

:root {
  --bg: #0a0a0a;
  --header-bg: #0c0c0d;
  --text: #ffffff;
  --nav: #aeaeae;
  --muted: #999999;
  --footer: #485454;
  --line: #222222;
  --overlay: rgba(17, 17, 17, .9);
  --placeholder: #151515;
  /* Police d'origine : une police Adobe Fonts (nom masqué). Jost en est une approche proche. */
  --font: "Jost", "Futura PT", "Century Gothic", "Helvetica Neue", Arial, sans-serif;
  --grid-gap: 5px;
  --side: 4%;
  --text-max: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--text); color: var(--bg); padding: 8px 12px; z-index: 100; }

/* ---------- En-tête : menu à gauche, nom à droite ---------- */
.site-header {
  display: flex; align-items: center; gap: 24px;
  min-height: 251px;
  padding: 41px 4% 60px;
  background: var(--header-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
  position: relative; z-index: 3;
}
.nav { flex: 1; }
.logo {
  flex: 0 0 auto; margin-left: auto;
  font-size: 18px; line-height: 19px; font-weight: 400;
  text-transform: uppercase; letter-spacing: .02em; text-align: right;
  color: var(--text);
}
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 20px; }
.nav-links a {
  color: var(--nav); font-size: 18px; line-height: 19px; text-transform: uppercase; letter-spacing: .02em;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-social { display: none; list-style: none; }
.burger { display: none; background: none; border: 0; padding: 12px 0 12px 12px; cursor: pointer; }
.burger i { display: block; width: 24px; height: 2px; background: #fff; margin-bottom: 4px; transition: transform .25s, opacity .25s; }
.burger i:last-child { margin-bottom: 0; }

@media (max-width: 932px) {
  .site-header { min-height: 188px; padding: 31px 5% 45px; }
  .logo { order: 0; margin-left: 0; text-align: left; flex: 1; }
  .burger { display: block; order: 1; position: relative; z-index: 31; }
  .nav {
    position: fixed; inset: 0; z-index: 30;
    background: var(--header-bg);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 50px 5% 120px;
    opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s;
  }
  .nav-links { flex-direction: column; align-items: center; gap: 30px; }
  .nav-links a { font-size: 22px; line-height: 32px; }
  .nav-links li { text-align: center; }
  .nav-social {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; min-height: 80px;
    justify-content: center; align-items: center; gap: 20px; margin: 0; padding: 5%;
    background: var(--header-bg); border-top: 1px solid rgba(255, 255, 255, .06);
  }
  .nav-social svg { width: 34px; height: 34px; fill: #fff; }
  body.menu-open { overflow: hidden; }
  body.menu-open .nav { opacity: 1; visibility: visible; transition: opacity .2s, visibility 0s; }
  body.menu-open .burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  body.menu-open .burger i:nth-child(2) { opacity: 0; }
  body.menu-open .burger i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}
@media (max-width: 540px) { .site-header { min-height: 151px; padding: 25px 5% 36px; } }

/* ---------- Contenu ---------- */
.site-content { margin: 0 var(--side); min-height: 50vh; }
@media (max-width: 932px) { .site-content { margin: 0; } .writing { padding: 0 5%; } .contact-photo { width: 60%; } }

/* Grille de projets */
.project-covers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--grid-gap); }
@media (max-width: 540px) { .project-covers { grid-template-columns: 1fr; } }
.project-cover { display: block; }
.cover-image { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--placeholder); }
.cover-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; color: #444; text-transform: uppercase; font-size: 14px; }
.cover-image::after { content: ""; position: absolute; inset: 0; background: var(--overlay); opacity: 0; transition: opacity .2s ease; }
.details { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; padding: 8%; opacity: 0; transition: opacity .15s ease; }
.details-inner { width: 100%; text-align: center; }
.details .title { color: #fff; font-size: 24px; line-height: 28px; text-transform: uppercase; padding-bottom: 3px; }
.details .date { color: var(--muted); font-size: 16px; line-height: 20px; padding-top: 5px; }
.project-cover:hover .cover-image::after, .project-cover:focus-visible .cover-image::after { opacity: 1; }
.project-cover:hover .details, .project-cover:focus-visible .details { opacity: 1; }
@media (max-width: 932px) { .details .title { font-size: 18px; line-height: 21px; padding-bottom: 5px; } .details .date { font-size: 14px; } }
@media (max-width: 540px) { .details .title { font-size: 15px; line-height: 18px; } }
.empty { color: var(--muted); padding: 40px 0; }

/* Pages et projets (valeurs du thème d'origine) */
.project, .page, .writing { max-width: 1400px; margin: 0 auto; }
.page-header { max-width: 620px; margin: 0 auto; padding: 30px 0 80px; }
.page-title { color: var(--muted); font-size: 44px; line-height: 50px; font-weight: 400; text-align: center; margin: 0; padding-bottom: 20px; }
.page-description { color: #fff; font-size: 20px; line-height: 26px; padding-top: 20px; text-align: left; }
.page-description p { margin: 0; }
.project-meta, .writing-meta { color: var(--muted); font-size: 16px; margin: 0; text-align: center; }
.project-mention { display: table; margin: 14px auto 0; padding: 4px 12px; border: 1px solid #333; font-size: 14px; color: var(--muted); }
.module-video, .module-image, .module-gallery { margin: 0 auto; padding-bottom: 40px; }
.module-image { padding-bottom: 20px; }
.module-text { max-width: 800px; margin: 0 auto; padding: 20px 0 40px; color: var(--muted); font-size: 20px; line-height: 26px; }
.module-text h2, .module-text h3, .module-text h4 { color: var(--muted); font-size: 25px; line-height: 1.25; font-weight: 400; margin: 0 0 4px; }
.module-text p, .module-text ul, .module-text ol { color: #fff; font-size: 18px; line-height: 1.45; margin: 0 0 20px; }
.module-text strong { color: #fff; font-weight: 500; }
.module-text a { color: #a9a9a9; text-decoration: underline; text-underline-offset: 3px; }
.module-text blockquote { margin: 1.2em 0; padding-left: 20px; border-left: 2px solid #fff; font-style: italic; }
.module-text img { margin: 1.4em 0; }
.module-text hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.module-text code { background: #1a1a1a; padding: 1px 5px; font-size: .9em; }
figure { margin: 0; }
figcaption { color: #a9a9a9; font-size: 16px; text-align: center; padding-top: 10px; }
.video { position: relative; aspect-ratio: 16 / 9; max-width: 1920px; margin: 0 auto; background: #000; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.module-image img { width: 100%; cursor: zoom-in; }
.module-gallery { display: grid; gap: var(--grid-gap); }
.module-gallery.cols-1 { grid-template-columns: 1fr; }
.module-gallery.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.module-gallery.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.module-gallery.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 540px) { .module-gallery { grid-template-columns: 1fr !important; } }
.module-gallery img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }

/* « Vous pourriez aussi aimer » */
.other-projects { padding: 60px 0; }
.other-projects-title { color: #fff; font-size: 24px; line-height: 26px; font-weight: 400; margin: 0 0 30px; }
.other-projects .details .title { font-size: 22px; line-height: 24px; text-transform: none; padding-bottom: 0; }
.other-projects .details .date { padding-top: 10px; }

@media (max-width: 932px) {
  .page-header { padding: 18px 5% 34px; }
  .page-title { font-size: 29px; line-height: 33px; padding-bottom: 14px; }
  .page-description { font-size: 17px; line-height: 22px; padding-top: 14px; }
  .module-video { padding-bottom: 20px; }
  .module-text { padding: 14px 5% 20px; font-size: 17px; line-height: 22px; }
  .module-text p { font-size: 16px; }
  .module-text h2, .module-text h3 { font-size: 21px; }
  .other-projects { padding: 28px 0; }
  .other-projects-title { font-size: 18px; line-height: 20px; margin-bottom: 18px; padding: 0 5%; }
  .other-projects .details .title { font-size: 17px; line-height: 19px; }
  .other-projects .details .date { font-size: 14px; padding-top: 8px; }
}
@media (max-width: 540px) {
  .page-header { padding: 16px 5% 29px; }
  .page-title { font-size: 24px; line-height: 27px; padding-bottom: 13px; }
  .page-description { font-size: 14px; line-height: 18px; padding-top: 13px; }
  .module-text p { font-size: 14px; line-height: 18px; margin-bottom: 13px; }
  .module-text h2, .module-text h3 { font-size: 18px; }
  .other-projects { padding: 25px 0; }
  .other-projects-title { font-size: 15px; line-height: 16px; margin-bottom: 16px; }
  .other-projects .details .title { font-size: 15px; line-height: 16px; }
}

/* Contact (photo centrée à 31 %, puis texte et formulaire côte à côte) */
.contact-photo { width: 31%; min-width: 220px; margin: 0 auto 20px; }
.contact-photo img { width: 100%; cursor: zoom-in; }
.contact-grid { display: grid; grid-template-columns: 23fr 27fr; gap: 8px; align-items: start; padding-bottom: 40px; }
.contact-text { max-width: none; margin: 0; padding: 20px 0; }
.contact-text .contact-lead { font-size: 28px; line-height: 1.25; color: #fff; margin-bottom: 26px; }
.contact-text p { color: var(--muted); font-size: 20px; line-height: 26px; }
.contact-form-wrap { padding: 20px 5% 20px; }
.contact-form label { display: block; color: #fff; font-size: 16px; line-height: 16px; margin: 0 0 10px; }
.contact-form input, .contact-form textarea {
  display: block; width: 100%; margin: 0 0 30px; padding: 10px;
  background: #373737; border: 1px solid #373737; border-radius: 3px; outline: none;
  color: #fff; font: inherit; font-size: 16px; -webkit-appearance: none;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: #555; }
.contact-form ::placeholder { color: rgba(255, 255, 255, .4); }
.contact-form textarea { height: 132px; padding-top: 13px; padding-bottom: 13px; resize: vertical; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.submit-button { display: inline-block; height: 40px; line-height: 40px; padding: 0 25px; border: 0; border-radius: 20px; background: #fff; color: #111; font: inherit; font-size: 18px; cursor: pointer; }
.submit-button:hover { background: rgba(255, 255, 255, .8); }
.submit-button[disabled] { opacity: .6; cursor: wait; }
.form-status { color: #c55; font-size: 14px; margin: 12px 0 0; min-height: 1em; }
.contact-form-sent { color: var(--muted); font-size: 20px; text-align: center; padding: 40px 0; }
@media (max-width: 932px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-text { padding: 14px 5%; }
  .contact-text .contact-lead { font-size: 22px; }
  .contact-text p { font-size: 17px; line-height: 22px; }
  .contact-form label { font-size: 13px; margin-bottom: 8px; }
  .contact-form input, .contact-form textarea { font-size: 16px; margin-bottom: 18px; }
  .submit-button { font-size: 14px; height: 38px; line-height: 38px; }
}
.button { display: inline-block; margin-top: 10px; padding: 0 25px; height: 40px; line-height: 40px; border-radius: 20px; background: #fff; color: #111 !important; text-decoration: none !important; font-size: 16px; }
.button:hover { background: rgba(255, 255, 255, .8); }

/* Bouton « haut de page » fixe (bureau uniquement) */
.back-to-top-fixed { position: fixed; right: 40px; bottom: 40px; z-index: 3; width: 60px; height: 60px; border-radius: 60px; background: rgba(255, 255, 255, .15); display: flex; align-items: center; justify-content: center; transition: background .2s; }
.back-to-top-fixed svg { width: 24px; height: 24px; fill: #fff; opacity: .7; }
.back-to-top-fixed:hover { background: #fff; }
.back-to-top-fixed:hover svg { fill: #111; opacity: 1; }
@media (max-width: 932px) { .back-to-top-fixed { display: none !important; } }

/* Écrits */
.writing-list { list-style: none; margin: 0 auto; padding: 0; max-width: var(--text-max); }
.writing-list li { border-top: 1px solid var(--line); }
.writing-list li:last-child { border-bottom: 1px solid var(--line); }
.writing-list a { display: block; padding: 26px 0; }
.writing-list a:hover .writing-title { color: var(--nav); }
.writing-title { display: block; font-size: 22px; text-transform: uppercase; line-height: 1.3; margin: 4px 0 8px; transition: color .2s; }
.writing-excerpt { display: block; color: var(--muted); }
.writing-lead { font-size: 19px; color: #d6d6d6; margin: 18px 0 0; }
.writing > p { max-width: var(--text-max); margin: 40px auto 0; }
.writing .back { color: var(--muted); }

/* ---------- Pied de page ---------- */
.site-footer { padding: 60px var(--side) 100px; color: var(--footer); font-size: 14px; line-height: 20px; }
.site-footer .social { list-style: none; margin: 0; padding: 0; display: flex; justify-content: flex-end; gap: 15px; }
.site-footer .social li { padding-bottom: 48px; }
.site-footer .social svg { width: 30px; height: 30px; fill: var(--footer); transition: fill .2s; }
.site-footer .social a:hover svg { fill: #fff; }
.footer-text { margin: 0; }
@media (max-width: 932px) { .site-footer { padding: 28px 5% 40px; } .site-footer .social li { padding-bottom: 38px; } }
@media (max-width: 540px) { .site-footer { padding: 25px 5% 34px; } .site-footer .social li { padding-bottom: 31px; } }

/* ---------- Visionneuse d'images (fond blanc à 94 %, comme l'original) ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(255, 255, 255, .94); display: flex; align-items: center; justify-content: center; padding: 60px 16px; }
.lightbox img { max-height: 100%; max-width: 100%; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; font-size: 42px; line-height: 1; color: #111; cursor: pointer; padding: 10px 16px; }
.lightbox[hidden], [hidden] { display: none !important; }
.lb-close { top: 10px; right: 10px; }
.lb-prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 6px; top: 50%; transform: translateY(-50%); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
