/* NeoBrutalism Portfolio - Custom Styles */

:root {
    --primary-black: #111111;
    --primary-white: #ffffff;
    --paper: #fff8ec;
    --accent-orange: #ff5e5b;
    --accent-blue: #2ec4b6;
    --accent-green: #3ecf6e;
    --accent-yellow: #ffde59;
    --accent-purple: #8e7de3;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-brutal: 4px 4px 0px var(--primary-black);
    --shadow-brutal-lg: 8px 8px 0px var(--primary-black);
}

html {
    scroll-behavior: smooth;
}

section[id], header[id] {
    scroll-margin-top: 1rem;
}

::selection {
    background: var(--accent-yellow);
    color: var(--primary-black);
}

/* Selective crosshair cursor - background elements only */
html, body {
    cursor: crosshair;
}

a, button, input, select, textarea, label, [role="menuitem"], .nb-button, .side-nav-link, .side-nav-brand, .badge, .nb-card a, .game-card, .project-card a {
    cursor: pointer !important;
}

input[type="text"], input[type="email"], input[type="tel"], textarea {
    cursor: text !important;
}

.surligne-orange {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
    text-decoration-color: #ff4e4e;
    color: inherit;
    font-weight: 600;
}

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

body {
    scroll-behavior: smooth;
    font-family: 'Public Sans', sans-serif;
    line-height: 1.6;
    color: var(--primary-black);
    background-color: var(--paper);
    overflow-x: hidden;
    padding-left: 80px;
}

/* Full width layout */
.section-container {
    width: 100%;
    max-width: none;
    padding: 2rem;
}

/* Side Navigation */
.side-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 80px;
    height: 100vh;
    background-color: var(--paper);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    z-index: 1000;
    box-shadow: 4px 0 0px var(--accent-orange);
    border-right: 3px solid var(--primary-black);
}

.side-nav-brand {
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-black);
    text-decoration: none;
    background-color: var(--accent-yellow);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--primary-black);
    margin-bottom: 2rem;
    transform: rotate(-5deg);
    transition: transform 0.3s ease;
}

.side-nav-brand:hover {
    transform: rotate(5deg) scale(1.1);
}

.side-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    align-items: center;
}

.side-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    color: var(--primary-black);
    text-decoration: none;
    border: 3px solid transparent;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    position: relative;
}

.side-nav-link i {
    font-size: 1.5rem;
}

.side-nav-link:hover,
.side-nav-link.active {
    background-color: var(--accent-orange);
    border-color: var(--primary-black);
    color: var(--primary-white);
    transform: scale(1.1);
    box-shadow: var(--shadow-brutal);
}

.side-nav-link.active::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid var(--accent-orange);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(2.5rem, 8vw, 6rem);
    margin-bottom: 3rem;
    text-align: center;
    color: var(--primary-black);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%) skewX(-14deg);
    width: 140px;
    height: 10px;
    border-radius: 4px;
    background-color: var(--accent-orange);
    box-shadow: var(--shadow-brutal);
}

/* === Effets au scroll ===
   Animes via les proprietes translate/scale/rotate (separees de transform)
   pour ne pas ecraser les rotations existantes des cartes. Le stagger est
   gere en JS (setTimeout), pas par transition-delay. */
/* Double classe volontaire : specificite superieure aux regles des cartes
   (.skill-card, .game-card...) qui definissent leur propre transition pour
   le hover et ecraseraient celle-ci. */
.reveal.reveal {
    opacity: 0;
    translate: 0 38px;
    transition: opacity 0.7s ease-out, translate 0.7s ease-out,
                scale 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
                rotate 0.7s ease-out,
                transform 0.3s ease, box-shadow 0.3s ease;
}

/* NB : toutes les variantes sont en double classe (.reveal.xxx) pour gagner
   sur la base .reveal.reveal qui definit translate: 0 38px. */

/* Titres et blocs : arrivent depuis l'exterieur de l'ecran, en alternance.
   Le body est en overflow-x hidden, donc pas de barre de defilement. */
.reveal.reveal-hors-gauche,
.reveal.reveal-hors-droite {
    opacity: 1;
    transition: translate 0.85s cubic-bezier(0.22, 1, 0.36, 1),
                rotate 0.85s cubic-bezier(0.22, 1, 0.36, 1),
                scale 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.4s ease-out,
                transform 0.3s ease, box-shadow 0.3s ease;
}

.reveal.reveal-hors-gauche {
    translate: -100vw 0;
    rotate: -2deg;
}

.reveal.reveal-hors-droite {
    translate: 100vw 0;
    rotate: 2deg;
}

/* Pose : echelle + rotation qui se stabilisent (cartes contact) */
.reveal.reveal-scale {
    scale: 0.88;
    rotate: 2.5deg;
}

/* Tampon : l'element s'ecrase sur la page comme une etiquette
   (competences) */
.reveal.reveal-tampon {
    scale: 1.22;
    rotate: -2.5deg;
    translate: 0 0;
}

/* Flip : la carte se retourne en 3D comme une carte a jouer
   (jeux video) — la perspective vient du parent .games-grid */
.games-grid {
    perspective: 1100px;
}

.reveal.reveal-flip {
    rotate: x 55deg;
    translate: 0 34px;
}

/* Distribution : la carte glisse depuis un bord, comme donnee
   (projets web en alternance) */
.reveal.reveal-carte-gauche {
    translate: -80px 26px;
    rotate: -3.5deg;
}

.reveal.reveal-carte-droite {
    translate: 80px 26px;
    rotate: 3.5deg;
}

/* Pop avec rebond (stat vedette, coordonnees de contact) */
.reveal.reveal-pop {
    scale: 0.4;
    rotate: -6deg;
}

.reveal.reveal.visible {
    opacity: 1;
    translate: 0 0;
    scale: none;
    rotate: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        translate: none;
        scale: none;
        rotate: none;
    }
}

