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

:root {
    --bg: #0b0b0d;
    --text: #efefef;
    --muted: rgba(255, 255, 255, 0.3);
}

html, body {
    height: 100%;
}

body {
    font-family: 'DM Mono', monospace;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    transition: background-color 0.8s ease;
}

body::after {
    content: '';
    position: fixed;
    inset: -200px;
    width: calc(100% + 400px);
    height: calc(100% + 400px);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.045;
    pointer-events: none;
    z-index: 9998;
    animation: grain 0.4s steps(1) infinite;
}

@keyframes grain {
    0%   { transform: translate(0, 0); }
    20%  { transform: translate(-3%, 4%); }
    40%  { transform: translate(4%, -2%); }
    60%  { transform: translate(-2%, -4%); }
    80%  { transform: translate(3%, 2%); }
    100% { transform: translate(1%, -3%); }
}

header {
    text-align: center;
    padding: 52px 24px 24px;
    animation: fadeUp 0.9s ease both;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 9.5px;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

.eyebrow::before,
.eyebrow::after {
    content: '';
    display: block;
    width: 24px;
    height: 1px;
    background: var(--muted);
}

h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(64px, 11vw, 130px);
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 0.88;
    color: var(--text);
}

h1 .outline {
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.25);
    color: transparent;
}

.hint {
    font-size: 9.5px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
    animation: fadeUp 0.9s ease 0.1s both;
}

.hint span {
    color: rgba(255, 255, 255, 0.15);
    margin: 0 6px;
}

button {
    font-family: 'DM Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: var(--text);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 14px 38px;
    cursor: pointer;
    border-radius: 100px;
    position: relative;
    overflow: hidden;
    transition: color 0.35s ease, border-color 0.35s ease, transform 0.15s ease;
    width: auto;
    height: auto;
    font-style: normal;
    font-weight: 400;
    animation: fadeUp 0.9s ease 0.15s both;
}

button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #ffffff;
    border-radius: 100px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: -1;
}

button:hover {
    color: #0b0b0d;
    border-color: white;
    scale: 1;
}

button:hover::before {
    transform: scaleX(1);
}

button:active {
    transform: scale(0.95);
}

#palette {
    display: flex;
    width: 100%;
    max-width: 1360px;
    height: clamp(320px, 52vh, 680px);
    padding: 0 40px;
    gap: 7px;
    margin-top: 28px;
    animation: fadeUp 0.9s ease 0.2s both;
}

.couleur {
    flex: 1;
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    font-weight: 400;
    transition:
        flex 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
        filter 0.35s ease,
        transform 0.2s ease,
        border-radius 0.3s ease;
    filter: brightness(0.72) saturate(0.75);
    animation: stripIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.couleur:nth-child(1) { animation-delay: 0.08s; }
.couleur:nth-child(2) { animation-delay: 0.15s; }
.couleur:nth-child(3) { animation-delay: 0.22s; }
.couleur:nth-child(4) { animation-delay: 0.29s; }
.couleur:nth-child(5) { animation-delay: 0.36s; }

@keyframes stripIn {
    from { opacity: 0; transform: scaleY(0.5) translateY(50px); }
    to   { opacity: 1; transform: scaleY(1)   translateY(0); }
}

.couleur::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.65) 0%,
        rgba(0, 0, 0, 0.05) 35%,
        transparent 55%,
        rgba(255, 255, 255, 0.07) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.couleur::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 55%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-15deg);
    transition: left 0.6s ease;
    z-index: 2;
    pointer-events: none;
}

.couleur:hover {
    flex: 2.4;
    filter: brightness(1.08) saturate(1.2);
    border-radius: 18px;
}

.couleur:hover::after {
    left: 160%;
}

.couleur:active {
    transform: scale(0.97);
    filter: brightness(1.3);
}

.couleur span {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 8px 16px;
    border-radius: 8px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.13);
    margin: 0;
    transition:
        bottom 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.3s ease;
    opacity: 0;
    z-index: 3;
    pointer-events: none;
}

.couleur:hover span {
    bottom: 22px;
    opacity: 1;
}

#palette + * {
    margin-bottom: 52px;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}