html, body {
    height: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

main {
    flex: 1;
}

.header {
    width: 100%;
    padding: 20px 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    text-decoration: none;
    color: #111;
    font-size: 14px;
    letter-spacing: 1px;
    position: relative;
    transition: opacity 0.2s ease;
}

.nav-link:hover {
    opacity: 0.6;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 1px;
    background: #111;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

body {
    margin: 0;
    background: #fff;
    color: #111;
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
}

/* HERO */
.hero {
    text-align: center;
    padding: 8px 16px 4px;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    font-weight: 600;
    margin: 0;
}

.artist-intro {
    width: 100%;
    margin: 16px 0 0;
    padding: 20px 24px;
    background: #f8f3e8;
    color: #444;
}

.artist-intro-inner {
    display: grid;
    grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
    grid-template-areas: "portrait name" "portrait bio";
    align-items: center;
    gap: 12px 32px;
    width: min(1040px, 100%);
    margin: 0 auto;
}

.artist-portrait {
    grid-area: portrait;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    border-radius: 6px;
}

.artist-intro h2 {
    grid-area: name;
    align-self: end;
    min-width: 0;
    margin: 0;
    color: #111;
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.25;
}

.artist-intro-copy {
    grid-area: bio;
    align-self: start;
    min-width: 0;
}

.artist-intro p {
    margin: 0 0 14px;
    font-size: 16px;
    line-height: 1.7;
}

.artist-intro p:last-child {
    margin-bottom: 0;
}

.artist-intro + .compare {
    margin-top: 32px;
}

/* ── SLIDER AVANT / APRÈS ── */
.compare {
    position: relative;
    width: 90%;
    max-width: 700px;
    /* PAS d'aspect-ratio fixe ici — défini en inline style depuis Jinja */
    margin: 80px auto 10px;
    overflow: hidden;
    border-radius: 12px;
    background: #0d0d0d;   /* fond sombre visible derrière le flou */
    touch-action: pan-y pinch-zoom;
}

.compare,
.compare * {
    user-select: none;
    -webkit-user-select: none;
}

/* Fond flouté (avant ou après) — même image, zoomée + assombrie */
.compare-bg {
    position: absolute;
    inset: -12%;
    width: 124%;
    height: 124%;
    object-fit: cover;
    filter: blur(20px) brightness(0.45);
    pointer-events: none;
    z-index: 0;
}

/* Image principale (avant ou après) — entière, aucun recadrage */
.compare-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;   /* ← toute l'image visible */
    display: block;
    pointer-events: none;
    z-index: 1;
}

/* overlay après (reçoit le clip-path JS) */
.after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* slider */
.slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: #fff;
    z-index: 4;
}

/* poignée */
.slider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -10px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 6px rgba(0,0,0,0.4);
}

/* labels */
.label {
    position: absolute;
    top: 20px;
    font-size: 11px;
    letter-spacing: 1px;
    background: rgba(255,255,255,0.8);
    padding: 6px 10px;
    border-radius: 20px;
    opacity: 0;
    z-index: 5;
    transition: opacity 0.2s ease;
}

.before-label {
    left: 20px;
}

.after-label {
    right: 20px;
}

.compare:hover .label {
    opacity: 1;
}


/* FORM */
.contact {
    margin: 50px auto;
    text-align: center;
}

.contact h2 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 30px;
}

form {
    max-width: 400px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input, textarea {
    width: 100%;
    min-height: 46px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font: inherit;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

button {
    min-height: 46px;
    padding: 12px;
    background: #111;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    opacity: 0.9;
}

/* FOOTER */
.footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.85rem;
    background: #eee;
    color: #555;
}

.footer-social {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    text-decoration: none;
}

.footer-social img {
    width: 28px;
    cursor: pointer;
}

.footer-social img:hover {
    transform: scale(1.1);
    opacity: 0.85;
}

.gallery-link {
    text-align: center;
    margin: 0 0 25px;
}

.btn-gallery {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid #000;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    color: #000;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-gallery:hover {
    background: #000;
    color: #fff;
}

.logo img {
    max-width: 200px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.btn,
.btn-style {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    color: #111;
    text-decoration: none;
}


@media (max-width: 768px) {

    .hero h1 {
        font-size: 28px;
    }

    .artist-intro {
        margin-top: 12px;
        padding: 16px;
    }

    .artist-intro-inner {
        grid-template-columns: 90px minmax(0, 1fr);
        grid-template-areas: "portrait name" "portrait bio";
        gap: 14px;
    }

    .artist-intro h2 {
        align-self: center;
        font-size: 22px;
    }

    .artist-intro p {
        font-size: 14px;
        line-height: 1.6;
    }

    .artist-intro + .compare {
        margin-top: 28px;
    }

    .compare {
        width: calc(100% - 24px);
        margin: 28px auto 8px;
        border-radius: 8px;
    }

    .label {
        font-size: 10px;
        padding: 4px 8px;
    }

    .contact {
        width: 100%;
        margin: 48px auto;
        padding: 0 20px;
    }

    form {
        width: 100%;
    }

    .btn-gallery {
        padding: 10px 18px;
        font-size: 13px;
    }

    .logo img {
        max-width: 148px;
    }

    .header {
        padding: 6px 12px 12px;
    }

    .nav {
        gap: 4px 20px;
    }
}
