/* ===== STYLE DU PORTFOLIO : couleurs et réglages en haut, faciles à changer ===== */
:root {
    --navy: #0b0b4f;
    --ink: #07072e;
    --red: #e0173f;
    --pink: #ff6b86;
    --cream: #fff4dc;
    --amber: #ffc94a;
    --r: 28px;
    --k: clamp(62px, 19vw, 86px)
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px
}

body {
    font: 400 17px/1.65 Raleway, system-ui, sans-serif;
    background: var(--cream);
    color: var(--navy);
    overflow-x: hidden
}

img {
    max-width: 100%;
    display: block
}

a {
    color: inherit
}

h1,
h2,
h3 {
    font-family: 'League Spartan', sans-serif;
    line-height: 1.05;
    font-weight: 800
}

.wrap {
    width: min(1180px, 92vw);
    margin: 0 auto
}

section {
    padding: 90px 0
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font: 700 15px 'League Spartan', sans-serif;
    text-decoration: none;
    border: 2px solid var(--red);
    transition: .2s;
    cursor: pointer
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(224, 23, 63, .35)
}

.btn.o {
    background: transparent;
    color: inherit;
    border-color: currentColor
}

.dark {
    background: var(--navy);
    color: var(--cream)
}

.dark.ink {
    background: var(--ink)
}

em {
    font-style: normal;
    color: var(--red)
}

.dark em {
    color: var(--pink)
}

/* menu */
header {
    position: fixed;
    top: 12px;
    left: 0;
    right: 0;
    z-index: 50
}

nav {
    position: relative;
    width: min(1180px, 94vw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(7, 7, 46, .74);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: 999px;
    padding: 8px 12px 8px 18px;
    color: #fff
}

nav img {
    height: 38px;
    width: auto
}

nav ul {
    display: flex;
    gap: 6px;
    list-style: none
}

nav ul a {
    display: block;
    padding: 9px 16px;
    border-radius: 999px;
    text-decoration: none;
    font: 600 15px 'League Spartan', sans-serif
}

nav ul a:hover,
nav ul a.on {
    background: var(--red)
}

.bg {
    display: none;
    background: 0;
    border: 0;
    color: #fff;
    font-size: 26px;
    padding: 4px 10px;
    cursor: pointer
}

@media(max-width:820px) {
    .bg {
        display: block
    }

    nav ul {
        display: none;
        position: absolute;
        top: 62px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--ink);
        border-radius: 26px;
        padding: 12px
    }

    nav ul.open {
        display: flex
    }
}

/* accueil : la vidéo reste visible, le texte est dans une carte */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    padding: 120px 0 80px;
    color: #fff;
    background: var(--ink) url(../images/video1-1000x563.png) center/cover;
    overflow: hidden
}

.hero iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100%, 177.78vh);
    height: max(100%, 56.25vw);
    transform: translate(-50%, -50%);
    border: 0;
    pointer-events: none
}

.hc {
    position: relative;
    max-width: 560px;
    background: rgba(11, 11, 79, .66);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 244, 220, .3);
    border-radius: 34px;
    padding: 34px 36px;
    box-shadow: 0 12px 44px rgba(0, 0, 0, .35)
}

.hc h1 {
    font-size: clamp(2.8rem, 7vw, 4.8rem);
    margin: 12px 0 8px
}

.hc .bt {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px
}

.av {
    display: inline-block;
    background: var(--amber);
    color: var(--ink);
    font: 700 13px 'League Spartan', sans-serif;
    padding: 6px 14px;
    border-radius: 999px
}

/* bandeau défilant */
.mq {
    background: var(--red);
    color: var(--cream);
    overflow: hidden;
    padding: 16px 0;
    transform: rotate(-1.2deg);
    margin: -26px -10px;
    position: relative;
    z-index: 2
}

.mq div {
    display: flex;
    width: max-content;
    animation: mq 26s linear infinite;
    font: 800 clamp(22px, 4vw, 38px) 'League Spartan', sans-serif;
    white-space: nowrap
}

.mq span {
    padding: 0 22px
}

@keyframes mq {
    to {
        transform: translateX(-50%)
    }
}

/* titres de section */
.hd {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 38px
}

.hd h1,
.hd h2 {
    font-size: clamp(2.2rem, 5vw, 3.6rem)
}

.hd p {
    max-width: 460px;
    opacity: .8
}

.rv {
    opacity: 0;
    transform: translateY(26px);
    transition: .7s
}

