* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Avenir', 'Avenir Next', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f5f5f5;
}

/* ── Header ────────────────────────────────────── */

header {
    background-color: #233d48;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90px;
    position: relative;
    padding: 0 32px;
}

.logo-container {
    position: absolute;
    left: 20px;
    display: flex;
    align-items: center;
    padding-right: 20px;
}

.logo-container::after {
    content: '';
    position: absolute;
    left: 80%;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 50%;
    background-color: #ffffff;
}

.logo-container img {
    height: 110px;
    width: auto;
    display: block;
}

header::after {
    content: '';
    position: absolute;
    bottom: 12px;
    left: 32px;
    right: 32px;
    height: 1px;
    background-color: #ffffff;
}

/* ── Nav ────────────────────────────────────────── */

.nav-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.nav-left,
.nav-right {
    display: flex;
    gap: 28px;
}

.nav-left a,
.nav-right a {
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.4px;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.nav-left a:hover,
.nav-right a:hover {
    opacity: 0.7;
}

/* ── Title ──────────────────────────────────────── */

.site-title {
    font-family: 'Avenir', 'Avenir Next', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #ffffff;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 2px;
    white-space: nowrap;
    user-select: none;
    margin: 0 8px;
    flex: 0 0 auto;
    text-decoration: none;
}

/* Ensure any link inside the site title has no underline */
.site-title a {
    text-decoration: none;
    color: inherit;
}

/* ── Main ───────────────────────────────────────── */

main {
    min-height: calc(100vh - 146px);
    background-size: auto;
    background-position: center;
    background-repeat: no-repeat;
}

/* make `main` a positioned container for the independent testimonial */
main {
    position: relative;
}

/* ── Icon row ─────────────────────────────────── */
/* icon-row lives in the footer now */
.icon-row {
    display: flex;
    gap: 15px;
    align-items: center;
}

.icon-row a {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 0px;
    overflow: visible; /* allow tooltip pseudo-element to escape the anchor box */
    box-shadow: 0 3px 10px rgba(0,0,0,0.16);
    transition: transform 140ms ease, box-shadow 140ms ease;
    position: relative;
    z-index: 1;
}

.icon-row a img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.icon-row a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.20);
}

/* Tooltip for footer icons */
.icon-row a{position:relative}
.icon-row a::after{
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: #ffffff;
    color: #111;
    padding: 6px 9px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(2,6,23,0.12);
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease, transform 150ms ease;
    z-index: 9999;
}
.icon-row a::before{
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
    opacity: 0;
    transition: opacity 150ms ease;
    z-index: 9999;
}
.icon-row a:hover::after,
.icon-row a:focus::after,
.icon-row a:focus-within::after{
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.icon-row a:hover::before,
.icon-row a:focus::before,
.icon-row a:focus-within::before{
    opacity: 1;
}

/* Footer */
.site-footer {
    background-color: #233d48;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
}
.footer-left {
    color: #cfcfcf;
    font-size: 14px;
}

/* ── Hero ───────────────────────────────────────── */

.hero {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding: 130px 80px 0;
    position: relative;
    gap: 60px;
}

.hero-heading {
    font-family: 'Avenir', 'Avenir Next', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 56px;
    font-weight: 400;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.45);
    margin: 0;
}

.hero-heading strong {
    font-weight: 800;
}

.hero-sub {
    font-family: 'Avenir', 'Avenir Next', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 24px;
    font-weight: 400;
    color: #ffffff;
    text-shadow: 0 1px 8px rgba(0,0,0,0.4);
    margin: 10px 0 0;
}

/* ── Testimonial card ───────────────────────────── */

.testimonial-card {
    background-color: rgba(42, 109, 129, 0.6);
    border-radius: 18px;
    padding: 30px 38px;
    width: 60%;
    max-width: 500px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    position: absolute;
    right: 80px;
    top: 140px;
    transition: top 220ms ease;
}

.testimonial-name {
    font-family: 'Avenir', 'Avenir Next', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 10px;
}

.stars {
    font-size: 28px;
    color: #f5c518;
    margin: 0 0 14px;
    letter-spacing: 3px;
}

.testimonial-text {
    font-family: 'Avenir', 'Avenir Next', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #f0f0f0;
    line-height: 1.6;
    margin: 0;
}

