/* Grégory Cochelin — feuille de style unique, sans framework. */

@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fira Code"; src: url("../fonts/fira-code.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
    --bg: #0b0d12;
    --bg-2: #12151d;
    --surface: #181c26;
    --line: rgb(255 255 255 / .09);
    --ink: #f2f0ea;
    --ink-2: #a3a7b3;
    --yellow: #fed136;
    --yellow-2: #ffb800;
    --violet: #7c5cff;
    --radius: 18px;
    --wrap: 1180px;
    --display: "Bricolage", "Inter", system-ui, sans-serif;
    --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "Fira Code", ui-monospace, monospace;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.65 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
strong { color: var(--ink); font-weight: 600; }
::selection { background: var(--yellow); color: var(--bg); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.visually-hidden, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--yellow); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .9em 1.5em; border-radius: 999px; border: 0; background: var(--yellow); color: #14120a; font: 600 1rem/1 var(--body); text-decoration: none; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgb(254 209 54 / .55); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost:hover { background: rgb(255 255 255 / .06); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .25); }
.btn--small { padding: .65em 1.15em; font-size: .9375rem; }

/* Navigation */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, backdrop-filter .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgb(11 13 18 / .75); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__logo img { width: 190px; }
.nav__menu { display: flex; align-items: center; gap: 2rem; }
.nav__menu a:not(.btn) { text-decoration: none; color: var(--ink-2); font-weight: 500; transition: color .2s; }
.nav__menu a:not(.btn):hover { color: var(--ink); }
.nav__toggle { display: none; }

