/* Pages secondaires (réalisations, projet, avis, mentions, 404, formulaire d'avis) */

body.page { background: var(--page-bg); background-attachment: fixed; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* Bulles CSS en fond (version légère de la scène 3D) */
.water { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.water i {
  position: absolute; bottom: -40px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%;
  border: 2px solid var(--line); opacity: 0;
  animation: float var(--d) linear var(--w) infinite;
}
@keyframes float {
  0%   { transform: translate(0, 0) scale(1); opacity: 0; }
  8%   { opacity: .8; }
  92%  { opacity: .8; }
  100% { transform: translate(24px, -112vh) scale(1.5); opacity: 0; }
}

.wrap { position: relative; z-index: 5; width: min(1100px, 100% - 40px); margin: 0 auto; padding: 130px 0 70px; flex: 1; }
.wrap.narrow { width: min(740px, 100% - 40px); }
body.page .footer { margin-top: auto; }

.page-head { margin-bottom: 40px; }
.page-head h1 { font-size: clamp(2.4rem, 7vw, 5rem); margin-bottom: 16px; }
.page-head p + p { margin-top: 10px; }
.page-head .lead { font-size: 1.3rem; max-width: 44ch; color: var(--ink); }
.page-head .mot { margin-top: 16px; padding: 4px 0 4px 18px; border-left: 4px solid var(--signal); font-style: italic; font-size: 1.15rem; }
.crumbs { font: 400 .85rem var(--f-mono); color: var(--muted); margin-bottom: 26px; }
.crumbs a:hover { color: var(--signal); }

/* Blocs plats : un filet et du texte, pas de cartes */
.panel { border-top: 3px solid var(--ink); padding-top: 22px; max-width: none; }
.thanks { max-width: 640px; }
.thanks h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 14px; }
.thanks .btn { margin-top: 12px; }
.empty { max-width: 560px; margin-bottom: 36px; }
.prose h2 { font-size: 1.9rem; margin: 30px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin-top: 10px; max-width: 70ch; }
.text-link { color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--signal); }
.text-link:hover { color: var(--signal); }
.rating-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }

/* Avis */
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 34px 30px; margin-bottom: 44px; }
.review-card { display: flex; flex-direction: column; gap: 12px; }
.review-card h2 { font-size: 1.6rem; margin: 0; }
.review-card > p { font-style: italic; font-size: 1.15rem; line-height: 1.5; }
.review-card footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: .92rem; display: flex; flex-wrap: wrap; gap: 2px 0; }
.review-card time { width: 100%; font: 400 .82rem var(--f-mono); }
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin-bottom: 36px; font: 400 .9rem var(--f-mono); flex-wrap: wrap; }

/* Réalisations */
.works-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 44px 30px; margin-bottom: 50px; }
.work-card { display: grid; gap: 6px; align-content: start; }
.work-card img, .work-ph { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border: 2px solid var(--ink); margin-bottom: 8px; transition: transform .4s var(--ease-pop); background: var(--surface); }
.work-ph { display: grid; place-items: center; font: 400 5rem var(--f-title); color: var(--signal); }
.work-card:hover img, .work-card:hover .work-ph { transform: translate(-4px, -4px); }
.work-card strong { font: 400 1.9rem/1.08 var(--f-title); letter-spacing: .02em; }
.work-kind { font: 400 .85rem var(--f-mono); color: var(--muted); }
.work-desc { color: var(--ink); }
.work-go { font: 700 .82rem var(--f-body); letter-spacing: .1em; color: var(--signal); margin-top: 4px; }