/* Selection Box Effect */
.selection-box {
    border: 3px dashed #000;
    position: relative;
    display: inline-block;
    background-color: var(--accent-yellow);
    padding: 0.5rem 1rem;
    box-shadow: var(--shadow-brutal);
    transform: rotate(-1deg);
    animation: selection-highlight 3s ease-in-out infinite;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background-color: var(--paper);
    background-image: radial-gradient(rgba(17, 17, 17, 0.12) 2px, transparent 2.5px);
    background-size: 28px 28px;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-content {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    text-align: center;
}

.hero-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 8rem);
    line-height: 0.9;
    margin-bottom: 1.5rem;
    text-shadow: 4px 4px 0px var(--accent-orange);
    padding: 0.5rem 1.2rem;
    display: inline-block;
    position: relative;
    min-width: 8.4ch;
    min-height: 2.4ch;
    background: var(--accent-yellow);
    border: 4px solid var(--primary-black);
    border-radius: var(--radius);
    box-shadow: var(--shadow-brutal-lg);
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--primary-black);
}

.hero-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem;
    justify-content: center;
}

/* Pastilles du hero : une seule bordure, sticker net (on annule la double
   bordure arrondie de la lib neobrutalismcss) */
.hero-badges .badge {
    padding: 0;
    border: 3px solid var(--primary-black);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-brutal);
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
}

.hero-badges .badge .badge-inner {
    border: none;
    border-radius: 0;
    background: transparent;
}

.hero-badges .badge .badge-inner .badge-text {
    padding: 0.45rem 1.1rem;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
}

.hero-badges .badge.orange { background-color: var(--accent-orange); }
.hero-badges .badge.blue   { background-color: var(--accent-blue); color: var(--primary-white); }
.hero-badges .badge.green  { background-color: var(--accent-green); color: var(--primary-white); }

.hero-badges .badge:nth-child(1) { transform: rotate(-2deg); }
.hero-badges .badge:nth-child(2) { transform: rotate(1.5deg); }
.hero-badges .badge:nth-child(3) { transform: rotate(-1.5deg); }

.badge.orange .badge-text {
    color: var(--primary-white) !important;
}

/* CTA Section */
.cta-section {
    background-color: var(--primary-white);
    border: 4px solid var(--primary-black);
    box-shadow: var(--shadow-brutal-lg);
    padding: 1.5rem 5.3rem;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-black);
}

.cta-text {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: var(--primary-black);
    line-height: 1.5;
}

.cta-button {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    width: fit-content;
    margin: 0 auto;
}

.cta-button i {
    font-size: 1.1rem;
}

.portrait {
    width: 100%;
    max-width: 400px;
    height: auto;
    border: 8px solid var(--primary-black);
    box-shadow: var(--shadow-brutal-lg);
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
}

.portrait:hover {
    transform: rotate(2deg) scale(1.05);
}

/* === Background textures (unique per section, faded edges) === */
.textured-bg {
    position: relative;
}

.textured-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

.textured-bg > * {
    position: relative;
    z-index: 1;
}

/* About (teal): polka dots */
.about-section.textured-bg::before {
    opacity: 0.12;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.9) 3.5px, transparent 3.5px);
    background-size: 32px 32px;
}

/* Games (purple): diagonal stripes */
.games-section.textured-bg::before {
    opacity: 0.1;
    background-image:
        repeating-linear-gradient(
            -45deg,
            rgba(255,255,255,0.7) 0px, rgba(255,255,255,0.7) 3px,
            transparent 3px, transparent 18px
        );
}

/* Projects (green): grid/cross pattern */
.projects-section.textured-bg::before {
    opacity: 0.12;
    background-image:
        linear-gradient(rgba(255,255,255,0.8) 2px, transparent 2px),
        linear-gradient(90deg, rgba(255,255,255,0.8) 2px, transparent 2px);
    background-size: 40px 40px;
}

/* About Section */
.about-section {
    padding: 5rem 0;
    background-color: var(--accent-blue);
    color: var(--primary-white);
}

.about-section .section-title {
    color: var(--primary-white);
}

.about-section .section-title::after {
    background-color: var(--primary-white);
}

.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 4rem;
    align-items: start;
}

.about-text p:not(:last-child) {
    margin-bottom: 1.1rem;
}

.about-text {
    font-size: clamp(1.1rem, 1.6vw, 1.3rem);
    line-height: 1.9;
    font-weight: 500;
    color: var(--primary-white);
    background-color: rgba(255, 255, 255, 0.14);
    padding: 2.5rem 2.8rem;
    border: 3px solid var(--primary-white);
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.25);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background-color: var(--primary-white);
    transform: rotate(1deg);
    transition: transform 0.3s ease;
    padding: 0.5rem;
}

.skill-card .nb-card-content {
    padding: 0.3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.skill-icon {
    font-size: 1.5rem;
    color: var(--accent-orange);
    margin-bottom: 0;
}

.skill-card .nb-card-title {
    font-size: 1rem !important;
    text-align: center;
    margin: 0;
}

.skill-card:nth-child(even) {
    transform: rotate(-1deg);
}

.skill-card:hover {
    transform: rotate(0deg) scale(1.05);
}

/* Projects Section */
.projects-section {
    padding: 4rem 0;
    background-color: var(--accent-green);
}

.projects-section .section-title {
    color: var(--primary-white);
}

.projects-section .section-title::after {
    background-color: var(--primary-white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

.project-card {
    background-color: var(--primary-white);
    transform: rotate(-1deg);
    transition: transform 0.3s ease;
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

.project-card:nth-child(2n) {
    transform: rotate(1deg);
}

.project-card:nth-child(3n) {
    transform: rotate(-0.5deg);
}

.project-card:hover {
    transform: rotate(0deg) scale(1.02);
}

/* Games Section */
.games-section {
    padding: 4rem 0;
    background-color: var(--accent-purple);
    color: var(--primary-white);
}

.games-section .section-title {
    color: var(--primary-white);
}

.games-section .section-title::after {
    background-color: var(--primary-white);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.game-card[data-game] {
    cursor: pointer !important;
}

.game-card {
    background-color: var(--primary-white);
    aspect-ratio: 1.5;
    transform: rotate(0.5deg);
    transition: transform 0.3s ease;
}

.game-card:nth-child(odd) {
    transform: rotate(-0.5deg);
}

.game-card:hover:not(.tilt-active) {
    transform: rotate(0deg) scale(1.05);
}

.game-card .nb-card-img {
    height: 150px;
    object-fit: cover;
}

/* Placeholder game cards (no image) */
.game-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-white);
}

.game-card-placeholder .nb-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
}

.game-card-placeholder .skill-icon {
    font-size: 3rem;
    color: var(--accent-purple);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1rem;
    font-weight: 500;
}

.contact-item i {
    font-size: 1.2rem;
    background-color: var(--accent-orange);
    color: var(--primary-white);
    padding: 0.4rem;
    border: 2px solid var(--primary-white);
    border-radius: 4px;
    box-shadow: 2px 2px 0px rgba(255, 255, 255, 0.2);
}

/* Footer */
.footer {
    padding: 1.5rem 0;
    background-color: var(--paper);
    color: var(--primary-black);
    text-align: center;
    font-weight: 400;
    width: 100%;
}

.footer-contact-info {
    margin-bottom: 1rem;
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.footer p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0.5rem 0 0 0;
}

/* Utility: screen-reader only */
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Custom NeoBrutalism enhancements */
.nb-button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--primary-black);
}

