

/* =========================
   Layout global
========================= */


/* Conteneur principal */
body {
  margin: 0;
  background-color: #f3f3f3;
  font-family: system-ui, Helvetica, Arial, sans-serif;
  font-weight: 300;
  line-height: 1.4;
}

/* Site main / sections */
.site-main {
  padding: 0rem 0rem; /* marge haut/bas + gauche/droite */
}

/* Container centralisé */
.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 2rem; /* marge gauche/droite par défaut */
}

/* Sur mobile : réduire un peu la marge horizontale */
@media (max-width: 600px) {
  .site-main {
    padding: 0rem 0rem;
  }
  .container {
    padding: 0 2rem;
  }
}

/* Liens */

.link {
  color: inherit;        /* hérite de la couleur du texte */
  text-decoration: none; /* supprime le soulignement par défaut */
  font-weight: 0;      /* optionnel : style un peu plus visible */
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

/* Hover subtil */
.link:hover {
  text-decoration: underline;
  color: #bf0000;        /* ou autre couleur discrète */
}

/* ==================
   PAGE CONTACT
====================== */

.contact-infos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.35rem 1.5rem;
  margin: 1.5rem 0 2rem;
}

.contact-infos p {
  margin: 0;
}

.contact-infos strong {
  display: inline;
  font-size: inherit;
  letter-spacing: normal;
  text-transform: none;
  font-weight: 600;
  opacity: 1;
  margin-bottom: 0;
}

.contact-infos a,
.contact-infos p {
  font-weight: 300;
}

.contact-infos a {
  text-decoration: none;
}

.contact-infos a:hover {
  text-decoration: underline;
}



/* ==================
   PAGE ACCEUIL
====================== */

.home-content {
  width: 70%;
  margin-top: 4rem;
}
.home-content h1{
font-weight: 300;
font-size: 2.5rem;
}
.home-content h2 {
font-weight: 300;
font-size: 1.5rem;
}

.home-more {
  margin-top: 0.75rem;
}

.home-more-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #000;
  border-radius: 0;
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.home-more-btn:hover {
  color: #bf0000;
  border-color: #bf0000;
}

.info-card {
  position: fixed;
  left: 45%;
  top: 45%;
  transform: translate(-50%, -50%);
  width: 50vw;
  max-height: 75vh;
  background: #fff;
  border: 1px solid #000;
  box-shadow: 0 0 12px rgba(78, 126, 205, 0.15);
  display: none;
  z-index: 1000;
}

.info-card.is-open {
  display: block;
}

.info-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid #000;
  cursor: move;
  font-weight: 300;
}

.info-card-body {
  padding: 0.6rem 0.9rem;
  padding-right: 2rem;
  font-size: 0.95rem;
  max-height: 60vh;
  overflow: auto;
}

@media (max-width: 600px) {
  .info-card {
    left: 50%;
    top: 10%;
    transform: translate(-50%, 0);
    width: 90vw;
    max-height: 60vh;
  }
  .info-card-body {
    max-height: 50vh;
  }
  .home-content {
  width: 80%;
  margin-top: 0rem;
}
}

.info-card-close {
  border: 0;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
}

.hero-roulette {
  font-weight: 300;
  font-size: 2rem;
  margin: 0.5rem 0 1rem;
}

.hero-roulette #hero-roulette-word {
  font-weight: 300;
  display: inline-block;
  transition: opacity 0.2s ease, transform 0.2s ease;
  color: #bf0000;
}

.hero-roulette #hero-roulette-word.is-fading {
  opacity: 0;
  transform: translateY(-2px);
}

.home-content .random-cover {
  width: 80%;
  min-width: 250px;
  height: auto;
  display: block;
  margin-top: 2rem;
}

.home-content #random-project-link {
  display: block;
  position: relative;
  z-index: 1; /* s'assure qu'il ne recouvre rien d'autre */
}

.home-project-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  line-height: 2;
}
.home-project-list li {
  margin: 0.25rem 0;
}
.home-project-link {
  display: block;
}

