
@font-face {

    font-family: "GraffitiPiece";

    src:
        url("./fonts/GraffitiPieceRegular-gwXVE.ttf")
        format("truetype");

    font-weight: normal;

    font-style: normal;

}


/* DS-DIGIT FONT FOR FOOTER/NAMES */
@font-face {

    font-family: "DS-Digit";

    src: url("./fonts/DS-DIGIT.TTF") format("truetype");

    font-weight: normal;

    font-style: normal;

}


@font-face {

    font-family: "Inkspot";

    src:
        url("./fonts/Inkspot.ttf")
        format("truetype");

    font-weight: normal;

    font-style: normal;

}


/* =========================================================
RESET
========================================================= */

* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

    -webkit-user-select: none;

    -moz-user-select: none;

    -ms-user-select: none;

    user-select: none;

}

::selection {

    background: transparent;

    color: inherit;

}

::-moz-selection {

    background: transparent;

    color: inherit;

}

img {

    -webkit-user-drag: none;

    user-drag: none;

    -webkit-user-select: none;

    -moz-user-select: none;

    -ms-user-select: none;

    user-select: none;

    -webkit-touch-callout: none;

}


html {

    width: 100%;

    height: 100%;

    overflow: hidden;

}


body {

    width: 100%;

    height: 100vh;

    overflow: hidden;

    background-color: #000;

    background-image:
        url("./images/contact-texture.jpg");

    background-size: cover;

    background-position: center;

    background-repeat: no-repeat;

    color: #fff;

}

body::before {

    content: "";

    position: fixed;

    inset: 0;

    pointer-events: none;

    background: rgba(0, 0, 0, 1);

    opacity: 0;

    z-index: 900;

}

body.page-transition-start::before {

    animation: page-dark-flicker 2.0s ease-out both;

}

@keyframes page-dark-flicker {

    0% {
        opacity: 0;
    }

    8% {
        opacity: 0.30;
    }

    20% {
        opacity: 0.14;
    }

    34% {
        opacity: 0.24;
    }

    48% {
        opacity: 0.16;
    }

    62% {
        opacity: 0.22;
    }

    74% {
        opacity: 0.14;
    }

    82% {
        opacity: 0.10;
    }

    88% {
        opacity: 0.08;
    }

    92% {
        opacity: 0.05;
    }

    96% {
        opacity: 0.03;
    }

    100% {
        opacity: 0;
    }

}


/* =========================================================
BANDEAU
========================================================= */

.top-bar {

    position: relative;

    width: 100%;

    height: 90px;

    background: #000;

    display: flex;

    align-items: center;

    justify-content: center;

    z-index: 1000;

}


.top-bar h1 {

    font-family:
        "GraffitiPiece",
        sans-serif;

    font-size: 46px;

    font-weight: normal;

    color: #ff0000;

    letter-spacing: 2px;

}


/* =========================================================
BOUTON RETOUR
========================================================= */

.back {

    position: absolute;

    left: 30px;

    top: 50%;

    transform:
        translateY(-50%);

    width: 110px;

    height: 110px;

    display: block;

    z-index: 1100;

}


.back img {

    width: 100%;

    height: 100%;

    object-fit: contain;

    display: block;

}


.back:hover {

    opacity: 0.6;

}


/* =========================================================
CONTACTS
========================================================= */

.contacts {

    position: relative;

    width: 100%;

    height:
        calc(100vh - 90px);

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px 40px;

}


/* =========================================================
STACK DE TÉLÉPHONES
========================================================= */

.phone-stack {

    position: relative;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 70px;

    transition:
        transform 0.35s
        cubic-bezier(0.22, 1, 0.36, 1);

}


.contacts.has-selection .phone-stack {

    transform: translateX(-160px);

}


/* =========================================================
PERSONNE
========================================================= */

.person {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 12px;

    flex-shrink: 0;

    transition:
        transform 0.28s ease,
        opacity 0.28s ease,
        filter 0.28s ease;

}


.person.active {

    transform: scale(1);

    opacity: 1;

    z-index: 6;

}


.contacts.has-selection .person:not(.active) {

    opacity: 0;

    transform: translateX(-60px) scale(0.72);

    pointer-events: none;

    filter: blur(1px);

}


/* =========================================================
TÉLÉPHONE
========================================================= */

.phone {

    position: relative;

    display: block;

    width: 355px;

    height: 589px;

    text-decoration: none;

    cursor: pointer;

    transform: rotate(var(--phone-rotation, 0deg));

    transform-origin: center center;

    clip-path: polygon(13% 5%, 87% 5%, 100% 25%, 100% 75%, 87% 95%, 13% 95%, 0% 75%, 0% 25%);

    -webkit-clip-path: polygon(13% 5%, 87% 5%, 100% 25%, 100% 75%, 87% 95%, 13% 95%, 0% 75%, 0% 25%);

    overflow: hidden;

    pointer-events: auto;

}


/* Active scaling is handled on the person container to avoid double transform. */


/* =========================================================
IMAGES DU TÉLÉPHONE
========================================================= */

.phone-closed,
.phone-open {

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

    object-fit: contain;

    display: block;


    /* shadow only around the PNG (no cast shadow below) */
    filter: drop-shadow(0 0 28px rgba(0,0,0,0.85)) drop-shadow(0 0 10px rgba(0,0,0,0.6));

}