.nb-card {
    border: 4px solid var(--primary-black);
    border-radius: var(--radius);
    box-shadow: var(--shadow-brutal);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.nb-card:hover {
    box-shadow: var(--shadow-brutal-lg);
}

.nb-card .nb-card-img {
    border-radius: calc(var(--radius) - 5px) calc(var(--radius) - 5px) 0 0;
}

.game-card-featured .nb-card-img {
    border-radius: calc(var(--radius) - 5px) 0 0 calc(var(--radius) - 5px);
}

/* Coins arrondis (neo-brutalisme moderne : arrondi + ombres dures) */
.nb-button,
.badge,
.badge-inner,
.cta-section,
.cta-flag,
.cta-contact-btn,
.about-text,
.game-modal-genre,
.game-modal-play,
.game-modal-video,
.game-modal-case-study,
.featured-badge,
.nb-card-hint,
.project-back,
.project-tag,
.project-genre,
.project-intent,
.project-learned,
.project-cta-btn,
.project-meta-bar,
.project-cover,
.project-section,
.project-section-note,
.project-specs dt,
.project-gallery-item,
.project-slideshow-frame,
.project-slideshow-btn,
.project-slideshow-counter,
.project-process-step,
.project-notfound,
.project-footer .nb-button,
.project-notfound .nb-button,
.side-nav-link,
.side-nav-brand {
    border-radius: var(--radius-sm);
}

.game-modal {
    border-radius: var(--radius);
}

.game-modal-close {
    border-radius: 50%;
}

.game-modal-img-wrap {
    border-radius: calc(var(--radius) - 5px) 0 0 calc(var(--radius) - 5px);
}

.nb-input, .nb-textarea {
    border: 3px solid var(--primary-black);
    box-shadow: var(--shadow-brutal);
}

.nb-input:focus, .nb-textarea:focus {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--primary-black);
    outline: none;
}

/* === Section Separators === */
.section-separator {
    position: relative;
    width: 100%;
    height: 80px;
    overflow: hidden;
    line-height: 0;
    margin-top: -1px;
}

.section-separator svg {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

/* Hero → About: fill with About's color, match hero background */
.separator-hero-about {
    background-color: var(--paper);
    background-image: radial-gradient(rgba(17, 17, 17, 0.12) 2px, transparent 2.5px);
    background-size: 28px 28px;
}
.separator-hero-about svg path {
    fill: var(--accent-blue);
}

/* About → Alternance: fill with Alternance's color */
.separator-about-alternance {
    background: var(--accent-blue);
}
.separator-about-alternance svg path {
    fill: var(--accent-yellow);
}

/* Alternance → Games: fill with Games' color */
.separator-alternance-games {
    background: var(--accent-yellow);
}
.separator-alternance-games svg path {
    fill: var(--accent-purple);
}

/* Games → Board games: fill with Board games' color */
.separator-games-boardgames {
    background: var(--accent-purple);
}
.separator-games-boardgames svg path {
    fill: var(--accent-orange);
}

/* Board games → Projects: fill with Projects' color */
.separator-boardgames-projects {
    background: var(--accent-orange);
}
.separator-boardgames-projects svg path {
    fill: var(--accent-green);
}

/* Projects → Footer: fill with Footer's color */
.separator-projects-footer {
    background: var(--accent-green);
}
.separator-projects-footer svg path {
    fill: var(--paper);
}

/* =================================================================
   Section Alternance — comparatif apprenti vs salarie classique
   ================================================================= */
.alternance-section {
    padding: 4rem 0;
    background-color: var(--accent-yellow);
    color: var(--primary-black);
}

.alternance-section .section-title {
    color: var(--primary-black);
}

.alternance-section .section-title::after {
    background-color: var(--primary-black);
}

/* Texture : pois sombres discrets */
.alternance-section.textured-bg::before {
    opacity: 0.06;
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.9) 3px, transparent 3px);
    background-size: 30px 30px;
}

.alternance-intro {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 600;
    max-width: 60ch;
    margin: -1rem auto 2.5rem;
}

/* Grandes stats mises en avant */
.alternance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto 2rem;
}

.alternance-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-align: center;
    background: var(--primary-white);
    border: 4px solid var(--primary-black);
    border-radius: var(--radius);
    box-shadow: var(--shadow-brutal);
    padding: 1.6rem 1.2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.alternance-stat:hover {
    transform: translate(-3px, -3px);
    box-shadow: var(--shadow-brutal-lg);
}

.alternance-stat .stat-chiffre {
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1;
}

.alternance-stat .stat-label {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    max-width: 22ch;
}

.alternance-stat.stat-star {
    background: var(--accent-green);
    transform: rotate(-1.5deg);
}

.alternance-stat.stat-star:hover {
    transform: rotate(-1.5deg) translate(-3px, -3px);
}

.alternance-stat.stat-star .stat-chiffre {
    font-size: clamp(3rem, 7vw, 4.5rem);
    text-shadow: 3px 3px 0 var(--primary-white);
}

/* Grosse fleche : ouvre le detail des chiffres */
.alternance-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    margin: 0 auto 2rem;
    background: var(--primary-white);
    color: var(--primary-black);
    border: 4px solid var(--primary-black);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-brutal);
    padding: 0.8rem 1.6rem;
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.alternance-toggle:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--primary-black);
}