.home-hover-thumb {
  position: fixed;
  left: 0;
  top: 0;
  width: 180px;
  max-height: 240px;
  opacity: 0;
  transform: translate3d(0, 0, 0);
  pointer-events: none;
  z-index: 999;
  transition: opacity 0.12s ease;
}

.home-hover-thumb.is-visible {
  opacity: 1;
}

.home-hover-thumb img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 240px;
  display: block;
}




/* ==================
   PAGE PORTFOLIO
====================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, Helvetica, Arial, sans-serif;
  line-height: 1.4;
}

/* Portfolio section */
.portfolio {
  padding: 2rem 0;
  position:relative;
}

.portfolio h2 {
  margin-bottom: 2rem;
  font-size: 2rem;
}

/* Grille */
.portfolio-grid {
  column-width: 300px;
  column-gap: 0.5rem;
}


/* Flip container */
.project-flip {
  perspective: 1200px;
  display: block;
  width: 100%;
  align-self: start;
  text-decoration: none;
  color: inherit;
  break-inside: avoid;
  margin: 0 0 0.5rem;
  vertical-align: top;
}

/* Flip inner */
.flip-inner {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s ease;
}

.project-flip .flip-inner.flipped {
  transform: rotateY(180deg);
}

/* Faces */
.flip-front,
.flip-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  backface-visibility: hidden;
  overflow: hidden;
}

/* Front image */
.flip-front img {
  width: 100%;
  height: auto;        /* Hauteur variable selon image */
  display: block;
  object-fit: contain;
  border: 1px solid rgba(0, 0, 0, 0.5);
}

/* Back face */
.flip-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center; /* centre verticalement */
  align-items: center;     /* centre horizontalement */
  text-align: center;
  background: #000000;
  color: #ffffff;
  padding: 1rem;
  gap: 1rem;
}


/* Texte des flip-back */
.flip-back h3 {
  font-weight: 300;
  margin: 0;
  font-size: 0.9rem;
}
.flip-back p {
  margin: 0;
  font-size: 0.7rem;
}


/* IMAGE LIBRE GALLERIE PORTFOLIO */
.image-libre {
  display: block;
  break-inside: avoid;
  margin: 0 0 0.5rem;
  vertical-align: top;
}
.image-libre img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.5);
}


/* Filtres checkbox */
.portfolio-filters {
  margin-bottom: 1.5rem;
}
.portfolio-filters label {
  margin-right: 1rem;
  font-size: 1rem;
  cursor: pointer;
}
.portfolio-filters input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid #000;
  border-radius: 0;
  background: transparent;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.4rem;
  position: relative;
}
.portfolio-filters input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 1px;
  background: #000;
}

@media (max-width: 600px) {
  .portfolio-grid {
    column-count: 1;
  }
}


/* =========================
   PAGE PROJET
========================= */

.project {
  max-width: px;
  margin: 0 auto;
  padding: rem rem;
}

/* === Project Top (desktop) === */

.project-top {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-top: 4rem;
}