/* Background for realisations page */
body.realisations {
    background: hsla(0, 0%, 0%, 1);
    background: linear-gradient(-90deg, hsla(0, 0%, 0%, 1) 0%, hsla(0, 0%, 5%, 1) 12%, hsla(194, 52%, 13%, 1) 33%, hsla(193, 48%, 24%, 1) 56%, hsla(195, 51%, 32%, 1) 72%, hsla(193, 48%, 37%, 1) 84%, hsla(194, 49%, 44%, 1) 100%);
    background: -moz-linear-gradient(-90deg, hsla(0, 0%, 0%, 1) 0%, hsla(0, 0%, 5%, 1) 12%, hsla(194, 52%, 13%, 1) 33%, hsla(193, 48%, 24%, 1) 56%, hsla(195, 51%, 32%, 1) 72%, hsla(193, 48%, 37%, 1) 84%, hsla(194, 49%, 44%, 1) 100%);
    background: -webkit-linear-gradient(-90deg, hsla(0, 0%, 0%, 1) 0%, hsla(0, 0%, 5%, 1) 12%, hsla(194, 52%, 13%, 1) 33%, hsla(193, 48%, 24%, 1) 56%, hsla(195, 51%, 32%, 1) 72%, hsla(193, 48%, 37%, 1) 84%, hsla(194, 49%, 44%, 1) 100%);
    filter: progid: DXImageTransform.Microsoft.gradient( startColorstr="#000000", endColorstr="#0E0E0E", GradientType=1 );
}

/* Link placed below the testimonial card */
.publish-review-link {
    position: absolute;
    right: 28px;
    bottom: 18px;
    color: #ffffff;
    text-decoration: underline;
    font-weight: 600;
    background: transparent;
    font-size: 16px;
}

.publish-review-link:hover {
    opacity: 0.85;
}

/* Réalisations grid: four aligned texts */
.realisations-grid {
    max-width: 1100px;
    margin: 1px auto;
    display: flex;
    gap: 28px;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.realisations-tile {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    padding: 18px 28px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    text-align: center;
    min-width: 160px;
    transition: transform 160ms ease, background 160ms ease;
}

.realisations-tile:hover {
    transform: translateY(-6px);
    background: rgba(255,255,255,0.08);
}

/* Background for À propos page */
body.apropos {
    background-color: #eeeae3;
    min-height: 100vh;
}

/* Center AVR image on À propos page */
.apropos-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}
.apropos-hero img {
    max-width: 700px;
    width: 100%;
    height: auto;
    display: block;
}

/* About copy container */
.apropos-copy {
    max-width: 860px;
    margin: 20px auto 80px;
    padding: 0 20px;
}
.apropos-copy article {
    color: #222222;
    text-align: justify;
    font-size: 18px;
    line-height: 1.8;
}
.apropos-copy p {
    margin: 0 0 18px;
}
.apropos-copy strong {
    font-weight: 800;
}

/* Selected tile: slightly larger, white background, black text */
.realisations-tile.selected {
    transform: scale(1.06);
    background: #ffffff;
    color: #0b0b0b;
    box-shadow: 0 8px 24px rgba(0,0,0,0.28);
}

.realisations-tile[role="button"] {
    cursor: pointer;
    user-select: none;
}

.realisations-empty {
    color: rgba(255,255,255,0.9);
    text-align: center;
    font-size: 22px;
    margin-top: 32px;
    opacity: 0.95;
}

/* ── Réalisations image grid ──────────────────────────────────── */

.real-section {
    padding-bottom: 60px;
}

.real-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0 40px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

/* ── Card ── */

.real-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #1c2a31;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.real-card.portrait {
    grid-column: span 1;
    aspect-ratio: 9 / 16;
}

.real-card.landscape {
    grid-column: 1 / -1;   /* full row */
    aspect-ratio: 16 / 9;
}

/* ── Before / After container ── */

.real-ba {
    position: absolute;
    inset: 0;
    cursor: ew-resize;
    touch-action: none;
    user-select: none;
}

.real-after,
.real-before {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
}

.real-before {
    z-index: 1;
    /* clip-path updated by JS */
}

/* ── Slider handle ── */

.real-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;              /* updated by JS */
    width: 3px;
    background: rgba(255,255,255,0.92);
    transform: translateX(-50%);
    z-index: 3;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(0,0,0,0.5);
}

.real-handle-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #444;
    font-weight: 900;
    letter-spacing: -1px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

/* ── AVANT / APRÈS corner labels ── */

.real-label {
    position: absolute;
    top: 12px;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: #ffffff;
    background: rgba(0,0,0,0.45);
    z-index: 2;
    pointer-events: none;
    user-select: none;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.real-label.avant { left: 12px; }
.real-label.après { right: 12px; }

/* ── Caption overlay (lower-left) ── */

.real-caption {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 5;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.real-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-shadow: 0 1px 8px rgba(0,0,0,0.8), 0 0 24px rgba(0,0,0,0.5);
    line-height: 1.2;
}

.real-sub {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    font-weight: 400;
    text-shadow: 0 1px 6px rgba(0,0,0,0.75);
    line-height: 1.3;
}