.rv.in {
    opacity: 1;
    transform: none
}

/* filtres + cartes de réalisations */
.fl {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px
}

.fl button {
    font: 700 15px 'League Spartan', sans-serif;
    padding: 10px 22px;
    border-radius: 999px;
    border: 2px solid var(--navy);
    background: transparent;
    color: var(--navy);
    cursor: pointer
}

.fl button.on,
.fl button:hover {
    background: var(--navy);
    color: var(--cream)
}

.gr {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 26px
}

.cd {
    display: block;
    position: relative;
    aspect-ratio: 4/5;
    border-radius: var(--r);
    overflow: hidden;
    background: var(--navy);
    cursor: pointer;
    border: 0;
    padding: 0;
    text-align: left;
    color: #fff;
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform .25s, box-shadow .25s;
    box-shadow: 0 8px 24px rgba(11, 11, 79, .18);
    animation: up .6s both
}

.cd[hidden] {
    display: none
}

.cd:hover {
    box-shadow: 0 20px 44px rgba(224, 23, 63, .28)
}

@keyframes up {
    from {
        opacity: 0;
        translate: 0 24px
    }
}

.cd img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s
}

.cd:hover img {
    transform: scale(1.07)
}

.cd:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(7, 7, 46, .92), rgba(7, 7, 46, 0) 55%)
}

.cd .no,
.cd .ct {
    position: absolute;
    top: 14px;
    z-index: 2;
    font: 700 12px 'League Spartan', sans-serif;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--cream);
    color: var(--navy)
}

.cd .no {
    left: 14px
}

.cd .ct {
    right: 14px;
    background: var(--red);
    color: #fff
}

.cd .tx {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    z-index: 2
}

.cd h3 {
    font-size: 1.5rem
}

.cd p {
    font-size: 14px;
    opacity: .85;
    margin-top: 4px;
    line-height: 1.4
}

.cd .ph {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font: 800 90px 'League Spartan';
    color: rgba(255, 244, 220, .25);
    background: linear-gradient(135deg, var(--navy), var(--red))
}

.cd .pl {
    position: absolute;
    z-index: 2;
    inset: 0;
    margin: auto;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--red);
    display: grid;
    place-items: center;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 0 0 8px rgba(224, 23, 63, .25)
}

/* fenêtre d'un projet */
dialog {
    border: 0;
    border-radius: var(--r);
    padding: 0;
    width: min(900px, 94vw);
    max-height: 92vh;
    background: var(--cream);
    color: var(--navy);
    overflow: auto;
    margin: auto
}

dialog::backdrop {
    background: rgba(7, 7, 46, .82)
}

.mx {
    position: sticky;
    top: 12px;
    float: right;
    margin: 12px;
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: var(--red);
    color: #fff;
    font-size: 24px;
    cursor: pointer
}

.mb {
    padding: 0 30px 34px
}

.mb h3 {
    font-size: 2.2rem;
    margin: 20px 0 6px
}

.mb img,
.mb iframe {
    width: 100%;
    border-radius: 18px;
    margin-top: 14px
}

.mb iframe {
    aspect-ratio: 16/9;
    border: 0
}

.mb .btn {
    margin-top: 18px
}

.tg {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 14px 0
}

.tg span {
    background: var(--navy);
    color: var(--cream);
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600
}

/* show reel */
.sr {
    position: relative;
    display: block;
    width: min(960px, 100%);
    margin: 0 auto;
    aspect-ratio: 16/9;
    border: 0;
    border-radius: var(--r);
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: #000
}

.sr img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .4s
}

.sr:hover img {
    transform: scale(1.04);
    opacity: .8
}

.sr iframe {
    width: 100%;
    height: 100%;
    border: 0
}

.sr b {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 34px;
    box-shadow: 0 0 0 12px rgba(224, 23, 63, .3)
}

/* à propos + contact */
.pl3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 22px;
    margin: 34px 0
}

.pl3 div {
    background: var(--navy);
    color: var(--cream);
    border-radius: var(--r);
    padding: 28px
}

.pl3 h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--amber)
}

.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.chips span {
    border: 2px solid var(--navy);
    border-radius: 999px;
    padding: 5px 15px;
    font-weight: 600;
    font-size: 14px
}

.ct2 {
    text-align: center
}

.ct2 h2 {
    font-size: clamp(2.4rem, 6vw, 4.4rem)
}