/* Video */
.project-video {
  flex: 1 1 70%;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  margin-bottom: 2rem;
}
.project-video-local {
  position: relative;
  width: fit-content;
  max-width: 100%;
  height: 100%;
}
.project-video video {
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  margin: 0;
  background: transparent;
}
.project-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(44px, 5vw, 62px);
  height: clamp(44px, 5vw, 62px);
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(2px);
  color: #fff;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.project-video-play:hover {
  background: rgba(0, 0, 0, 0.85);
}
.video-embed {
  position: relative;
  width: 100%;
  height: 100%;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* Galerie prend la majorité */
.project-gallery {
  flex: 1 1 70%;
  width: 100%;
}
/* Infos à droite */
.project-header {
  flex: 0 0 30%;
}
/* Titre + logo */
.project-header-title {
  display: block;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.project-title {
  font-size: 1.5rem;
  margin: 0;
  margin-bottom: 1rem;
  font-weight: 500;
}
.project-client-logo img {
  max-width: 120px;
  height: auto;
  display: block;
  filter: grayscale(100%);
  opacity: 0.8;
}
.project-client-logo {
  display: block;
}

/* Meta */
.project-meta {
  list-style: none;
  padding: 0;
  margin-bottom: 0rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 0.9rem;
}
.project-meta li strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.project-meta span {
  background: #eee;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-right: 0.25rem;
  font-size: 0.8rem;
}
.project-meta li a {
  display: block;       /* empile les liens verticalement */
  margin: 0.1rem 0;     /* petit espacement vertical, ajuste si besoin */
}


/* Texte description Content */
.project-content {
  width: 65%;
  font-size: 1rem;
  line-height: 1.3;
  margin-bottom: 5rem;
}

/* Gallerie */

.project-gallery {
  width: 70vw;
  max-width: 900px;
  margin: 0rem 0;
  flex: 1 1 70%;
  margin-top: 0;
  margin-bottom: 2rem;
  isolation: isolate;
}

.gallery-stage {
  position: relative;
}

.gallery-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-gallery.is-pdf .gallery-media {
  aspect-ratio: auto;
  background: transparent;
  overflow: visible;
}
.project-gallery img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center center;
}

.gallery-pdf-wrapper {
  position: relative;
  width: 100%;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0;
}

.project-gallery.is-pdf .gallery-pdf-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 30px;
  transform: translateX(-50%);
  pointer-events: none;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.01),
    rgba(0, 0, 0, 0.16) 50%,
    rgba(0, 0, 0, 0.01)
  );
  opacity: 0.7;
}

.gallery-pdf-book {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.gallery-pdf-page {
  background: #fafafa;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.gallery-pdf-page.is-empty {
  background: #ffffff;
  border: 0;
}

.gallery-pdf-canvas {
  width: 100%;
  display: block;
}

.gallery-pdf-fallback {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
}

.gallery-controls {
  display: flex;
  margin-top: 0.75rem;
  gap: 0.5rem;
  justify-content: center;
}

.gallery-nav-btn {
  border: 0;
  background: #fff;
  color: #000;
  padding: 0.2rem 0.5rem;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-nav-btn:hover {
  color: #bf0000;
}

.gallery-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* Flèches indicatives */
.gallery-arrow {
  font-size: 1.4rem;
  color: #868686;
  opacity: 1;
  pointer-events: none;
  user-select: none;
  mix-blend-mode: difference;
}

/* Zones cliquables */
.gallery-zone {
  position: absolute;
  top: 0;
  height: 100%;
  z-index: 2;
  display: flex;
  align-items: center;
}
.gallery-zone.left {
  left: 0;
  width: 50%;          /* moitié gauche */
  cursor: w-resize;
}
.gallery-zone.right {
  right: 0;
  width: 50%;          /* moitié droite */
  cursor: e-resize;
}

/* Flèches indicatives dans les zones */
.gallery-zone .gallery-arrow {
  position: static;
  transform: none;
  z-index: 3;
}
.gallery-zone.left .gallery-arrow {
  margin-left: 12px;
}
.gallery-zone.right .gallery-arrow {
  margin-left: auto;
  margin-right: 12px;
}

@media (min-width: 601px) {
  .gallery-arrow {
    display: none;
  }
}



/* === Mobile === */
@media (max-width: 600px) {

  /* Empile image + header + meta */
  .project-top {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  /* Galerie pleine largeur */
  .project-gallery {
    width: 100%;
    margin-bottom: 1rem;
  }
  .gallery-media {
    aspect-ratio: 4 / 3;
  }
  .project-video {
    aspect-ratio: auto;
    height: auto;
    align-items: flex-start;
  }
  .project-video-local {
    width: 100%;
    height: auto;
  }
  .project-video video {
    width: 100%;
    height: auto;
    max-height: none;
    object-position: center top;
  }
  .gallery-pdf-book {
    grid-template-columns: 1fr;
  }
  .project-gallery.is-pdf .gallery-pdf-wrapper::before {
    display: none;
  }
  .gallery-controls {
    width: 100%;
    justify-content: space-between;
  }
  /* Bloc header sous l’image, prend toute la largeur */
  .project-header {
    width: 100%;
    margin-top: 0rem;
  }
  /* Titre + logo sur la même ligne */
  .project-header-title {
    display: flex;
    justify-content: space-between; /* titre à gauche, logo à droite */
    align-items: flex-start;
    margin-bottom: 0rem;
  }
  .project-title {
    margin: 0;
    font-size: 1.3rem;
  }
  .project-client-logo img {
   width: 100px;
    height: auto;
  }
  /* Meta empilées verticalement */
  .project-meta {
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
  }
  .project-content {
    width: 100%;
  }
}


/* ==============
  PAGE CONTACT
=============== */

.contact-infos {
font-size: 13pt;
margin-top: 4rem;
margin-bottom: 4rem;
}
.contact-form {
max-width: 600px;
display: flex;
flex-direction: column;
gap: 1rem;
}
/* Champs texte */
.contact-form input,
.contact-form textarea {
display: block;  
width: 80%;
border: 1px solid #000;
padding: 0.75rem 0;
font-size: 1rem;
font-family: inherit;
background: transparent;
}
/* Pas d’arrondi, pas d’ombre */
.contact-form input:focus,
.contact-form textarea:focus {
outline: none;
border-color: #000;
}
.contact-form .input-small {
  max-width: 300px;
}
/* Bouton submit */
.contact-form button {
align-self: flex-start;
margin-top: 1rem;
}

/* Canvas */
#drawCanvas {
  display: block;
  width: 80%;
  height: auto;
  border: 1px solid #000;
  background: transparent;
  cursor: crosshair;
}
canvas {
touch-action: none; /* bloque scroll + pinch + swipe */
}
/* Shake animation */
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}
#drawCanvas.shake {
  animation: shake 0.35s ease;
}