@media (max-width: 820px) {
    .nav__logo img { width: 160px; }
    .nav__toggle { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgb(255 255 255 / .06); cursor: pointer; }
    .nav__toggle > span:first-child, .nav__toggle > span:first-child::before, .nav__toggle > span:first-child::after { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, background .25s; }
    .nav__toggle > span:first-child { position: relative; }
    .nav__toggle > span:first-child::before, .nav__toggle > span:first-child::after { content: ""; position: absolute; left: 0; }
    .nav__toggle > span:first-child::before { top: -6px; }
    .nav__toggle > span:first-child::after { top: 6px; }
    .nav__toggle[aria-expanded="true"] > span:first-child { background: transparent; }
    .nav__toggle[aria-expanded="true"] > span:first-child::before { transform: translateY(6px) rotate(45deg); }
    .nav__toggle[aria-expanded="true"] > span:first-child::after { transform: translateY(-6px) rotate(-45deg); }
    .nav__menu { position: absolute; top: 72px; left: 16px; right: 16px; flex-direction: column; align-items: stretch; gap: 0; padding: 8px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 60px -20px #000; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s; }
    .nav.is-open .nav__menu { opacity: 1; visibility: visible; transform: none; }
    .nav.is-open { background: rgb(11 13 18 / .92); }
    .nav__menu a:not(.btn) { padding: 14px 16px; border-radius: 12px; }
    .nav__menu a:not(.btn):hover { background: rgb(255 255 255 / .05); }
    .nav__menu .btn { margin: 8px; justify-content: center; }
}

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 120px 0 0; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%); opacity: .55; }
.hero__glow { position: absolute; z-index: -1; width: 70vmax; height: 70vmax; right: -25vmax; top: -30vmax; background: radial-gradient(circle at 35% 35%, rgb(254 209 54 / .55), transparent 55%), radial-gradient(circle at 70% 65%, rgb(124 92 255 / .45), transparent 55%); filter: blur(60px); animation: glow 18s ease-in-out infinite alternate; }
@keyframes glow { to { transform: translate(-12vmax, 14vmax) rotate(40deg) scale(1.1); } }
.hero__inner { padding-bottom: 72px; }
.hero__tag { display: inline-flex; align-items: center; gap: .6em; margin: 0 0 28px; padding: .45em 1em; border-radius: 999px; background: rgb(255 255 255 / .05); border: 1px solid var(--line); font: 500 .875rem/1.4 var(--mono); color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgb(61 220 132 / .6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgb(61 220 132 / 0); } 100% { box-shadow: 0 0 0 0 rgb(61 220 132 / 0); } }
.hero__title { margin: 0; font: 800 clamp(2.9rem, 9vw, 7.5rem)/.95 var(--display); letter-spacing: -.035em; }
.hero__rotate { display: inline-block; background: linear-gradient(100deg, var(--yellow) 10%, var(--yellow-2) 45%, #ff7a59 75%, var(--violet)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; padding-bottom: .08em; }
.hero__rotate.is-out { animation: shine 6s linear infinite, out .35s forwards; }
.hero__rotate.is-in { animation: shine 6s linear infinite, in .45s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes shine { to { background-position: 200% 0; } }
@keyframes out { to { opacity: 0; transform: translateY(-.25em); filter: blur(6px); } }
@keyframes in { from { opacity: 0; transform: translateY(.3em); filter: blur(6px); } }
.hero__lead { max-width: 36rem; margin: 32px 0 36px; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--ink-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

.marquee { border-block: 1px solid var(--line); background: rgb(11 13 18 / .6); overflow: hidden; padding: 18px 0; }
.marquee__track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee span { padding: 0 1.75rem; font: 600 1.125rem/1 var(--display); color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 1.75rem; }
.marquee span::after { content: "✦"; color: var(--yellow); font-size: .8em; margin-left: 1.75rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Sections */
.section { padding: clamp(80px, 12vw, 150px) 0; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section--page { padding-top: 140px; }
.kicker { margin: 0 0 14px; font: 500 .875rem/1 var(--mono); color: var(--yellow); letter-spacing: .02em; }
.section__title { margin: 0 0 clamp(36px, 5vw, 60px); max-width: 18ch; font: 700 clamp(2.1rem, 5vw, 3.75rem)/1.02 var(--display); letter-spacing: -.03em; }

/* Prestations */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card { position: relative; padding: 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .3s, border-color .3s; }
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgb(254 209 54 / .14), transparent 45%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.card:hover { transform: translateY(-4px); border-color: rgb(254 209 54 / .35); }
.card:hover::before { opacity: 1; }
.card__icon { width: 52px; height: 52px; padding: 12px; border-radius: 14px; background: var(--yellow); fill: none; stroke: #14120a; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 28px; }
.card h3 { margin: 0 0 10px; font: 700 1.5rem/1.2 var(--display); letter-spacing: -.01em; }
.card p { margin: 0; color: var(--ink-2); }

/* Réalisations */
.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.work { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; text-decoration: none; transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .3s, box-shadow .35s; }
.work:hover { transform: translateY(-6px) rotate(-.4deg); border-color: rgb(254 209 54 / .4); box-shadow: 0 30px 60px -30px rgb(254 209 54 / .35); }
.work__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #000; }
.work__img img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s cubic-bezier(.2, .8, .2, 1), filter .4s; filter: saturate(.85); }
.work:hover .work__img img { transform: scale(1.06); filter: none; }
.work__body { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px 24px; }
.work__type { font: 500 .75rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--yellow); }
.work__name { font: 700 1.25rem/1.25 var(--display); }
.work__name span { display: inline-block; color: var(--yellow); transition: transform .3s; }
.work:hover .work__name span { transform: translate(3px, -3px); }
.work__text { color: var(--ink-2); font-size: .9375rem; line-height: 1.55; }

/* À propos */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: end; }
.about p { color: var(--ink-2); max-width: 60ch; }
.points { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; color: var(--ink-2); }
.points li { position: relative; padding-left: 30px; }
.points li::before { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 9px; border-left: 2.5px solid var(--yellow); border-bottom: 2.5px solid var(--yellow); transform: rotate(-45deg); }
.skills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.skills li { padding: .55em 1em; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 500 .9375rem/1.2 var(--mono); transition: background .2s, color .2s, transform .2s; }
.skills li:hover { background: var(--yellow); color: #14120a; transform: rotate(-2deg) scale(1.04); }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

/* Contact */
.section--contact { position: relative; overflow: hidden; isolation: isolate; }
.section--contact::before { content: ""; position: absolute; z-index: -1; width: 60vmax; height: 60vmax; left: -30vmax; bottom: -35vmax; background: radial-gradient(circle, rgb(254 209 54 / .22), transparent 60%); filter: blur(40px); }
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact__phone { margin: 0 0 24px; font: 700 clamp(1.75rem, 4vw, 2.5rem)/1 var(--display); }
.contact__phone a { text-decoration: none; background: linear-gradient(var(--yellow), var(--yellow)) 0 100% / 0 3px no-repeat; transition: background-size .3s; }
.contact__phone a:hover { background-size: 100% 3px; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }

.form { display: grid; gap: 16px; padding: clamp(24px, 4vw, 40px); border-radius: calc(var(--radius) + 6px); background: rgb(24 28 38 / .8); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
.form label { display: grid; gap: 8px; font-size: .9375rem; font-weight: 500; }
.form input, .form textarea { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-weight: 400; transition: border-color .2s, box-shadow .2s; }
.form textarea { resize: vertical; min-height: 140px; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 4px rgb(254 209 54 / .15); }
.form .btn { justify-self: start; }
.form p { margin: 0; }
.form__notice { padding: 14px 16px; border-radius: 12px; font-weight: 500; }
.form__notice--succes { background: rgb(61 220 132 / .12); color: #8ef0b8; border: 1px solid rgb(61 220 132 / .3); }
.form__notice--erreur { background: rgb(255 107 107 / .12); color: #ffb0b0; border: 1px solid rgb(255 107 107 / .3); }

/* Page de texte */
.prose { max-width: 760px; }
.prose h2 { margin: 2.2em 0 .5em; font: 700 1.375rem/1.3 var(--display); }
.prose p { color: var(--ink-2); }
.prose a:not(.btn) { color: var(--yellow); }
.prose .btn { margin-top: 2em; }

/* Pied de page */
.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: .9375rem; color: var(--ink-2); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer p { margin: 0; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--yellow); }

/* Apparition au défilement (activée par le script ; sans script, tout reste visible) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--delay, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; }
}