.alternance-toggle i {
    font-size: 1.8rem;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: fleche-invite 1.6s ease-in-out infinite;
}

@keyframes fleche-invite {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(5px); }
}

.alternance-toggle.open i {
    transform: rotate(180deg);
    animation: none;
}

/* Contenu deroulant */
.alternance-details {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s ease;
}

.alternance-details-inner {
    overflow: hidden;
    min-height: 0;
}

.alternance-details.open {
    grid-template-rows: 1fr;
}

.alternance-details .alternance-table-wrap {
    margin-top: 0.5rem;
}

/* Tableau comparatif */
.alternance-table-wrap {
    overflow-x: auto;
    border: 4px solid var(--primary-black);
    border-radius: var(--radius);
    box-shadow: var(--shadow-brutal-lg);
    background: var(--primary-white);
    max-width: 1000px;
    margin: 0 auto 2.5rem;
}

.alternance-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.alternance-table th,
.alternance-table td {
    padding: 0.9rem 1.1rem;
    text-align: left;
    border-bottom: 2px solid var(--primary-black);
}

.alternance-table thead th {
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    background: var(--primary-black);
    color: var(--primary-white);
}

.alternance-table thead th span {
    display: block;
    font-family: 'Public Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: none;
    opacity: 0.8;
}

.alternance-table thead th.col-moi {
    background: var(--accent-green);
    color: var(--primary-black);
}

.alternance-table thead th.col-moi span {
    opacity: 0.75;
}

.alternance-table tbody th {
    font-weight: 700;
    width: 28%;
    background: #fdf3dd;
}

.alternance-table tbody tr:last-child th,
.alternance-table tbody tr:last-child td {
    border-bottom: none;
}

.alternance-table td.col-moi {
    background: rgba(62, 207, 110, 0.16);
    font-weight: 600;
}

.alternance-table small {
    font-weight: 400;
    opacity: 0.7;
}

/* Cartes chiffres cles */
.alternance-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto 2rem;
}

.alternance-card {
    background: var(--primary-white);
    border: 4px solid var(--primary-black);
    border-radius: var(--radius);
    box-shadow: var(--shadow-brutal);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.alternance-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: var(--shadow-brutal-lg);
}

.alternance-card i {
    font-size: 2rem;
    color: var(--accent-orange);
}

.alternance-card h3 {
    font-size: 1.05rem;
    margin: 0.6rem 0;
    line-height: 1.3;
}

.alternance-card p {
    font-size: 0.92rem;
    line-height: 1.6;
}

/* Note de bas de section + CTA */
.alternance-note {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.75;
    max-width: 70ch;
    margin: 0 auto 2rem;
    text-align: center;
}

.alternance-note i {
    flex-shrink: 0;
    font-size: 1rem;
    margin-top: 2px;
}

.alternance-cta {
    text-align: center;
}

@media (max-width: 768px) {
    .alternance-intro {
        font-size: 1rem;
    }

    .alternance-table {
        font-size: 0.85rem;
    }

    .alternance-table th,
    .alternance-table td {
        padding: 0.7rem 0.8rem;
    }
}

/* =================================================================
   Section Contact — formulaire Web3Forms, Calendly, copie au clic
   ================================================================= */
.contact-section {
    padding: 3rem 0;
    background-color: var(--paper);
    background-image: radial-gradient(rgba(17, 17, 17, 0.08) 2px, transparent 2.5px);
    background-size: 28px 28px;
}

.contact-intro {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    max-width: 55ch;
    margin: -1rem auto 2.5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto 2.5rem;
    align-items: start;
}

.contact-card {
    background: var(--primary-white);
    border: 4px solid var(--primary-black);
    border-radius: var(--radius);
    box-shadow: var(--shadow-brutal-lg);
    padding: 1.4rem;
}

.contact-card-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.15rem;
    margin-bottom: 0.9rem;
}

.contact-card-title i {
    font-size: 1.5rem;
    color: var(--accent-orange);
}

/* Formulaire */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.contact-honeypot {
    display: none;
}

.contact-label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.contact-label small {
    text-transform: none;
    font-weight: 500;
    opacity: 0.6;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    font-family: 'Public Sans', sans-serif;
    font-size: 1rem;
    padding: 0.5rem 0.8rem;
    border: 3px solid var(--primary-black);
    border-radius: var(--radius-sm);
    background: var(--paper);
    color: var(--primary-black);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--primary-black);
}

.contact-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    align-self: flex-start;
    background: var(--accent-orange);
    color: var(--primary-white);
    border: 3px solid var(--primary-black);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-brutal);
    padding: 0.7rem 1.5rem;
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.contact-submit:hover:not(:disabled) {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--primary-black);
}

.contact-submit:disabled {
    opacity: 0.6;
    cursor: wait !important;
}

.contact-form-status {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    min-height: 1.3em;
}

.contact-form-status.ok {
    color: #1d8a4a;
}

.contact-form-status.erreur {
    color: #c92a2a;
}

/* Calendly */
.calendly-wrap {
    border: 3px solid var(--primary-black);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--paper);
}

.calendly-inline-widget {
    min-width: 280px;
    height: 430px;
}

/* Coordonnees directes : copie au clic */
.contact-direct {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--primary-white);
    color: var(--primary-black);
    border: 3px solid var(--primary-black);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-brutal);
    padding: 0.7rem 1.2rem;
    font-family: 'Public Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.contact-chip:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--primary-black);
}

.contact-chip i {
    font-size: 1.3rem;
    color: var(--accent-orange);
}

.contact-chip .chip-hint {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--accent-yellow);
    border: 2px solid var(--primary-black);
    border-radius: 6px;
    padding: 0.15rem 0.5rem;
}

.contact-chip.copie {
    background: var(--accent-green);
}

.contact-chip.copie .chip-hint {
    background: var(--primary-white);
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .contact-card {
        padding: 1.2rem;
    }

    .contact-chip {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .calendly-inline-widget {
        height: 400px;
    }
}

/* === Board games section === */
.boardgames-section {
    padding: 4rem 0;
    background-color: var(--accent-orange);
    color: var(--primary-white);
}

.boardgames-section .section-title {
    color: var(--primary-white);
}

.boardgames-section .section-title::after {
    background-color: var(--primary-white);
}

.boardgames-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* === Skill Level Bars === */
.skill-bar {
    width: 100%;
    height: 9px;
    background-color: #ece5d8;
    border: 2px solid var(--primary-black);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 0.3rem;
}

.skill-bar-fill {
    height: 100%;
    width: 0%;
    background-color: var(--accent-orange);
    transition: width 1s ease-out;
    position: relative;
}

.skill-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 3px,
        rgba(0, 0, 0, 0.1) 3px,
        rgba(0, 0, 0, 0.1) 6px
    );
}