/* ==============
    HEADER 
================== */


.site-header .container {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  width: 100%;
}

.site-header {
  width: 100%;
  margin: 2rem 0rem;
  color: #000000;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  overflow-x: hidden;
}

.site-title {
  text-decoration: none !important; /* enlève le soulignement quoi qu’il arrive */
  color: inherit !important;        /* prend la couleur du parent */
  font-size: inherit;
  cursor: pointer;
  font-weight: 300;
}


.site-header nav {
  margin-top: 0.0rem;
}

.site-header nav a {
  margin-right: 0.9rem;
  text-decoration: none;
}

/* Section menu style */
.main-nav ul {
  list-style: none;       /* plus de bullets */
  display: flex;          /* horizontal */
  gap: 1rem;              /* espace entre les items */
  margin: 0;
  padding: 0;
}

/* Style des liens */
.main-nav a {
  display: inline-block;
  text-decoration: none;  /* plus de soulignement par défaut */
  color: inherit;
  position: relative;
  padding-bottom: 0.25rem;
  font-weight: 300;
}

/* Soulignement actif */
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
}

/* Hover subtil */
.main-nav a:hover {
  text-decoration: none;
  color: #bf0000;           /* ou autre couleur discrète */
}
.main-nav a.active:hover {
  text-decoration: none;
  color: inherit;           /* ou autre couleur discrète */
}


/* MOBILE MENU - max-width 600px */
@media (max-width: 600px) {
    .site-header .container {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;            /* petit espace entre titre et menu */
  }
  .site-header .main-nav ul {
    flex-direction: column; /* empile les items */
    align-items: flex-end;  /* aligné à droite */
    gap: 0.5rem;            /* petit espace vertical entre items */
    margin: 0;
    padding: 0;
  }
  .site-header .main-nav li {
    width: 100%;           /* chaque item prend toute la largeur du container */
    text-align: right;
    align-items: flex-end;     /* texte aligné à droite */
    margin: 0;
    padding: 0;
  }
  .site-header nav a {
    margin-right: 0.1rem;
  }
}


/* ============
    FOOTER 
============= */

.site-footer {
  background: inherit;
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: left;
  border-top: 0px solid #ddd;
}

.site-footer p {
  margin: 0;
  font-size: 0.7rem;
  color: #666;
}
