/* Réalisations (refonte du 2026-10-29) : composition éditoriale de l'accueil + visionneuse de chantier. Chargée seulement sur les pages
   qui présentent des chantiers (build.mjs). Les règles !important ne servent qu'à reprendre la main sur les réglages globaux
   d'ui-polish.css (titres h2, ancre #realisations). */
:root{--rv-bg:#16181b;--rv-line:#ffffff1f;--rv-soft:#ffffffa6;--rv-faint:#ffffff73;--rv-radius:6px;--rv-ease:cubic-bezier(.2,.7,.2,1)}

/* ───── Section de l'accueil */
.rv-section{background:var(--ink);color:#fff;padding-block:clamp(64px,8vw,120px)}
section#realisations.rv-section{scroll-margin-top:0!important}
.rv-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px 48px;flex-wrap:wrap;margin-bottom:clamp(28px,4vw,52px)}
.rv-head .eyebrow{margin:0 0 12px;color:var(--yellow)}
.rv-section .rv-head h2{margin:0;font-size:clamp(2.1rem,3.4vw,3.15rem)!important;line-height:1.04;letter-spacing:-.025em;font-weight:700}
.rv-intro{margin:0;max-width:34ch;color:var(--rv-soft);font-size:.98rem;line-height:1.55}

.rv-open{display:flex;flex-direction:column;gap:14px;width:100%;height:100%;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
.rv-media{position:relative;display:block;overflow:hidden;border-radius:var(--rv-radius);background:#2a2e32;aspect-ratio:4/3}
.rv-media img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .9s var(--rv-ease),filter .6s}
.rv-open:hover .rv-media img{transform:scale(1.035)}
.rv-open:focus-visible{outline:none}
.rv-open:focus-visible .rv-media{outline:2px solid var(--yellow);outline-offset:4px}
.rv-badge{position:absolute;right:12px;bottom:12px;display:grid;place-items:center;width:30px;height:30px;border:1px solid #ffffff38;border-radius:50%;background:#0e1013a6;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);color:#fff}
.rv-badge svg{width:12px;height:12px;margin-left:2px;fill:currentColor;stroke:none}
.rv-caption{display:grid;gap:6px;min-width:0}
.rv-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;color:var(--rv-faint);font-size:.68rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase}
.rv-flag{display:inline-flex;align-items:center;gap:10px;color:var(--yellow)}
.rv-flag::before{content:'';width:3px;height:3px;border-radius:50%;background:var(--rv-faint)}
.rv-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;color:#f4f5f6;font-size:1rem;font-weight:600;line-height:1.35;letter-spacing:-.01em;
  text-decoration:underline;text-decoration-color:transparent;text-underline-offset:5px;text-decoration-thickness:1px;transition:text-decoration-color .3s}
.rv-open:hover .rv-title{text-decoration-color:#f5ce1999}
.is-feature .rv-title{font-size:clamp(1.15rem,1.6vw,1.45rem);line-height:1.28;max-width:40ch}

/* Composition : mise en avant + 4 secondaires (ordinateur : 7/12 sur deux rangs, puis 5/12 et 7/12). */
.rv-lead{display:grid;gap:clamp(28px,3vw,40px) clamp(18px,2vw,28px)}
@media(min-width:1024px){
  .rv-lead{grid-template-columns:repeat(12,minmax(0,1fr))}
  .rv-side{display:contents}
  .rv-tile.is-feature{grid-column:1/8;grid-row:1/3}
  .rv-tile.is-feature .rv-media{flex:1;aspect-ratio:auto;min-height:420px}
  .rv-side .rv-tile:nth-child(1){grid-column:8/13;grid-row:1}
  .rv-side .rv-tile:nth-child(2){grid-column:8/13;grid-row:2}
  .rv-side .rv-tile:nth-child(3){grid-column:1/6;grid-row:3}
  .rv-side .rv-tile:nth-child(4){grid-column:6/13;grid-row:3}
  .rv-side .rv-tile:nth-child(-n+2) .rv-media{aspect-ratio:16/10}
  .rv-side .rv-tile:nth-child(n+3) .rv-media{aspect-ratio:auto;height:clamp(260px,24vw,360px)}
}
@media(min-width:761px) and (max-width:1023.98px){
  .rv-tile.is-feature .rv-media{aspect-ratio:16/9}
  .rv-side{display:grid;grid-template-columns:1fr 1fr;gap:32px 20px}
}
/* Mobile : grande réalisation, puis les secondaires en défilement horizontal (toute la largeur, un aperçu de la suivante). */
@media(max-width:760px){
  .rv-section{padding-block:56px 64px}
  .rv-head{margin-bottom:26px}
  .rv-tile.is-feature .rv-media{aspect-ratio:5/4}
  .rv-side{display:flex;gap:14px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:none;
    margin-inline:calc(-1 * var(--rv-gutter,18px));padding-inline:var(--rv-gutter,18px);scroll-padding-inline:var(--rv-gutter,18px)}
  .rv-side::-webkit-scrollbar{display:none}
  .rv-side .rv-tile{flex:0 0 74%;scroll-snap-align:start;min-width:0}
  .rv-side .rv-title{font-size:.95rem}
}

/* Toutes les réalisations (sur demande) */
.rv-more{display:flex;justify-content:center;margin-top:clamp(40px,5vw,64px)}
.rv-more-toggle{display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:12px 26px;border:1px solid #ffffff3d;border-radius:999px;background:transparent;color:#fff;
  font:inherit;font-size:.92rem;font-weight:600;cursor:pointer;transition:border-color .25s,background .25s}
.rv-more-toggle:hover{border-color:var(--yellow);background:#ffffff08}
.rv-more-toggle:focus-visible{outline:2px solid var(--yellow);outline-offset:3px}
.rv-more-toggle::after{content:'';width:7px;height:7px;margin:-3px 0 0 6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);transition:transform .25s,margin .25s}
.rv-more-toggle[aria-expanded=true]::after{margin-top:3px;transform:rotate(-135deg)}
.rv-count{color:var(--rv-faint);font-weight:500}
.rv-all{margin-top:clamp(36px,4vw,56px)}
.rv-all[hidden]{display:none}
.rv-filters{display:flex;flex-wrap:wrap;gap:6px 26px;margin-bottom:28px;padding-bottom:14px;border-bottom:1px solid var(--rv-line)}
.rv-filters button{padding:6px 0;border:0;border-bottom:2px solid transparent;background:none;color:var(--rv-soft);font:inherit;font-size:.86rem;font-weight:600;cursor:pointer;transition:color .2s,border-color .2s}
.rv-filters button:hover{color:#fff}
.rv-filters button[aria-pressed=true]{color:#fff;border-bottom-color:var(--yellow)}
.rv-filters button:focus-visible{outline:2px solid var(--yellow);outline-offset:3px}
.rv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:36px 22px}
.rv-grid .rv-tile[hidden]{display:none}
.rv-grid .rv-title{font-size:.92rem}
.rv-empty{color:var(--rv-soft)}
.rv-noscript{color:var(--rv-soft)}
@media(max-width:760px){.rv-grid{grid-template-columns:1fr 1fr;gap:26px 12px}.rv-grid .rv-title{font-size:.86rem}.rv-grid .rv-meta{font-size:.6rem;letter-spacing:.1em}}

/* ───── Visionneuse */
/* Page figée derrière la visionneuse (opaque, plein écran : aucun décalage visible, aucune réserve de barre de défilement). */
html.rv-locked{overflow:hidden}
html.rv-locked body{overflow:hidden}
dialog.rv-viewer{position:fixed;inset:0;width:100vw;max-width:none;height:100vh;height:100dvh;max-height:none;margin:0;padding:0;border:0;background:var(--rv-bg);color:#f3f4f5;overflow:hidden;overscroll-behavior:contain}
dialog.rv-viewer::backdrop{background:var(--rv-bg)}
dialog.rv-viewer[open]{display:block}
.rv-viewer{transition:opacity .24s ease}
.rv-viewer.is-entering{opacity:0}
.rv-v-shell{display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:100%;padding:clamp(14px,2.2vw,30px) clamp(14px,3vw,44px) clamp(12px,1.8vw,24px);
  padding-top:max(clamp(14px,2.2vw,30px),env(safe-area-inset-top));padding-bottom:max(clamp(12px,1.8vw,24px),env(safe-area-inset-bottom))}
.rv-v-top{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding-bottom:clamp(12px,1.6vw,20px)}
.rv-v-info{min-width:0;max-width:78ch}
.rv-v-meta{margin:0 0 6px;color:var(--yellow);font-size:.68rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase}
.rv-v-meta:empty{display:none}
.rv-v-title{margin:0;color:#fff;font-size:clamp(1.05rem,1.5vw,1.4rem)!important;font-weight:650;line-height:1.28;letter-spacing:-.012em}
.rv-v-desc{margin:8px 0 0;color:var(--rv-soft);font-size:.9rem;line-height:1.55;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.rv-viewer.is-expanded .rv-v-desc{display:block;max-height:32vh;overflow:auto}
.rv-v-links{display:flex;flex-wrap:wrap;align-items:center;gap:6px 20px;margin-top:8px}
.rv-v-more{padding:4px 0;border:0;background:none;color:#fff;font:inherit;font-size:.8rem;font-weight:600;text-decoration:underline;text-underline-offset:4px;text-decoration-color:#ffffff59;cursor:pointer}
.rv-v-more[hidden]{display:none}
.rv-v-cta{color:var(--yellow);font-size:.8rem;font-weight:700;text-decoration:none;padding:4px 0}
.rv-v-cta::after{content:' →'}
.rv-v-cta:hover{text-decoration:underline;text-underline-offset:4px}
.rv-v-close{flex:0 0 auto;display:grid;place-items:center;width:46px;height:46px;border:1px solid #ffffff38;border-radius:50%;background:#ffffff0f;color:#fff;cursor:pointer;transition:background .2s,border-color .2s}
.rv-v-close:hover{background:#ffffff24;border-color:#ffffff66}
.rv-v-close svg,.rv-arrow svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.rv-viewer button:focus-visible,.rv-viewer a:focus-visible{outline:2px solid var(--yellow);outline-offset:3px}

.rv-v-stage{position:relative;min-height:0;container-type:size}
.rv-pane{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
.rv-pane[hidden]{display:none}

/* Photos */
.rv-photos{touch-action:pan-y pinch-zoom}
.rv-photo{display:block;width:100%;height:100%;max-width:min(100%,var(--rv-maxw,100%));max-height:min(100%,var(--rv-maxh,100%));object-fit:contain;border-radius:3px;user-select:none;-webkit-user-drag:none;transition:opacity .28s ease,transform .38s var(--rv-ease)}
.rv-photos.is-changing .rv-photo{opacity:0}
.rv-photos.is-changing[data-direction="1"] .rv-photo{transform:translateX(14px)}
.rv-photos.is-changing[data-direction="-1"] .rv-photo{transform:translateX(-14px)}
.rv-arrow{position:absolute;top:50%;display:grid;place-items:center;width:52px;height:52px;margin-top:-26px;border:1px solid #ffffff33;border-radius:50%;background:#0e1013b3;
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#fff;cursor:pointer;transition:background .2s,border-color .2s,opacity .2s}
.rv-arrow:hover{background:#26292ee6;border-color:#ffffff73}
.rv-arrow.is-prev{left:0}
.rv-arrow.is-next{right:0}
.rv-photos.is-single .rv-arrow{display:none}

/* Avant / après */
.rv-compare{--ar:1.3333;position:relative;width:min(100cqw,calc(100cqh * var(--ar)));aspect-ratio:var(--ar);max-height:100cqh;overflow:hidden;border-radius:3px;background:#0e1013;
  touch-action:pan-y;user-select:none;cursor:ew-resize}
.rv-compare img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none;-webkit-user-drag:none}
.rv-cmp-after{position:absolute;inset:0;clip-path:inset(0 50% 0 0)}
.rv-cmp-tag{position:absolute;top:14px;padding:6px 11px;border-radius:999px;background:#0e1013a6;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);color:#fff;
  font-size:.66rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;pointer-events:none}
.rv-cmp-tag.is-after{left:14px}
.rv-cmp-tag.is-before{right:14px}
.rv-handle{position:absolute;top:0;bottom:0;left:50%;width:0;pointer-events:none}
.rv-handle::before{content:'';position:absolute;top:0;bottom:0;left:-1px;width:2px;background:#fff;box-shadow:0 0 0 1px #0000001f,0 0 18px #0006}
.rv-knob{position:absolute;top:50%;left:0;display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:#fff;color:#16181b;box-shadow:0 6px 24px #0007;
  transform:translate(-50%,-50%);transition:transform .2s var(--rv-ease)}
.rv-knob svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.rv-compare.is-dragging .rv-knob{transform:translate(-50%,-50%) scale(1.08)}
.rv-compare:focus-within .rv-knob{box-shadow:0 0 0 3px var(--yellow),0 6px 24px #0007}
.rv-range{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;opacity:0}

/* Vidéo : aperçu sobre, lecteur chargé à la demande */
.rv-video-pane{flex-direction:column;gap:12px}
.rv-video-frame{position:relative;display:grid;place-items:center;overflow:hidden;border-radius:3px;background:#0e1013;
  width:min(100cqw,calc((100cqh - 44px) * 16 / 9));aspect-ratio:16/9}
.rv-video-frame.is-vertical{width:min(100cqw,calc((100cqh - 44px) * 9 / 16));aspect-ratio:9/16}
.rv-video-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:brightness(.55) saturate(.9)}
.rv-video-overlay{position:relative;display:grid;justify-items:center;gap:12px;padding:20px;text-align:center}
.rv-video-play{display:inline-flex;align-items:center;gap:10px;min-height:48px;padding:12px 22px 12px 16px;border:1px solid #ffffff59;border-radius:999px;background:#0e1013b3;
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#fff;font:inherit;font-size:.92rem;font-weight:650;text-decoration:none;cursor:pointer;transition:background .2s,border-color .2s}
.rv-video-play:hover{background:#26292ee6;border-color:#fff}
.rv-video-play svg{width:18px;height:18px;fill:currentColor}
.rv-video-consent{max-width:46ch;margin:0;color:var(--rv-soft);font-size:.74rem;line-height:1.45;text-align:center}
.rv-video-consent[hidden]{display:none}
.rv-video-consent a{color:#fff}
.rv-video-frame iframe,.rv-video-frame video{position:absolute;inset:0;width:100%;height:100%;border:0;background:#000}
.rv-video-tools{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px 20px;min-height:32px;font-size:.8rem}
.rv-video-stop{padding:4px 0;border:0;background:none;color:#fff;font:inherit;text-decoration:underline;text-underline-offset:4px;cursor:pointer}
.rv-video-stop[hidden],.rv-video-external[hidden]{display:none}
.rv-video-external{color:var(--rv-soft);text-decoration:none}
.rv-video-external:hover{color:#fff}

/* Barre basse : Photos · Avant / après · Vidéo, compteur */
.rv-v-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:clamp(12px,1.6vw,20px);min-height:44px}
.rv-v-views{display:inline-flex;gap:2px;padding:3px;border:1px solid var(--rv-line);border-radius:999px}
.rv-v-views[hidden]{display:none}
.rv-v-views button{position:relative;min-height:36px;padding:7px 15px;border:0;border-radius:999px;background:transparent;color:var(--rv-soft);font:inherit;font-size:.8rem;font-weight:600;cursor:pointer;
  transition:background .2s,color .2s}
.rv-v-views button:hover{color:#fff}
.rv-v-views button[aria-pressed=true]{background:#ffffff1f;color:#fff}
.rv-v-views button.is-highlight[aria-pressed=false]::after{content:'';position:absolute;top:7px;right:8px;width:5px;height:5px;border-radius:50%;background:var(--yellow)}
.rv-v-status{display:flex;align-items:center;gap:18px;margin-left:auto;color:var(--rv-soft);font-size:.78rem}
.rv-v-count{color:#fff;font-variant-numeric:tabular-nums;letter-spacing:.08em}
.rv-v-count[hidden],.rv-v-hint:empty{display:none}
.rv-sr{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Mobile : plein écran, flèches en bas de l'image (le glissement du doigt reste possible), titres compacts */
@media(max-width:760px){
  .rv-v-shell{padding-inline:14px}
  .rv-v-top{gap:12px}
  .rv-v-title{font-size:1rem!important}
  .rv-v-desc{font-size:.84rem}
  .rv-v-close{width:44px;height:44px}
  .rv-arrow{top:auto;bottom:10px;margin-top:0;width:44px;height:44px}
  .rv-arrow.is-prev{left:10px}
  .rv-arrow.is-next{right:10px}
  .rv-v-bottom{flex-wrap:wrap}
  .rv-v-views{max-width:100%;overflow-x:auto;scrollbar-width:none}
  .rv-v-views button{padding:7px 12px;font-size:.78rem}
  .rv-cmp-tag{top:10px;padding:5px 9px}
  .rv-cmp-tag.is-after{left:10px}
  .rv-cmp-tag.is-before{right:10px}
  .rv-knob{width:44px;height:44px}
}
@media(prefers-reduced-motion:reduce){
  .rv-media img,.rv-photo,.rv-knob,.rv-viewer,.rv-more-toggle::after{transition:none!important}
  .rv-open:hover .rv-media img{transform:none}
}