/* === 3D Tilt on Game Cards === */
.game-card {
    transform-style: preserve-3d;
    will-change: transform;
}

.game-card.tilt-active {
    transition: none !important;
}

.game-card.tilt-active .nb-card-content,
.game-card.tilt-active .nb-card-img {
    transform: translateZ(20px);
}

/* === Game Detail Modal === */
.game-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1.5rem;
}

.game-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.game-modal {
    position: relative;
    background: var(--primary-white);
    border: 4px solid var(--primary-black);
    box-shadow: 12px 12px 0px var(--primary-black);
    max-width: 720px;
    width: 100%;
    transform: translateY(30px) rotate(-1deg) scale(0.95);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-modal-overlay.active .game-modal {
    transform: translateY(0) rotate(0deg) scale(1);
}

.game-modal-close {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 44px;
    height: 44px;
    background: var(--accent-orange);
    border: 4px solid var(--primary-black);
    box-shadow: 3px 3px 0px var(--primary-black);
    color: var(--primary-white);
    font-size: 1.6rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer !important;
    z-index: 10;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    line-height: 1;
    padding: 0;
}

.game-modal-close:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 4px 4px 0px var(--primary-black);
}

.game-modal-inner {
    display: flex;
    flex-direction: row;
}

.game-modal-img-wrap {
    flex: 0 0 45%;
    min-height: 260px;
    overflow: hidden;
    border-right: 4px solid var(--primary-black);
}

.game-modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.game-modal-details {
    flex: 1;
    padding: 1.8rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.game-modal-title {
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-black);
    line-height: 1.2;
    margin: 0;
}

.game-modal-genre {
    display: inline-block;
    align-self: flex-start;
    background: var(--accent-yellow);
    border: 3px solid var(--primary-black);
    padding: 0.2rem 0.7rem;
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 2px 2px 0px var(--primary-black);
}

.game-modal-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    margin: 0;
    flex: 1;
}

.game-modal-links {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.game-modal-play {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-orange);
    color: var(--primary-white);
    border: 3px solid var(--primary-black);
    padding: 0.6rem 1.2rem;
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 4px 4px 0px var(--primary-black);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-modal-play:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--primary-black);
}

.game-modal-video {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-black);
    color: var(--primary-white);
    border: 3px solid var(--primary-black);
    padding: 0.6rem 1.2rem;
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 4px 4px 0px var(--accent-purple);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-modal-video:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--accent-purple);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-left: 0;
    }

    .side-navbar {
        width: 100%;
        height: 60px;
        flex-direction: row;
        justify-content: center;
        padding: 0.5rem;
        bottom: 0;
        top: auto;
        box-shadow: 0 -4px 0px var(--accent-orange);
        border-right: none;
        border-top: 3px solid var(--primary-black);
    }

    .side-nav-brand {
        display: none;
    }

    .side-nav-links {
        flex-direction: row;
        gap: 0.8rem;
        width: auto;
    }

    .side-nav-link {
        width: 38px;
        height: 38px;
    }

    .side-nav-link i {
        font-size: 1.2rem;
    }

    .side-nav-link.active::after {
        display: none;
    }

    .hero-content {
        text-align: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .section-container {
        padding: 1rem;
        padding-bottom: 80px;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .game-modal {
        max-width: 95vw;
    }

    .game-modal-inner {
        flex-direction: column;
    }

    .game-modal-img-wrap {
        flex: none;
        min-height: 180px;
        max-height: 220px;
        border-right: none;
        border-bottom: 4px solid var(--primary-black);
    }

    .game-modal-details {
        padding: 1.2rem 1rem;
    }

    .game-modal-title {
        font-size: 1.2rem;
    }

    .game-modal-close {
        top: -14px;
        right: -10px;
        width: 38px;
        height: 38px;
        font-size: 1.3rem;
    }

    .section-separator {
        height: 50px;
    }

    .cta-section {
        margin: 1rem 0;
        padding: 1rem;
    }

    .cta-title {
        font-size: 1.2rem;
    }

    .cta-text {
        font-size: 0.9rem;
    }

    .footer {
        padding: 1rem 0;
        font-size: 0.95rem;
    }

    .footer-contact-info {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
        text-align: left;
    }

    .footer .contact-item {
        width: 100%;
        justify-content: flex-start;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .footer p {
        font-size: 0.85rem;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .hero-badges {
        justify-content: center;
    }

    .portrait {
        transform: none;
        max-width: 300px;
    }

    .side-nav-links {
        gap: 0.5rem;
    }

    .side-nav-link {
        width: 34px;
        height: 34px;
    }

    .selection-box {
        transform: none;
        animation: none;
        font-size: 0.9rem;
    }

    .footer {
        padding: 0.7rem 0;
        font-size: 0.9rem;
    }

    .footer-contact-info {
        gap: 0.3rem;
    }

    .footer p {
        font-size: 0.8rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .selection-box {
        animation: none;
        background-color: var(--accent-yellow);
        transform: none;
    }

    .skill-bar-fill {
        transition: none;
    }

    .game-card.tilt-active .nb-card-content,
    .game-card.tilt-active .nb-card-img {
        transform: none;
    }
}

/* Focus styles for accessibility */
.nb-button:focus,
.nb-input:focus,
.nb-textarea:focus,
.side-nav-link:focus {
    outline: 3px solid var(--accent-yellow);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --shadow-brutal: 6px 6px 0px #000000;
        --shadow-brutal-lg: 10px 10px 0px #000000;
    }

    .nb-card, .nb-button, .nb-input, .nb-textarea {
        border-width: 4px;
    }
}

/* =================================================================
   Game modal - bouton "Etude de cas" (lien vers page detail)
   ================================================================= */
.game-modal-case-study {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-yellow);
    color: var(--primary-black);
    border: 3px solid var(--primary-black);
    padding: 0.6rem 1.2rem;
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 4px 4px 0px var(--primary-black);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-modal-case-study:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--primary-black);
}

/* =================================================================
   Project detail page (project.html)
   ================================================================= */
body.project-page {
    background-color: var(--paper);
}

.project-detail {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

/* --- Hero --- */
.project-hero {
    background-color: var(--primary-white);
    background-image: radial-gradient(rgba(17, 17, 17, 0.1) 2px, transparent 2.5px);
    background-size: 28px 28px;
    border: 4px solid var(--primary-black);
    box-shadow: var(--shadow-brutal-lg);
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.project-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.project-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-white);
    color: var(--primary-black);
    border: 3px solid var(--primary-black);
    padding: 0.5rem 1rem;
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.85rem;
    box-shadow: 3px 3px 0px var(--primary-black);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-back:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px var(--primary-black);
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.project-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 3px solid var(--primary-black);
    padding: 0.3rem 0.7rem;
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 2px 2px 0px var(--primary-black);
    background: var(--primary-white);
}

.project-tag.tag-award {
    background: var(--accent-orange);
    color: var(--primary-white);
}

.project-tag.tag-date {
    background: var(--accent-blue);
    color: var(--primary-white);
}

.project-title {
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    line-height: 1;
    margin: 0 0 0.5rem 0;
    color: var(--primary-black);
    text-shadow: 3px 3px 0 var(--accent-orange);
    word-wrap: break-word;
}

.project-genre {
    display: inline-block;
    background: var(--primary-black);
    color: var(--primary-white);
    padding: 0.3rem 0.8rem;
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 1.2rem 0;
}

.project-intent {
    font-size: 1.15rem;
    line-height: 1.6;
    font-weight: 600;
    color: var(--primary-black);
    background: var(--primary-white);
    border-left: 6px solid var(--accent-orange);
    padding: 1rem 1.2rem;
    margin: 0 0 1rem 0;
    box-shadow: 3px 3px 0px var(--primary-black);
}

/* Ce que j'ai appris */
.project-learned {
    background: var(--primary-white);
    border-left: 6px solid var(--accent-blue);
    padding: 1rem 1.2rem;
    margin: 0 0 1.5rem 0;
    box-shadow: 3px 3px 0px var(--primary-black);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.project-learned-label {
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-blue);
}

.project-learned-body {
    font-size: 1.05rem;
    line-height: 1.55;
    font-weight: 500;
    color: var(--primary-black);
}

/* Placeholder visible quand un champ est vide ("[À renseigner]") */
.placeholder-text {
    color: #8a8a8a;
    font-style: italic;
    font-weight: 500;
}

.project-intent.is-placeholder,
.project-learned.is-placeholder {
    background: repeating-linear-gradient(
        -45deg,
        var(--primary-white) 0px, var(--primary-white) 8px,
        #f5f5f5 8px, #f5f5f5 16px
    );
    border-left-color: #cfcfcf;
}

.project-learned.is-placeholder .project-learned-label {
    color: #8a8a8a;
}

.project-meta-item.is-placeholder {
    background: repeating-linear-gradient(
        -45deg,
        var(--primary-white) 0px, var(--primary-white) 8px,
        #f5f5f5 8px, #f5f5f5 16px
    );
}

.project-meta-item.is-placeholder > i {
    color: #b5b5b5;
}

.project-cta {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.project-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 3px solid var(--primary-black);
    padding: 0.7rem 1.3rem;
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 4px 4px 0px var(--primary-black);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-cta-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--primary-black);
}