/* =========================================================
TÉLÉPHONE FERMÉ
========================================================= */

.phone-closed {

    opacity: 1;

    z-index: 2;

    animation:
        phone-vibration
        2.8s
        ease-in-out
        infinite;

}


/* =========================================================
TÉLÉPHONE OUVERT
========================================================= */

.phone-open {

    opacity: 0;

    z-index: 3;

    transition:
        opacity 0.15s ease;

}


/* soft elliptical shadow under each phone */


/* =========================================================
SURVOL
========================================================= */

.phone:hover .phone-closed {

    opacity: 0;

    animation: none;

}


.phone:hover .phone-open {

    opacity: 1;

}


.person.active .phone-open {

    opacity: 1 !important;

}


.person.active .phone-closed {

    opacity: 0 !important;

}


/* =========================================================
VIBRATION
========================================================= */

@keyframes phone-vibration {

    0% {

        transform:
            translateX(0)
            rotate(0deg);

    }

    2% {

        transform:
            translateX(-2px)
            rotate(-0.5deg);

    }

    4% {

        transform:
            translateX(2px)
            rotate(0.5deg);

    }

    6% {

        transform:
            translateX(-2px)
            rotate(-0.5deg);

    }

    8% {

        transform:
            translateX(2px)
            rotate(0.5deg);

    }

    10% {

        transform:
            translateX(0)
            rotate(0deg);

    }

    100% {

        transform:
            translateX(0)
            rotate(0deg);

    }

}


/* =========================================================
NOM
========================================================= */

.person-name {

    position: relative;

    width: 170px;

    height: 145px;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 30px 24px 24px 30px;

    color: rgba(0, 0, 0, 0.9);

    font-family: "Inkspot", "Bringthanoize", Arial, Helvetica, sans-serif;

    font-size: clamp(18px, 1.5vw, 24px);

    font-weight: normal;

    line-height: 0.95;

    letter-spacing: 0.8px;

    text-align: center;

    text-shadow:
        0 1px 0
        rgba(255, 255, 255, 0.24);

    --text-rot: -2deg;

    --text-sat: 95%;

    transform: translateY(-70px) rotate(var(--text-rot));

    text-transform: uppercase;

    isolation: isolate;

}


.person-name::before {

    content: "";

    position: absolute;

    inset: 0;

    background:
        url("./images/text.png")
        center / contain
        no-repeat;

    filter:
        saturate(var(--text-sat))
        drop-shadow(0 10px 28px rgba(0, 0, 0, 0.82))
        drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));

    z-index: -1;

}


/* =========================================================
ÉCRANS MOYENS
========================================================= */

@media (max-height: 800px) {

    .top-bar {

        height: 75px;

    }


    .contacts {

        height:
            calc(100vh - 75px);

        gap: 45px;

        padding:
            10px 25px;

    }


    .phone {

        width: 378px;

        height: 622px;

    }


    .back {

        width: 90px;

        height: 90px;

    }


    .person-name {

        width: 155px;

        height: 132px;

        padding: 26px 20px 20px 26px;

        font-size: clamp(16px, 1.4vw, 21px);

    }

}


/* =========================================================
PETITS ÉCRANS
========================================================= */

@media (max-height: 650px) {

    .top-bar {

        height: 60px;

    }


    .phone {

        width: 289px;

        height: 478px;

    }


    .contacts {

        gap: 25px;

    }


    .person {

        gap: 8px;

    }


    .person-name {

        width: 135px;

        height: 115px;

        padding: 20px 16px 16px 20px;

        font-size: 15px;

    }


    .back {

        width: 70px;

        height: 70px;

    }

}


@media (max-width: 700px) {

    .top-bar {

        height: 75px;

    }

}


/* =========================================================
ÉCRANS ÉTROITS
========================================================= */

@media (max-width: 1500px) {

    .contacts {

        gap: 30px;

        padding:
            10px 20px;

    }


    .phone {

        width: 400px;

        height: 662px;

    }

}


/* =========================================================
MOBILE
========================================================= */

@media (max-width: 800px) {

    html,
    body {

        overflow-y: auto;

    }


    .top-bar {

        height: 75px;

    }


    .top-bar h1 {

        font-size: 34px;

    }


    .back {

        left: 20px;

        width: 80px;

        height: 80px;

    }


    .contacts {

        height: auto;

        min-height:
            calc(100vh - 75px);

        flex-direction: column;

        align-items: center;

        justify-content: center;

        gap: 40px;

        padding:
            40px 20px;

    }


    .phone-stack {

        flex-direction: column;

        width: 100%;

        align-items: center;

    }


    .contacts.has-selection .phone-stack {

        transform: none;

    }


    .person.active {

        transform: scale(1);

    }


    .contacts.has-selection .person:not(.active) {

        opacity: 0;

        transform: translateY(20px) scale(0.8);

    }


    .phone {

        width: 333px;

        height: 551px;

    }


    .info-panel {

        position: relative;

        top: auto;

        right: auto;

        width: min(90vw, 360px);

        height: 480px;

        transform: translateY(20px);

    }


    .info-panel.is-active {

        transform: translateY(0);

    }


    .person-name {

        width: 145px;

        height: 123px;

        padding: 22px 18px 18px 22px;

        font-size: 16px;

    }

}
