/* =========================================================
   N19 Core — effets
   Tous les effets sont neutralisés si prefers-reduced-motion.
   ========================================================= */

/* ---------- Apparition au scroll ---------- */
.n19-reveal {
    opacity: 0;
    transition:
        opacity var(--n19-duration, 0.8s) cubic-bezier(0.22, 1, 0.36, 1) var(--n19-delay, 0s),
        transform var(--n19-duration, 0.8s) cubic-bezier(0.22, 1, 0.36, 1) var(--n19-delay, 0s),
        filter var(--n19-duration, 0.8s) ease var(--n19-delay, 0s);
    will-change: opacity, transform;
}
.n19-reveal--up      { transform: translateY(40px); }
.n19-reveal--down    { transform: translateY(-40px); }
.n19-reveal--left    { transform: translateX(60px); }
.n19-reveal--right   { transform: translateX(-60px); }
.n19-reveal--zoom    { transform: scale(0.9); }
.n19-reveal--blur    { filter: blur(12px); }
.n19-reveal.n19-in {
    opacity: 1;
    transform: none;
    filter: none;
}

/* ---------- Texte découpé ---------- */
.n19-split .n19-frag,
.n19-split--words .n19-frag {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.6em);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--n19-frag-delay, 0s);
    will-change: opacity, transform;
}
.n19-split.n19-in .n19-frag,
.n19-split--words.n19-in .n19-frag {
    opacity: 1;
    transform: none;
}

/* ---------- Marquee ---------- */
.n19-marquee {
    overflow: hidden;
    white-space: nowrap;
}
.n19-marquee .n19-marquee-track {
    display: inline-flex;
    align-items: center;
    animation: n19-marquee var(--n19-marquee-time, 20s) linear infinite;
}
.n19-marquee[data-n19-reverse] .n19-marquee-track {
    animation-direction: reverse;
}
.n19-marquee:hover .n19-marquee-track {
    animation-play-state: paused;
}
@keyframes n19-marquee {
    to { transform: translateX(-50%); }
}

/* ---------- Magnétique / tilt ---------- */
.n19-magnetic {
    display: inline-block;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}
.n19-tilt {
    transform-style: preserve-3d;
    transition: transform 0.2s ease-out;
    will-change: transform;
}

/* ---------- Image reveal ---------- */
.n19-img-reveal img,
.n19-img-reveal video {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1s cubic-bezier(0.65, 0, 0.35, 1) var(--n19-delay, 0s);
    will-change: clip-path;
}
.n19-img-reveal.n19-in img,
.n19-img-reveal.n19-in video {
    clip-path: inset(0 0 0 0);
}

/* ---------- Soulignement animé ---------- */
.n19-underline,
.n19-underline a {
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1.5px;
    background-repeat: no-repeat;
    background-position: left calc(100% - 0.05em);
    transition: background-size 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    text-decoration: none;
}
.n19-underline:hover,
.n19-underline a:hover {
    background-size: 100% 1.5px;
}

/* ---------- Barre de progression ---------- */
.n19-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--brand-primary, currentColor);
    z-index: 9999;
    pointer-events: none;
}

/* ---------- Curseur personnalisé ---------- */
.n19-cursor-dot,
.n19-cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
}
.n19-cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--brand-primary, #000);
}
.n19-cursor-ring {
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--brand-primary, #000);
    opacity: 0.6;
    transition: width 0.25s ease, height 0.25s ease, opacity 0.25s ease;
}
body.n19-cursor-active .n19-cursor-ring.n19-cursor-hover {
    width: 64px;
    height: 64px;
    opacity: 0.9;
}
@media (hover: none), (pointer: coarse) {
    .n19-cursor-dot,
    .n19-cursor-ring { display: none; }
}

/* ---------- Écran de chargement ---------- */
.n19-loader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-light, #deccb5);
    opacity: 1;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.n19-loader-logo {
    max-width: min(40vw, 320px);
    height: auto;
    opacity: 0;
    transform: scale(0.92);
    animation: n19-loader-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}
@keyframes n19-loader-in {
    to { opacity: 1; transform: scale(1); }
}
body.n19-loaded .n19-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ---------- Accessibilité : mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
    .n19-reveal,
    .n19-img-reveal,
    .n19-img-reveal img,
    .n19-img-reveal video,
    .n19-split .n19-frag,
    .n19-split--words .n19-frag {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        clip-path: none !important;
        transition: none !important;
    }
    .n19-marquee .n19-marquee-track {
        animation: none !important;
    }
    .n19-magnetic,
    .n19-tilt {
        transform: none !important;
    }
    .n19-cursor-dot,
    .n19-cursor-ring {
        display: none !important;
    }
}

/* ---------- Header / footer N19 ---------- */
.n19-header {
    position: relative;
    z-index: 8888;
}
.n19-header--fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
}
.n19-footer {
    position: relative;
    z-index: 1;
}