.project-cta-btn.cta-play   { background: var(--accent-orange); color: var(--primary-white); }
.project-cta-btn.cta-video  { background: var(--primary-black);  color: var(--primary-white); }
.project-cta-btn.cta-source { background: var(--accent-blue);   color: var(--primary-white); }
.project-cta-btn.cta-full   { background: var(--accent-green);  color: var(--primary-white); }

/* --- Meta bar (Date / Outils / Role / Contexte) --- */
.project-meta-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0;
    border: 4px solid var(--primary-black);
    box-shadow: var(--shadow-brutal);
    background: var(--primary-white);
    margin-bottom: 2rem;
}

.project-meta-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    border-right: 3px solid var(--primary-black);
}

.project-meta-item:last-child {
    border-right: none;
}

.project-meta-item > i {
    font-size: 1.6rem;
    color: var(--accent-orange);
    flex-shrink: 0;
}

.project-meta-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.project-meta-label {
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #666;
}

.project-meta-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-black);
    word-wrap: break-word;
}

/* --- Cover image --- */
.project-cover {
    margin: 0 0 2.5rem 0;
    border: 4px solid var(--primary-black);
    box-shadow: var(--shadow-brutal-lg);
    overflow: hidden;
    background: var(--primary-black);
}

.project-cover img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    display: block;
}

/* --- Sections --- */
.project-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.project-section {
    background: var(--primary-white);
    border: 4px solid var(--primary-black);
    box-shadow: var(--shadow-brutal);
    padding: 1.8rem 2rem;
}

.project-section-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin: 0 0 1.2rem 0;
    color: var(--primary-black);
    position: relative;
    display: inline-block;
    padding-bottom: 0.3rem;
}

.project-section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 60%;
    height: 6px;
    background: var(--accent-orange);
}

.project-section-body {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--primary-black);
    white-space: pre-wrap;
}

