/* =========================================================================
   EuropaGlass – Page « Réalisations » (avant / après, barre horizontale)
   ========================================================================= */
.egr {
    --ink: #0B2545; --ink2: #4A5D78; --blue: #1C6DD0; --blue2: #4FA3F7; --sky: #EAF4FD; --line: rgba(11, 37, 69, 0.12);
    --font-h: 'Syne', 'Inter', sans-serif; --font-b: 'Inter', system-ui, sans-serif; --font-ui: 'Manrope', 'Inter', sans-serif;
    position: relative; width: 100%; color: var(--ink); font-family: var(--font-b); font-size: 16px; line-height: 1.6; text-align: left;
    background: radial-gradient(ellipse 80% 420px at 50% 0, #DCEBFA 0%, rgba(220, 235, 250, 0) 100%), #F6F9FC;
    -webkit-font-smoothing: antialiased; isolation: isolate;
}
.egr *, .egr *::before, .egr *::after { box-sizing: border-box; }
.egr h1, .egr h2, .egr p { margin: 0; padding: 0; border: 0; background: none; text-transform: none; letter-spacing: normal; }
.egr a { text-decoration: none !important; box-shadow: none; }
.egr :where(button) { font: inherit; margin: 0; }
.egr img { max-width: none; border: 0; box-shadow: none; border-radius: 0; margin: 0; }
.egr a:focus-visible, .egr button:focus-visible { outline: 3px solid var(--blue2); outline-offset: 3px; }

/* ---------- Header (même style que l'accueil) ---------- */
.egr-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px 4%;
    background: rgba(246, 249, 252, 0.82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid rgba(11, 37, 69, 0.06); }
body.admin-bar .egr-header { top: 32px; }
.egr-logo { display: flex; align-items: center; gap: 0.7rem; flex: none; min-width: 0; }
.egr img.egr-logo-mark { height: 50px; width: auto; display: block; }
.egr-logo-text { display: flex; flex-direction: column; gap: 4px; }
.egr img.egr-logo-word { height: 19px; width: auto; display: block; }
.egr-logo-sub { font-family: var(--font-ui); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink2); white-space: nowrap; }
.egr-nav { display: flex; gap: 0.2rem; padding: 5px; border-radius: 100px; background: rgba(255, 255, 255, 0.85); border: 1px solid #fff; box-shadow: 0 8px 28px rgba(11, 37, 69, 0.1); }
.egr-nav a { font-family: var(--font-ui); font-weight: 600; font-size: 0.86rem; color: var(--ink) !important; padding: 0.6rem 1.15rem; border-radius: 100px; white-space: nowrap; transition: background 0.2s ease; }
.egr-nav a:hover { background: rgba(28, 109, 208, 0.08); }
.egr-nav a.is-active { background: var(--ink); color: #fff !important; }
.egr-head-actions { display: flex; align-items: center; gap: 0.6rem; flex: none; }
.egr-burger { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
    flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 0; }
.egr-burger i { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.35s ease, opacity 0.25s ease; }
.egr.is-menu .egr-burger { background: var(--ink); color: #fff; border-color: var(--ink); }
.egr.is-menu .egr-burger i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.egr.is-menu .egr-burger i:nth-child(2) { opacity: 0; }
.egr.is-menu .egr-burger i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.egr-mmenu { display: none; }

/* ---------- Boutons ---------- */
.egr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.7rem; height: 50px; padding: 0 1.4rem; border-radius: 100px;
    font-family: var(--font-ui); font-weight: 700; font-size: 0.95rem; line-height: 1; white-space: nowrap; cursor: pointer; border: 1px solid transparent;
    transition: transform 0.25s ease, background 0.2s ease; }
.egr-btn:hover { transform: translateY(-2px); }
.egr-btn-primary { background: var(--blue); color: #fff !important; box-shadow: 0 10px 26px rgba(28, 109, 208, 0.35); }
.egr-btn-primary:hover { background: #155CB4; }
.egr-btn-ghost { background: #fff; color: var(--ink) !important; border-color: var(--line); }
.egr-btn-white { background: #fff; color: var(--blue) !important; }
.egr-btn-line { background: transparent; color: #fff !important; border-color: rgba(255, 255, 255, 0.6); }
.egr-btn-line:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- Intro ---------- */
.egr-wrap { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 56px 0 80px; }
.egr-intro { max-width: 760px; margin-bottom: 2rem; }
.egr-kicker { display: flex; align-items: center; gap: 0.8rem; font-family: var(--font-ui); font-size: 0.78rem !important; font-weight: 700; letter-spacing: 0.22em !important;
    text-transform: uppercase !important; color: var(--blue) !important; margin-bottom: 1rem !important; }
.egr-kicker i { display: block; width: 34px; height: 3px; border-radius: 3px; background: var(--blue); }
.egr h1 { font-family: var(--font-h); font-weight: 800; font-size: clamp(2.3rem, 5.2vw, 4rem); line-height: 1.02; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 1.1rem; }
.egr h1 span { display: block; color: var(--blue); }
.egr-lead { font-size: 1.08rem; color: var(--ink2); max-width: 640px; }
.egr-lead strong { color: var(--ink); }

/* ---------- Filtres ---------- */
.egr-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.8rem; }
.egr-filter { display: inline-flex; align-items: center; gap: 0.5rem; height: 42px; padding: 0 1.05rem; border-radius: 100px; border: 1px solid var(--line); background: #fff;
    font-family: var(--font-ui); font-weight: 700; font-size: 0.88rem; color: var(--ink); cursor: pointer; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.egr-filter em { font-style: normal; font-size: 0.72rem; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 100px; background: var(--sky); color: var(--blue); }
.egr-filter:hover { border-color: rgba(28, 109, 208, 0.45); }
.egr-filter.is-on { background: var(--blue); border-color: var(--blue); color: #fff; }
.egr-filter.is-on em { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* ---------- Grille : colonnes « maçonnerie » remplies par le script (chaque photo garde ses proportions) ---------- */
.egr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; align-items: start; }
.egr-grid.is-masonry { display: flex; align-items: flex-start; gap: 1.2rem; }
.egr-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 1.2rem; }
.egr-card { position: relative; border-radius: 22px; overflow: hidden; background: #fff; border: 1px solid rgba(11, 37, 69, 0.08);
    box-shadow: 0 14px 36px rgba(11, 37, 69, 0.08); width: 100%; transform: translateZ(0); }
.egr-card[hidden] { display: none !important; }
.egr-card.is-in { animation: egrIn 0.45s ease both; }
@keyframes egrIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateZ(0); } }

/* ---------- Avant / après : barre HORIZONTALE au milieu ---------- */
.egr-cmp { cursor: ns-resize; position: relative; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; width: 100%; overflow: hidden; background: #DCE6F0; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.egr-cmp img { position: absolute; left: 0; top: 0; width: 100% !important; height: 100% !important; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.egr-cmp img.egr-cmp-before { height: auto !important; aspect-ratio: var(--ar); object-fit: fill; }
.egr-cmp-before-wrap { position: absolute; left: 0; right: 0; top: 0; height: var(--p); overflow: hidden; }
.egr-cmp-line { position: absolute; left: 0; right: 0; top: var(--p); height: 2px; margin-top: -1px; background: #fff; box-shadow: 0 0 12px rgba(11, 37, 69, 0.4); pointer-events: none; }
.egr-cmp-line i { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); display: grid; place-items: center; border-radius: 50%;
    background: #fff; color: var(--blue); box-shadow: 0 6px 20px rgba(11, 37, 69, 0.3); transition: transform 0.2s ease; }
.egr-cmp.is-drag .egr-cmp-line i { transform: translate(-50%, -50%) scale(1.1); }
.egr-cmp:has(.egr-range:focus-visible) .egr-cmp-line i { outline: 3px solid var(--blue2); outline-offset: 3px; }
.egr-tag { position: absolute; left: 12px; padding: 0.32rem 0.7rem; border-radius: 100px; font-family: var(--font-ui); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.14em;
    text-transform: uppercase; pointer-events: none; transition: opacity 0.2s ease; }
.egr-tag.is-before { top: 12px; background: rgba(11, 37, 69, 0.8); color: #fff; }
.egr-tag.is-after { bottom: 12px; background: rgba(255, 255, 255, 0.92); color: var(--ink); }
.egr-cmp.is-top .egr-tag.is-before, .egr-cmp.is-bottom .egr-tag.is-after { opacity: 0; }
.egr input.egr-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; pointer-events: none; -webkit-appearance: none; appearance: none;
    background: none; border: 0; touch-action: pan-y; }

.egr-card-body { padding: 1.1rem 1.25rem 1.3rem; }
.egr-chip { display: inline-block; font-family: var(--font-ui); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue);
    background: var(--sky); border-radius: 100px; padding: 0.28rem 0.7rem; margin-bottom: 0.65rem; }
.egr-card h2 { font-family: var(--font-h); font-weight: 700; font-size: 1.1rem; line-height: 1.3; color: var(--ink); margin-bottom: 0.35rem; }
.egr-card p { font-size: 0.92rem; color: var(--ink2); line-height: 1.6; }

/* ---------- Appel à l'action ---------- */
.egr-cta { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-top: 2.4rem; padding: 2.2rem 2.4rem; border-radius: 26px;
    color: #fff; background: radial-gradient(ellipse at 85% 0%, rgba(255, 255, 255, 0.2), transparent 55%), linear-gradient(115deg, #3D95F2 0%, #1C6DD0 48%, #155CB4 100%);
    box-shadow: 0 20px 50px rgba(28, 109, 208, 0.3); }
.egr-cta h2 { font-family: var(--font-h); font-weight: 800; font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.15; color: #fff; margin-bottom: 0.4rem; }
.egr-cta p { color: #E3EFFD; max-width: 520px; }
.egr-cta-btns { display: flex; gap: 0.7rem; flex-wrap: wrap; }

/* ---------- Tablette ---------- */
@media (max-width: 1100px) {
    .egr-nav a { padding: 0.55rem 0.8rem; font-size: 0.82rem; }
    .egr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
    .egr-nav, .egr-head-quote { display: none; }
    .egr-burger { display: inline-flex; }
    .egr-header { padding: 10px 5%; }
    .egr img.egr-logo-mark { height: 42px; }
    .egr img.egr-logo-word { height: 16px; }
    .egr-mmenu { display: block; position: fixed; inset: 0; z-index: 49; padding: 96px 7% 32px; background: rgba(246, 249, 252, 0.98);
        backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); opacity: 0; visibility: hidden; transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s; overflow-y: auto; }
    .egr.is-menu .egr-mmenu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
    .egr-mmenu-nav { display: flex; flex-direction: column; }
    .egr-mmenu-nav a { display: flex; align-items: baseline; gap: 0.9rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line);
        font-family: var(--font-h); font-weight: 700; font-size: 1.5rem; color: var(--ink) !important; }
    .egr-mmenu-nav a b { font-family: var(--font-ui); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; color: var(--blue); }
    .egr-mmenu-nav a.is-active { color: var(--blue) !important; }
    .egr-mmenu-foot { display: flex; flex-direction: column; gap: 0.6rem; padding-top: 1.2rem; }
    .egr-mmenu-foot .egr-btn { width: 100%; }
}
/* ---------- Téléphone ---------- */
@media (max-width: 640px) {
    .egr-wrap { width: calc(100% - 32px); padding: 34px 0 56px; }
    .egr-lead { font-size: 1rem; }
    .egr-filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 1.4rem; padding: 0 16px 4px; scrollbar-width: none; }
    .egr-filters::-webkit-scrollbar { display: none; }
    .egr-filter { flex: none; }
    .egr-grid { grid-template-columns: minmax(0, 1fr); }
    .egr-card { border-radius: 18px; }
    .egr-cta { padding: 1.6rem 1.4rem; border-radius: 20px; }
    .egr-cta-btns, .egr-cta-btns .egr-btn { width: 100%; }
    .egr-logo-sub { font-size: 0.52rem; letter-spacing: 0.16em; }
}
@media (prefers-reduced-motion: reduce) { .egr-card.is-in { animation: none; } .egr * { transition: none !important; } }