/* ---------- Portfolio N19 ---------- */
.n19-portfolio-wrap {
    width: 100%;
}
.n19-portfolio-tools {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 22px;
}
.n19-portfolio-tools button.n19-cols-btn {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0;
}
.n19-cols-btn {
    display: inline-flex;
    gap: 2px;
    padding: 5px;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.25s ease;
}
.n19-cols-btn svg {
    width: 15px;
    height: 19px;
    fill: var(--brand-primary, #5A2234);
    display: block;
}
.n19-cols-btn:hover,
.n19-cols-btn.est-actif {
    opacity: 1;
}
.n19-portfolio {
    display: grid;
    grid-template-columns: repeat(var(--n19-cols, 4), 1fr);
    gap: 34px 22px;
    transition: gap 0.3s ease;
}
.n19-portfolio-item {
    display: block;
    position: relative;
    color: var(--brand-primary, #5A2234);
    text-decoration: none;
    transition: opacity 0.35s ease;
}
.n19-portfolio:hover .n19-portfolio-item:not(:hover) {
    opacity: 0.25;
}
.n19-portfolio-img {
    margin: 0 0 10px;
    overflow: hidden;
    border-radius: 10px;
}
.n19-portfolio-img img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.n19-portfolio-item:hover .n19-portfolio-img img {
    transform: scale(1.04);
}
.n19-portfolio-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
}
.n19-portfolio-meta h3 {
    font-family: var(--font-body, sans-serif);
    font-size: 15px;
    font-weight: 500;
    margin: 0;
}
.n19-portfolio-tags {
    font-size: 11px;
    opacity: 0.75;
    text-align: right;
    white-space: nowrap;
}
.n19-portfolio-year {
    display: block;
    font-size: 11px;
    opacity: 0.55;
    margin-top: 2px;
}
@media (max-width: 1024px) {
    .n19-portfolio { grid-template-columns: repeat(2, 1fr); }
    .n19-portfolio-tools { display: none; }
}
@media (max-width: 620px) {
    .n19-portfolio { grid-template-columns: 1fr; }
}

/* ---------- Fiche projet ---------- */
.n19-projet-single {
    padding: 120px 40px 70px;
}
.n19-projet-entete {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    margin-bottom: 26px;
}
.n19-projet-texte {
    width: 40%;
    padding-top: 50px;
}
.n19-projet-eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--brand-primary, #5A2234);
    margin-bottom: 18px;
}
.n19-projet-single h1 {
    color: var(--brand-primary, #5A2234);
    text-transform: uppercase;
    font-size: clamp(2.8rem, 5.5vw, 5.2rem);
    line-height: 1.02;
    margin: 0 0 34px;
}
.n19-projet-prestations p {
    color: var(--brand-primary, #5A2234);
    font-size: 15px;
    line-height: 1.75;
    max-width: 430px;
    margin: 0 0 10px;
}
.n19-projet-visuel {
    width: 60%;
}
.n19-projet-visuel img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}
/* Galerie collage : grille 12 pistes en flux dense — les largeurs sont
   des multiples de 3, chaque trou peut donc être rebouché et l'ensemble
   forme un bloc compact aux bords alignés. */
.n19-projet-galerie {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(105px, auto);
    grid-auto-flow: dense;
    gap: 22px;
    margin-top: 22px;
}
.n19-projet-galerie figure {
    position: relative;
    margin: 0;
    grid-column: span 4;
    grid-row: span 2;
}
.n19-projet-galerie img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}
/* Motif cyclique de tailles */
.n19-projet-galerie figure:nth-child(6n+1) { grid-column: span 6; grid-row: span 3; }
.n19-projet-galerie figure:nth-child(6n+2) { grid-column: span 3; grid-row: span 2; }
.n19-projet-galerie figure:nth-child(6n+3) { grid-column: span 3; grid-row: span 3; }
.n19-projet-galerie figure:nth-child(6n+4) { grid-column: span 6; grid-row: span 2; }
.n19-projet-galerie figure:nth-child(6n+5) { grid-column: span 3; grid-row: span 3; }
.n19-projet-galerie figure:nth-child(6n+6) { grid-column: span 3; grid-row: span 2; }
@media (max-width: 1024px) {
    .n19-projet-galerie figure,
    .n19-projet-galerie figure:nth-child(n) { grid-column: span 6; grid-row: span 2; }
}
@media (max-width: 620px) {
    .n19-projet-galerie figure,
    .n19-projet-galerie figure:nth-child(n) { grid-column: span 12; grid-row: span 2; }
}

.n19-projet-suite {
    margin-top: 90px;
}
.n19-projet-suite h2 {
    color: var(--brand-primary, #5A2234);
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    margin: 0 0 36px;
}
@media (max-width: 1024px) {
    .n19-projet-entete { flex-direction: column-reverse; gap: 30px; }
    .n19-projet-texte, .n19-projet-visuel { width: 100%; }
    .n19-projet-texte { padding-top: 0; }
    .n19-projet-galerie { }
}
@media (max-width: 620px) {
    .n19-projet-single { padding: 100px 20px 50px; }
    .n19-projet-galerie { }
}
