@font-face {
    font-family: "Suisse Intl";
    src: url("assets/fonts/SuisseIntlTrial-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

:root {
    --font: "Suisse Intl", sans-serif;
}

/* Base */

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

html {
    height: 100%;
    overflow: hidden;
    color-scheme: dark;
}

body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    color: white;
    font-size: clamp(20px, calc(19px + 0.313vw), 25px);
    font-family: var(--font);
    font-weight: 400;
    text-align: center;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    text-underline-offset: 10px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout */

main {
    height: 100svh;
    padding: 40px 60px;
}

.content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    animation: fade-in 1s ease both;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
}

/* Vidéo de fond */

.video {
    position: fixed;
    inset: 0;
    z-index: -1;
}

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

/* Logo */

.logo-desktop,
.logo-mobile {
    max-width: 100%;
    min-height: 0;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

.logo-mobile {
    display: none;
}

/* Coming Soon */

.coming-soon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.coming-soon img {
    width: auto;
    height: 1.2em;
}

/* Footer */

.footer {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
}

.social {
    display: flex;
    gap: 40px;
}

.contact-label a {
    text-decoration: underline;
}

.contact-label {
    span {
        margin-right: 10px;
    }
}

/* Panneau contact (mobile) — fermeture pilotée par script.js */

.contact-toggle,
.contact-close {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.contact-toggle {
    display: none;
    transition:
        opacity 0.3s ease 0.25s,
        translate 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s;
    text-decoration: underline;
}

.contact-open .contact-toggle {
    opacity: 0;
    translate: 0 -12px;
    transition-delay: 0s;
}

.contact-panel {
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0 0 40px;
    border: 0;
    background: rgb(0 0 0 / 0.5);
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

.contact-panel:popover-open {
    display: flex;
    transition: opacity 0.3s ease;
}

.contact-panel a {
    text-decoration: underline;
    text-underline-offset: 8px;
    text-decoration-thickness: 1px;
}

/* Ouverture : dépli de bas en haut, le x en premier */

.contact-panel > * {
    transition:
        opacity 0.3s ease,
        translate 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.contact-panel > :nth-last-child(2) {
    transition-delay: 0.05s;
}

.contact-panel > :nth-last-child(3) {
    transition-delay: 0.1s;
}

.contact-panel > :nth-last-child(4) {
    transition-delay: 0.15s;
}

.contact-panel > :nth-last-child(5) {
    transition-delay: 0.2s;
}

@starting-style {
    .contact-panel:popover-open {
        opacity: 0;
    }

    .contact-panel:popover-open > * {
        opacity: 0;
        translate: 0 16px;
    }
}

/* Fermeture : repli de haut en bas, le x en dernier, puis le fond */

.contact-panel.is-closing {
    opacity: 0;
    transition: opacity 0.35s ease 0.2s;
}

.contact-panel.is-closing > * {
    opacity: 0;
    translate: 0 16px;
    transition:
        opacity 0.3s ease-in,
        translate 0.3s cubic-bezier(0.4, 0, 1, 1);
}

.contact-panel.is-closing > :nth-child(1) {
    transition-delay: 0s;
}

.contact-panel.is-closing > :nth-child(2) {
    transition-delay: 0.05s;
}

.contact-panel.is-closing > :nth-child(3) {
    transition-delay: 0.1s;
}

.contact-panel.is-closing > :nth-child(4) {
    transition-delay: 0.15s;
}

.contact-panel.is-closing > :nth-child(5) {
    transition-delay: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
    .contact-toggle,
    .contact-panel > * {
        translate: none !important;
    }
}

/* Mobile */

@media screen and (max-width: 768px) {
    .logo-desktop {
        display: none;
    }

    .logo-mobile {
        display: block;
    }

    .coming-soon {
        gap: 8px;
    }

    .footer {
        justify-content: center;
    }

    .contact-label,
    .social {
        display: none;
    }

    .contact-toggle {
        display: block;
    }
}