.ct2 p {
    margin: 14px 0 26px;
    opacity: .85
}

.ct2 .btn {
    margin: 6px
}

footer {
    text-align: center;
    padding: 26px;
    background: var(--ink);
    color: var(--cream);
    font-size: 14px
}

.top {
    padding: 150px 0 40px
}

/* jeu : le bloc est centré, les touches mobiles sont grandes */
.game-wrap {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--navy);
    color: var(--cream);
    border-radius: 34px;
    padding: 28px 16px 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    font-family: 'Press Start 2P', monospace
}

.game-wrap h2 {
    font-size: clamp(14px, 3.4vw, 22px);
    line-height: 1.5;
    color: var(--cream)
}

.game-wrap h2 span {
    color: #ff6b86
}

.hint {
    font-size: clamp(9px, 2.2vw, 12px);
    line-height: 1.9;
    max-width: 640px;
    opacity: .92
}

.hint-m {
    display: none
}

#bar {
    display: flex;
    justify-content: center;
    gap: 14px;
    width: 100%
}

#bar button {
    flex: 1 1 0;
    max-width: 210px;
    min-height: 56px;
    font: inherit;
    font-size: clamp(11px, 2.6vw, 14px);
    background: var(--red);
    color: var(--cream);
    border: 3px solid var(--cream);
    border-radius: 999px;
    padding: 14px 18px;
    cursor: pointer
}

#c {
    display: block;
    margin: 0 auto;
    image-rendering: pixelated;
    border-radius: 18px;
    box-shadow: 0 0 0 4px var(--red), 0 0 0 8px var(--cream);
    background: #000;
    outline: none;
    cursor: pointer
}

#ctl {
    display: none;
    width: min(94vw, 480px);
    justify-content: space-between;
    align-items: center;
    padding: 6px 4px
}

#ctl .dp {
    display: grid;
    grid-template-columns: repeat(3, var(--k));
    grid-template-rows: repeat(2, var(--k));
    gap: 8px
}

#ctl button {
    border-radius: 50%;
    border: 4px solid var(--red);
    background: var(--cream);
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 5px 0 #8f0f2c, 0 8px 14px rgba(0, 0, 0, .4)
}

#ctl .dp button {
    width: var(--k);
    height: var(--k)
}

#ctl button svg {
    width: 52%;
    height: 52%;
    fill: currentColor;
    pointer-events: none
}

#ctl [data-k=arrowleft] svg {
    transform: rotate(-90deg)
}

#ctl [data-k=arrowdown] svg {
    transform: rotate(180deg)
}

#ctl [data-k=arrowright] svg {
    transform: rotate(90deg)
}

#ctl button:active {
    background: var(--red);
    color: var(--cream);
    transform: translateY(4px);
    box-shadow: 0 1px 0 #8f0f2c
}

#ctl .a {
    width: calc(var(--k)*1.45);
    height: calc(var(--k)*1.45);
    background: var(--red);
    color: var(--cream);
    border-color: var(--cream);
    flex-direction: column;
    gap: 4px;
    font: inherit
}

#ctl .a b {
    font-size: calc(var(--k)*.42);
    line-height: 1
}

#ctl .a small {
    font-size: 9px
}

@media (pointer:coarse) {
    #ctl {
        display: flex
    }

    .hint-pc {
        display: none
    }

    .hint-m {
        display: block
    }
}

@media (pointer:fine) and (max-width:700px) {
    #ctl {
        display: flex
    }
}

#card {
    position: fixed;
    inset: 0;
    background: rgba(11, 11, 79, .86);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px
}

#card[hidden] {
    display: none
}

#card .in {
    background: var(--cream);
    color: var(--navy);
    border-radius: 26px;
    border: 5px solid var(--red);
    padding: 24px;
    max-width: 420px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center
}

#card h2 {
    font-size: 15px;
    color: var(--red)
}

#card p {
    font: 15px/1.5 system-ui, sans-serif
}

#card button,
#card a {
    font: inherit;
    font-size: 11px;
    background: var(--red);
    color: var(--cream);
    border: 0;
    border-radius: 20px;
    padding: 13px 16px;
    cursor: pointer;
    text-decoration: none
}

@media(prefers-reduced-motion:reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important
    }

    .rv {
        opacity: 1;
        transform: none
    }
}

#card[hidden] {
    display: none !important;
}
.hc h1 .h1k {
    display: block;
    font-size: .38em;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 10px;
    letter-spacing: 0
}