/* Fiche projet */
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px 28px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.meta dt { font: 700 .72rem var(--f-mono); letter-spacing: .14em; color: var(--muted); }
.meta dd { font-weight: 500; overflow-wrap: anywhere; }
.project-body { margin-bottom: 44px; }
.project-body p { font-size: 1.15rem; margin-top: 16px; }
.gallery { columns: 2 340px; column-gap: 26px; margin-bottom: 48px; }
.shot { break-inside: avoid; margin: 0 0 26px; }
.shot a { display: block; border: 2px solid var(--ink); overflow: hidden; cursor: zoom-in; }
.shot img { display: block; width: 100%; height: auto; transition: transform .5s var(--ease-out); }
.shot a:hover img { transform: scale(1.03); }
.shot figcaption { font: 400 .88rem var(--f-mono); color: var(--muted); margin-top: 8px; }
.project-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 44px; border-top: 1px solid var(--line); padding-top: 20px; }
.project-nav a { display: grid; gap: 2px; }
.project-nav a:last-child { text-align: right; }
.project-nav span { font: 400 .85rem var(--f-mono); color: var(--muted); }
.project-nav strong { font: 400 1.5rem/1.1 var(--f-title); }
.project-nav a:hover strong { color: var(--signal); }

.lightbox { border: 0; background: transparent; max-width: 96vw; max-height: 96vh; padding: 0; color: #f3efe4; overflow: visible; }
.lightbox::backdrop { background: rgba(2, 8, 12, .92); }
.lightbox img { display: block; max-width: 94vw; max-height: 82vh; margin: 0 auto; border: 2px solid #f3efe4; }
.lb-caption { text-align: center; margin-top: 10px; font: 400 .9rem var(--f-mono); color: #f3efe4; }
.lb-close { position: absolute; right: 0; top: -48px; width: 44px; height: 44px; font-size: 1.2rem; background: transparent; color: #f3efe4; border: 2px solid #f3efe4; cursor: pointer; }

/* Formulaire d'avis */
.review-form { display: grid; gap: 24px; }
.rating-field { border: 0; }
.rating-field legend { font: 400 1.7rem var(--f-title); margin-bottom: 10px; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; line-height: 0; padding: 2px; transition: transform .25s var(--ease-pop); }
.star-input svg { fill: none; stroke: var(--ink); stroke-width: 1.2; opacity: .6; transition: fill .15s; }
.star-input label:hover { transform: scale(1.2) rotate(-6deg); }
.star-input label:hover svg, .star-input label:hover ~ label svg, .star-input input:checked ~ label svg { fill: var(--signal); stroke: var(--signal); opacity: 1; }
.star-input input:focus-visible + label { outline: 3px solid var(--signal); outline-offset: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 640px) {
  .wrap { padding-top: 104px; width: calc(100% - 32px); }
  .project-nav { grid-template-columns: 1fr; }
  .project-nav a:last-child { text-align: left; }
  .gallery { columns: 1; }
}

/* ---- Formes arrondies, comme des coraux ---- */
.panel { border-top: 0; padding-top: 0; }
.thanks, .empty, .review-form, .prose { padding: 26px clamp(18px, 4vw, 34px); border: 2px solid var(--line); border-radius: 28px; }
.review-card { padding: 24px; border: 2px solid var(--line); border-radius: 26px; }
.work-card img, .work-ph { border: 0; border-radius: 26px; }
.work-card strong, .project-nav strong { font-weight: 600; font-size: 1.5rem; letter-spacing: -.01em; }
.work-kind { color: var(--signal); font-size: .92rem; font-weight: 500; }
.work-go { font-weight: 600; font-size: 1rem; letter-spacing: 0; }
.work-ph { font-weight: 600; }
.shot a { border: 0; border-radius: 26px; }
.shot figcaption, .crumbs, .project-nav span, .meta dt, .lb-caption { font-family: var(--f-body); }
.meta dt { font-size: .85rem; letter-spacing: 0; font-weight: 500; }
.meta { border-top: 2px solid var(--line); }
.project-nav { border-top: 2px solid var(--line); }
.lightbox img { border: 0; border-radius: 22px; }
.lb-close { border-radius: 50%; }
.page-head .mot { border-left: 0; padding: 12px 18px; background: var(--surface); border-radius: 20px; font-style: normal; }
.rating-field legend { font-size: 1.5rem; font-weight: 600; }
.star-input svg { stroke-linejoin: round; }
.review-card footer { border-top: 2px solid var(--line); }
.page-head h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); }
