/*
 * Conferis public site (T-34). The only stylesheet of the vitrine.
 * Desktop values come first (1440 px is the reference); the phone differences
 * (390 px) are gathered in the media query at the end of the file.
 */

/* Bricolage Grotesque (headings), SIL Open Font License 1.1, self-hosted. */
@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal;
    font-weight: 200 800;
    font-stretch: 100%;
    font-display: swap;
    src: url('/assets/fonts/bricolage-grotesque-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal;
    font-weight: 200 800;
    font-stretch: 100%;
    font-display: swap;
    src: url('/assets/fonts/bricolage-grotesque-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Figtree (text), SIL Open Font License 1.1, self-hosted, Latin subset (covers French). */
@font-face {
    font-family: 'Figtree';
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url('/assets/fonts/figtree-latin-wght-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --navy: #161938;
    --slate: #585E82;
    --lavender: #9B9EBD;
    --green: #8FD12F;
    --link: #4A6D18;
    --rule: #E3E4EC;
    --tile: #EEF0F5;
    --white: #FFFFFF;
    --gutter: clamp(24px, 5vw, 72px);
    --content-width: 1296px;
    --font-text: 'Figtree', system-ui, sans-serif;
    --font-heading: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
}

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

body {
    margin: 0;
}

img {
    display: block;
}

a {
    color: var(--link);
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.7;
}

a:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 3px;
    border-radius: 4px;
}

h1,
h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 600;
}

/* Page frame */

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--white);
    color: var(--navy);
    font-family: var(--font-text);
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo {
    height: clamp(32px, 3.2vw, 44px);
    width: auto;
}

.logo-link {
    display: inline-flex;
}

.button-outline {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 20px;
    border: 1.5px solid var(--navy);
    border-radius: 999px;
    color: var(--navy);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

/* Photos */

.photo {
    transition: transform 0.5s cubic-bezier(0.22, 0.7, 0.2, 1);
}

@media (hover: hover) {
    .photo:hover {
        transform: scale(1.015);
    }
}

.tile {
    border-radius: 20px;
    overflow: hidden;
    background: var(--tile);
}

.tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Home page */

.home-header {
    padding: clamp(20px, 3vw, 40px) var(--gutter);
}

.home-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(64px, 9vw, 128px);
    padding: clamp(32px, 5vw, 64px) var(--gutter) clamp(64px, 9vw, 128px);
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
    align-items: center;
    gap: clamp(40px, 6vw, 96px);
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 2.2vw, 28px);
}

.hero-title {
    font-size: clamp(30px, 3.6vw, 54px);
    line-height: 1.1;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

.hero-lead {
    margin: 0;
    max-width: 32em;
    font-size: clamp(17px, 1.45vw, 21px);
    line-height: 1.5;
    color: var(--slate);
}

.rings {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1 / 1;
    justify-self: center;
}

.rings-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.rings-photo {
    position: absolute;
    left: 26%;
    top: 26%;
    width: 48%;
    height: 48%;
    border-radius: 50%;
    overflow: hidden;
    background: var(--tile);
}

.rings-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 80%;
}

.ring {
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    animation: ring-draw 1.4s cubic-bezier(0.22, 0.7, 0.2, 1) both;
}

.ring-2 {
    animation-delay: 0.15s;
}

.ring-3 {
    animation-delay: 0.3s;
}

@keyframes ring-draw {
    from {
        stroke-dashoffset: 1;
    }

    to {
        stroke-dashoffset: 0;
    }
}

.gallery {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 2vw, 28px);
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
}

.gallery-panorama {
    aspect-ratio: 21 / 9;
}

.gallery-panorama img {
    object-position: 50% 40%;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(16px, 2vw, 28px);
}

.gallery-grid .tile {
    aspect-ratio: 4 / 5;
}

/* Footer ("Crépuscule") */

.site-footer {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--white) 0, var(--lavender) 70px, var(--slate) 140px, var(--navy) 100%);
    color: var(--rule);
    padding: calc(140px + clamp(40px, 5vw, 64px)) var(--gutter) clamp(28px, 3vw, 40px);
}

