/* =============================
   FONTS
============================= */
@font-face {
  font-family: "Doto";
  src: url("font/Doto-VariableFont.woff2") format("woff2"),
       url("font/Doto-VariableFont.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Red";
  src: url("font/RedHatMono-VariableFont_wght.woff2") format("woff2"),
       url("font/RedHatMono-VariableFont_wght.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "RedI";
  src: url("font/RedHatMono-Italic-VariableFont_wght.woff2") format("woff2"),
       url("font/RedHatMono-Italic-VariableFont_wght.woff") format("woff");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

html.is-inverted {
  filter: invert(1);
}


/* =============================
   CV
============================= */

.cv{
    position: fixed;
  bottom: 52px;
  left: 2.6vw;
  font-family: 'RedI';
  font-size: 15px;
  z-index: 2000;
}

.cv a{
  text-decoration: none;
    font-size: 15px;
  color: black;
}

.cv a:hover{
  color: blue;
}

/* =============================
   INSTA
============================= */

.insta{
    position: fixed;
  bottom: 52px;
  right: 2.6vw;
  font-family: 'RedI';
  font-size: 15px;
  z-index: 2000;
}

.insta a{
  text-decoration: none;
    font-size: 15px;
  color: black;
}

.insta a:hover{
  color: blue;
}

/* =============================
   SWITCH STYLE IPHONE - CENTRÉ
============================= */
.switch {
  position: fixed;
  bottom: 47px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 50px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: transparent;
  border: 1px solid black;
  border-radius: 34px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.4s;
}

.slider::before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 1px;
  bottom: 1px;
  background-color: black;
  border: 1px solid black;
  border-radius: 50%;
  transition: 0.4s;
}

input:checked + .slider::before {
  transform: translateX(24px);
}



/* =============================
   MODE NUIT / INVERSION
============================= */

/* Curseur reste normal */
.cursor,
.cursor-trail-item {
    filter: invert(0);
}

/* =============================
   CURSEUR1
============================= */

html{
  cursor: none;
}
/* Ligne verticale */
.curseur-vertical {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;        /* épaisseur */
  height: 100vh;
  background: black;
  pointer-events: none;
  z-index: 9999;
}

/* Ligne horizontale */
.curseur-horizontal {
  position: fixed;
  top: 0;
  left: 0;
  height: 1px;       /* épaisseur */
  width: 100vw;
  background: black;
  pointer-events: none;
  z-index: 9999;
}

/* =============================
   BODY
============================= */
body {
  margin: 0;
  padding: 0;
  height: 100vh;
}

/* =============================
   TITRE
============================= */
.titre {
  position: fixed;
  top: 1.6vw;
  left: 2.5vw;
  font-family: 'RedI';
  font-size: 21px;
  z-index: 2000;
}

.titre a {
  text-decoration: none;
  color: black;
}

.titre a:hover {
  color: blue;
}

/* =============================
   MENU
============================= */
.menu {
  position: fixed;
  top: 1.9vw;
  right: 2.6vw;
  display: flex;
  z-index: 2000;
}

.menu-item {
  font-family: 'RedI';
  font-size: 15px;
  padding: 0 0.5vw;
  text-decoration: none;
  color: black;
}

.menu-item:hover {
  color: blue;
}

/* =============================
   3D CANVAS
============================= */
#background3D {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#container3D canvas {
  z-index: 1;
  position: absolute;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
}

/* =============================
   FENÊTRES RÉTRO
============================= */
.window {
  position: fixed;
  width: 100%;
  height: calc(100% - 30px);
  background: #c0c0c0;
  font-family: monospace;
  font-size: 12px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  border-top: 2px solid #dfdfdf;
  border-left: 2px solid #dfdfdf;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
}

/* Header */
.window-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 30px;
  padding: 0 4px;
  background: linear-gradient(to bottom, #0000aa, #000080);
  color: white;
  cursor: move;
  user-select: none;
  border-bottom: 2px solid #808080;
}

.window-title {
  margin-left: 6px;
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
  font-family: 'Doto';
}

/* Boutons */
.window-controls {
  display: flex;
  gap: 2px;
}

.window-btn {
  width: 18px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #c0c0c0;
  color: #000;
  cursor: pointer;
  border-top: 2px solid #dfdfdf;
  border-left: 2px solid #dfdfdf;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
}

.window-btn:active {
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #dfdfdf;
  border-bottom: 2px solid #dfdfdf;
}

.window-btn.close:hover {
  background: red;
  color: white;
}

/* Contenu fenêtres */
.window-content {
  display: flex;
  width: 100%;
  height: calc(100% - 30px);
  overflow: auto;
}

.window-left, .window-right {
  flex: 1;
  padding: 5px;
}

.window-left {
  overflow-y: auto;
  padding: 0px;
  border-right: 1px solid #808080;
}

.window-left img {
  width: 100%;
  object-fit: cover;
}

.window-right {
  background-color: white;
  padding: 15px;
  overflow: auto;
  font-family: "Red";
}

.window-right p {
  margin: 0;
  padding: 0;
}

.img-item {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* =============================
   SLIDER
============================= */
.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  cursor: pointer;
}

.slide.active {
  opacity: 1;
}

/* =============================
   POSITION INITIALE DES FENÊTRES
============================= */
.window-1 { top: 100px; left: 5vw; }
.window-2 { top: 150px; left: 5vw; }
.window-3 { top: 200px; left: 5vw; }
.window-4 { top: 250px; left: 5vw; }
.window-5 { top: 300px; left: 5vw; }
.window-6 { top: 350px; left: 5vw; }
.window-7 { top: 400px; left: 5vw; }
.window-8 { top: 450px; left: 5vw; }
.window-9 { top: 500px; left: 5vw; }
.window-10 { top: 550px; left: 5vw; }
.window-11 { top: 600px; left: 5vw; }
.window-12 { top: 650px; left: 5vw; }



/* =============================
   MOBILE
============================= */
@media (max-width: 768px) {

    .mobile-top-spacer {
    height: 13vh; /* hauteur menu + titre */
    pointer-events: none;
  }

  .window {
width: 100%;
    max-width: calc(100vw - 12vw);
    max-height: 90vh;
    height: auto;

    margin: 10px 6vw;   /* ✅ PAS de auto */
    position: relative;

    left: auto;
    right: auto;
    top: auto;
    bottom: auto;

    z-index: 1000;
    overflow-y: auto;
  }

  /* Contenu visible, empilé */
  .window-content {
    display: none; /* fermé par défaut */
    flex-direction: column;
  }

  .window-right {
    display: none;
  }

  .window-left {
    order: 2;
    width: 100%;
    border-right: none;
    border-top: 1px solid #808080;
  }

  .window-left img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  body {
    overflow-y: auto;
  }

  .curseur-vertical,
  .curseur-horizontal {
    display: none;
  }

  .titre {
    top: 4.2vw;
    left: 4.5vw;
    font-family: 'Red';
    font-size: 8vw;
    z-index: 2000;
  }
  .titre a { text-decoration: none; color: black; }
  .titre a:hover { color: blue; }

  .menu {
    top: 18vw;
    left: 3vw;
    display: flex;
    z-index: 2000;
  }
  .menu-item {
    font-family: 'Red';
    font-size: 4.4vw;
    padding: 0 2vw;
    text-decoration: none;
    color: black;
  }
  .menu-item:hover { color: blue; }

  .cv, .insta, .switch {
    display: none;
  }

  .window-btn.maximize {
    opacity: 0.3;
    pointer-events: none;
  }
}