.project-section-note {
    margin-top: 1rem;
    padding: 0.7rem 1rem;
    background: var(--accent-yellow);
    border: 2px dashed var(--primary-black);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Gallery (captures) — grille uniforme : cases egales qui remplissent toute
   la largeur (pas de trou). Les images sont recadrees pour remplir la case
   (--gallery-ratio pilote le format ; --gallery-fit peut passer a "contain"
   pour afficher l'image entiere avec un leger cadre au lieu de rogner). */
.project-gallery-grid,
.project-process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
}

.project-gallery-item {
    margin: 0;
    border: 3px solid var(--primary-black);
    box-shadow: 4px 4px 0px var(--primary-black);
    background: var(--primary-white);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.project-gallery-item:hover {
    transform: translate(-3px, -3px);
    box-shadow: 7px 7px 0px var(--primary-black);
}

.project-gallery-item img {
    width: 100%;
    aspect-ratio: var(--gallery-ratio, 4 / 3);
    object-fit: var(--gallery-fit, cover);
    object-position: center;
    display: block;
    background: #efe9db;
}

.project-gallery-item figcaption {
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-top: 3px solid var(--primary-black);
    background: var(--accent-yellow);
    margin-top: auto;
}

/* Process (iterations) - meme galerie mais avec numero d'etape */
.project-process-grid .project-gallery-item {
    background: var(--primary-white);
}

.project-process-step {
    position: absolute;
    top: -14px;
    left: -14px;
    z-index: 2;
    background: var(--accent-orange);
    color: var(--primary-white);
    border: 3px solid var(--primary-black);
    box-shadow: 3px 3px 0px var(--primary-black);
    padding: 0.25rem 0.6rem;
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-size: 0.9rem;
    font-weight: 900;
}

/* Specs (table label/value) */
.project-specs {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.6rem 1.5rem;
    margin: 0;
}

.project-specs dt {
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-black);
    background: var(--accent-yellow);
    padding: 0.3rem 0.7rem;
    border: 2px solid var(--primary-black);
    align-self: start;
    white-space: nowrap;
}

.project-specs dd {
    margin: 0;
    align-self: center;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--primary-black);
}

/* Footer (back link) */
.project-footer {
    margin-top: 3rem;
    text-align: center;
}

.project-footer .nb-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-black);
    color: var(--primary-white);
    border: 3px solid var(--primary-black);
    padding: 0.8rem 1.5rem;
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 4px 4px 0px var(--accent-orange);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-footer .nb-button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--accent-orange);
}

/* Not found */
.project-notfound {
    max-width: 600px;
    margin: 6rem auto;
    text-align: center;
    padding: 2rem;
    background: var(--primary-white);
    border: 4px solid var(--primary-black);
    box-shadow: var(--shadow-brutal-lg);
}

.project-notfound h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.project-notfound p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.project-notfound .nb-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-orange);
    color: var(--primary-white);
    border: 3px solid var(--primary-black);
    padding: 0.7rem 1.3rem;
    font-family: 'Stint Ultra Expanded', 'Lexend Mega', sans-serif;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 4px 4px 0px var(--primary-black);
}

/* Responsive project page */
@media (max-width: 768px) {
    .project-detail {
        padding: 1.5rem 1rem 5rem;
    }

    .project-hero {
        padding: 1.2rem 1.2rem;
    }

    .project-hero-top {
        flex-direction: column;
        align-items: stretch;
    }

    .project-title {
        text-shadow: 2px 2px 0 var(--accent-orange);
    }

    .project-meta-item {
        border-right: none;
        border-bottom: 3px solid var(--primary-black);
    }

    .project-meta-item:last-child {
        border-bottom: none;
    }

    .project-section {
        padding: 1.2rem 1rem;
    }

    .project-specs {
        grid-template-columns: 1fr;
        gap: 0.2rem 0;
    }

    .project-specs dt {
        margin-top: 0.6rem;
    }
}

/* =================================================================
   Carte de jeu mise en avant (Hôtel Beaumont)
   ================================================================= */
.game-card-featured {
    grid-column: 1 / -1;
    aspect-ratio: auto;
    position: relative;
    background-color: var(--primary-white);
    max-width: none; /* la lib neobrutalismcss limite .nb-card a 380px */
    width: 100%;
    display: grid;
    grid-template-columns: 3fr 2fr;
}

/* Carte vedette : pas de rotation ni de zoom (trop forts sur une grande carte),
   survol en "soulevement" avec ombre renforcee a la place */
.game-card-featured,
.game-card-featured:nth-child(odd) {
    transform: none;
}

.game-card-featured:hover:not(.tilt-active) {
    transform: translate(-5px, -5px);
    box-shadow: 12px 12px 0px var(--primary-black);
}

.game-card-featured .nb-card-img {
    height: 100%;
    min-height: 300px;
    object-fit: cover;
}

.game-card-featured .nb-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1rem;
}

.game-card-featured .nb-card-desc {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

.game-card-featured .nb-card-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--accent-yellow);
    border: 3px solid var(--primary-black);
    box-shadow: 3px 3px 0 var(--primary-black);
    padding: 0.4rem 0.9rem;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.featured-badge {
    position: absolute;
    top: -14px;
    left: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--accent-orange);
    color: var(--primary-white);
    border: 3px solid var(--primary-black);
    box-shadow: var(--shadow-brutal);
    padding: 0.35rem 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    transform: rotate(-2deg);
}

@media (max-width: 768px) {
    .game-card-featured {
        grid-template-columns: 1fr;
    }

    .game-card-featured .nb-card-img {
        height: 200px;
        min-height: 0;
    }
}

/* =================================================================
   Diaporama (page detail projet)
   ================================================================= */
.project-slideshow {
    outline: none;
}

.project-slideshow-frame {
    position: relative;
    border: 3px solid var(--primary-black);
    box-shadow: 4px 4px 0 var(--primary-black);
    background: #f0f0f0;
    overflow: hidden;
}

.project-slideshow-img {
    width: 100%;
    height: auto;
    display: block;
}

.project-slideshow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-yellow);
    color: var(--primary-black);
    border: 3px solid var(--primary-black);
    box-shadow: 3px 3px 0 var(--primary-black);
    font-size: 1.5rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.project-slideshow-btn:hover {
    transform: translateY(-50%) translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--primary-black);
}

.project-slideshow-prev { left: 12px; }
.project-slideshow-next { right: 12px; }

.project-slideshow-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 0.9rem;
}

.project-slideshow-caption {
    font-size: 0.95rem;
    font-weight: 600;
}