.site-footer a {
    color: var(--white);
}

.site-footer a:focus-visible {
    outline-color: var(--green);
}

.footer-rings {
    position: absolute;
    top: clamp(24px, 4vw, 56px);
    right: -12vw;
    width: clamp(360px, 40vw, 600px);
    height: auto;
    aspect-ratio: 1 / 1;
    opacity: 0.14;
    pointer-events: none;
}

.footer-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: clamp(40px, 5vw, 72px);
    max-width: var(--content-width);
    margin: 0 auto;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.footer-title {
    color: var(--white);
    font-size: clamp(24px, 2.4vw, 34px);
    line-height: 1.2;
}

.footer-mail {
    text-decoration-color: var(--green);
    text-decoration-thickness: 3px;
    text-underline-offset: 7px;
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 600;
}

.footer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 15px;
    line-height: 1.5;
}

/* Legal notice page */

.legal-wrap {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 56px;
    padding: clamp(20px, 3vw, 40px) var(--gutter) clamp(64px, 8vw, 112px);
}

.legal-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: clamp(40px, 6vw, 96px);
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
}

.legal-content {
    flex: 1 1 480px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 720px;
    font-size: 17px;
    line-height: 1.6;
}

.legal-title {
    font-size: clamp(30px, 3vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.015em;
}

.legal-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legal-heading {
    font-size: 20px;
    line-height: 1.3;
}

.legal-section p {
    margin: 0;
}

.legal-photo {
    position: sticky;
    top: 40px;
    flex: 1 1 320px;
    max-width: 520px;
    aspect-ratio: 4 / 5;
    margin: 0;
}

.legal-footer {
    padding: calc(100px + clamp(28px, 3vw, 40px)) var(--gutter) clamp(28px, 3vw, 40px);
    background: linear-gradient(180deg, var(--white) 0, var(--lavender) 50px, var(--slate) 100px, var(--navy) 100%);
    color: var(--rule);
}

.legal-footer .footer-meta {
    max-width: var(--content-width);
    margin: 0 auto;
    padding-top: 0;
    border-top: 0;
}

.legal-footer a {
    color: var(--white);
}

.legal-footer a:focus-visible {
    outline-color: var(--green);
}

/* Phone (390 px reference): the four small photos become a swipeable strip. */

@media (max-width: 640px) {
    .site-header {
        gap: 16px;
    }

    .site-logo {
        height: 30px;
    }

    .button-outline {
        padding: 0 16px;
        font-size: 15px;
    }

    .home-main {
        gap: 40px;
    }

    .hero-title {
        line-height: 1.12;
        letter-spacing: -0.01em;
    }

    .gallery-panorama {
        aspect-ratio: auto;
        height: 256px;
    }

    .gallery-panorama img {
        object-position: 40% 50%;
    }

    .gallery-grid {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        margin: 0 calc(-1 * var(--gutter));
        padding: 0 var(--gutter);
    }

    .gallery-grid .tile {
        flex: 0 0 260px;
        height: 325px;
        aspect-ratio: auto;
        scroll-snap-align: start;
    }

    .site-footer {
        margin-top: auto;
        background: linear-gradient(180deg, var(--white) 0, var(--lavender) 55px, var(--slate) 110px, var(--navy) 100%);
        padding: 150px var(--gutter) 28px;
    }

    .footer-rings {
        top: 24px;
        right: -130px;
        width: 300px;
    }

    .footer-inner {
        gap: 40px;
    }

    .footer-contact {
        gap: 10px;
    }

    .footer-title {
        font-size: 24px;
    }

    .footer-mail {
        font-size: 20px;
        text-underline-offset: 6px;
    }

    .site-footer .footer-meta {
        flex-direction: column;
        gap: 6px;
        padding-top: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ring {
        animation: none;
    }

    .photo,
    a {
        transition: none;
    }
}