.project-slideshow-counter {
    background: var(--primary-black);
    color: var(--primary-white);
    padding: 0.2rem 0.7rem;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.project-slideshow-dots {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.8rem;
}

.project-slideshow-dot {
    width: 14px;
    height: 14px;
    padding: 0;
    border: 2px solid var(--primary-black);
    background: var(--primary-white);
    box-shadow: 2px 2px 0 var(--primary-black);
    transition: background 0.15s ease;
}

.project-slideshow-dot.is-active {
    background: var(--accent-orange);
}

@media (max-width: 768px) {
    .project-slideshow-btn {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .project-slideshow-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
}

/* =================================================================
   Mascotte — cachee dans des recoins inattendus de la page
   ================================================================= */
.hero-section,
.games-section,
.skills-grid,
.project-footer {
    position: relative;
}

.mascotte-sticker {
    position: absolute;
    width: clamp(64px, 8vw, 110px);
    height: auto;
    z-index: 999; /* au-dessus de tout le contenu (la navbar reste a 1000) */
    pointer-events: none;
    user-select: none;
}

/* Les stickers des separateurs peuvent depasser de la bande */
.separator-hero-about,
.separator-projects-footer {
    overflow: visible;
}

/* -- Mascotte guide (page d'accueil) : une seule, fixee en bas a droite,
      dans le coin libre de contenu. Elle grimpe le long du bord au fil du
      scroll (JS via translate), penche dans le sens du defilement (rotate)
      et change de pose a chaque section. -- */
.mascotte-guide {
    position: fixed;
    right: 14px;
    bottom: 16px;
    width: clamp(58px, 7vw, 90px);
    z-index: 900; /* sous la navbar (1000) et la modale (2000) */
    pointer-events: auto;
    cursor: pointer !important;
    filter: drop-shadow(3px 3px 0 rgba(17, 17, 17, 0.25));
    transition: translate 0.35s ease-out, rotate 0.25s ease-out;
    animation: mascotte-flotte 3s ease-in-out infinite alternate;
}

@keyframes mascotte-flotte {
    from { transform: translateY(0); }
    to   { transform: translateY(-7px); }
}

/* Changement de pose : petit pouf elastique */
.mascotte-guide.mascotte-pouf {
    animation: mascotte-pouf 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
               mascotte-flotte 3s ease-in-out 0.45s infinite alternate;
}

@keyframes mascotte-pouf {
    0%   { transform: scale(0.2) rotate(-15deg); }
    60%  { transform: scale(1.15) rotate(6deg); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .mascotte-guide {
        width: 52px;
        right: 8px;
        bottom: 74px; /* au-dessus de la navbar mobile */
    }
}

/* Assise (page detail projet) */
@keyframes mascotte-sit {
    from { transform: rotate(-3deg) translateY(0); }
    to   { transform: rotate(3deg) translateY(-4px); }
}

/* Page detail projet */
.mascotte-project-footer {
    bottom: 6px;
    right: 4%;
    width: clamp(56px, 7vw, 96px);
    transform-origin: bottom center;
    animation: mascotte-sit 4s ease-in-out infinite alternate;
}

/* Responsive */
@media (max-width: 600px) {
    .mascotte-sticker:not(.mascotte-guide) {
        width: 54px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mascotte-sticker {
        animation: none !important;
    }
}

/* =================================================================
   Mascotte interactive : clic (boing) + transition vers le Snake
   ================================================================= */
.mascotte-cliquable {
    pointer-events: auto;
    cursor: pointer !important;
}

.mascotte-sticker.mascotte-boing {
    animation: mascotte-boing 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes mascotte-boing {
    0%   { transform: scale(1, 1); }
    30%  { transform: scale(1.25, 0.75); }
    60%  { transform: scale(0.85, 1.15) rotate(-6deg); }
    100% { transform: scale(1, 1); }
}

/* Rideau circulaire vers le jeu secret */
.snake-wipe {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: var(--accent-green);
    background-image: radial-gradient(rgba(0, 0, 0, 0.12) 2px, transparent 2.5px);
    background-size: 28px 28px;
    clip-path: circle(0px at var(--wipe-x, 50%) var(--wipe-y, 50%));
    transition: clip-path 0.65s ease-in;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.snake-wipe::after {
    content: '🐍';
    font-size: clamp(4rem, 15vw, 9rem);
    transform: scale(0) rotate(-30deg);
    transition: transform 0.5s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.snake-wipe.active {
    clip-path: circle(150% at var(--wipe-x, 50%) var(--wipe-y, 50%));
}

.snake-wipe.active::after {
    transform: scale(1) rotate(0deg);
}

/* Bouton son (barre laterale) */
.sfx-toggle {
    margin-top: auto;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-white);
    color: var(--primary-black);
    border: 3px solid var(--primary-black);
    border-radius: var(--radius-sm);
    box-shadow: 3px 3px 0 var(--primary-black);
    font-size: 1.3rem;
    cursor: pointer !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sfx-toggle:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--primary-black);
}

.sfx-toggle[aria-pressed="true"] {
    background: #e8e0d0;
    color: #888;
}

@media (max-width: 768px) {
    .sfx-toggle {
        margin-top: 0;
        margin-left: 0.8rem;
        width: 38px;
        height: 38px;
        flex-shrink: 0;
    }
}

@media (max-width: 400px) {
    .sfx-toggle {
        margin-left: 0.5rem;
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
    }
}

/* =================================================================
   CTA Recherche d'alternance — mis en evidence
   ================================================================= */
.cta-alternance {
    position: relative;
    background: var(--accent-yellow);
    border-width: 5px;
    box-shadow: 12px 12px 0 var(--primary-black);
    padding: 2rem 3.5rem;
}

.cta-flag {
    position: absolute;
    top: -18px;
    right: -22px;
    background: var(--accent-orange);
    color: var(--primary-white);
    border: 3px solid var(--primary-black);
    box-shadow: var(--shadow-brutal);
    padding: 0.3rem 1rem;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    animation: cta-flag-pulse 2s ease-in-out infinite;
}

@keyframes cta-flag-pulse {
    0%, 100% { transform: rotate(3deg) scale(1); }
    50%      { transform: rotate(5deg) scale(1.08); }
}

.cta-alternance .cta-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.cta-sub {
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
    color: var(--primary-black);
    line-height: 1.5;
    max-width: 46ch;
}

.cta-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-orange);
    color: var(--primary-white);
    border: 3px solid var(--primary-black);
    box-shadow: var(--shadow-brutal);
    padding: 0.6rem 1.4rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta-contact-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--primary-black);
}

@media (max-width: 600px) {
    .cta-alternance {
        padding: 1.5rem 1.2rem;
    }

    .cta-flag {
        right: -8px;
    }
}
