html{
  margin: 0;
  padding: 0;
  background-color: rgb(245, 245, 245);
  background-image: url("./assets/UDDPPNA-posts_insta-hor.png");
  background-size: 50vh;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  height: 100%;
  width: 100%;
  overflow: clip;
}

body{
    padding: 0;
    margin: 0;
    line-height: 1.6em;
    /* font-size: 0.9rem; */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.pages{
    width: 100%;
    flex: 1 0 auto;
}

.video-backdrop{
    position: fixed;
    top: 0;
    left: 0;
    min-width: 100vw;
    min-height: 100vh;
    overflow: hidden;
    z-index: -1;
}

video{
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    pointer-events: none;
}

#doc-btn, #reject-close, #about-close, #request-close, #info-close, .reject-close, .close{
    cursor: pointer;
}


.interface-folders{
    position: fixed;      /* pour rester en bas à droite */
    /* bottom: 20px; */
    left: 25px;
    margin: 0;
    cursor: pointer;
    text-align: center;   /* centre le figcaption sous l'image */
    padding: 2px;
    border-radius: 6px;
    z-index: 2;
    transition: background 0.2s, box-shadow 0.2s;
}

#about-file {
  bottom: 400px;
}

#request-file {
  bottom: 275px;
}

#doc-folder {
  bottom: 150px;
}

#info-file {
  bottom: 25px;
}

#printer-file {
  bottom: 25px;
  right: 150px;
  left: auto;
}

#reject-folder {
  left: auto;
  right: 25px;
  bottom: 25px;
}

.window {
  position: relative;
  width: 340px;
  background: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  overflow: hidden;
  animation: float 6s ease-in-out infinite alternate;
  pointer-events: auto; /* restore clicking inside windows */
  cursor: default;
}

.interface-folders.selected figcaption {
  background: rgba(0, 120, 215, 0.6);
  border-radius: 20px;
}

.interface-folders img {
    width: 75px;
    height: auto;
    display: block;
    margin: 0 auto;
    text-align: center;
}

.interface-folders figcaption{
    font-size: 0.9rem;
    color: #ffffff;
    text-shadow: 1px 1px 2px #000;  /* pour rendre le texte lisible sur le fond vidéo */
    /* margin-top: 5px; */
    padding: 0px 6px 3px 6px;
}

/* Overlay styles */
.overlay {
    display: none; /* hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3); /* semi-transparent dim */
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.overlay-content {
  width: fit-content;
  background: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* scrollbar-color: black #eee; */
  z-index: 11;
}

/* Title bar */
.mac-title-bar {
    background: #e0e0e0;
    height: 28px;
    display: grid;
    grid-template-columns: auto 1fr auto; /* left buttons, title, optional right area */
    align-items: center;
    padding: 0 10px;
    user-select: none;
}

.mac-buttons {
    display: flex;
    gap: 6px;
}

.mac-buttons span {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.close { background: #ff5f57; }
.minimize { background: #ffbd2e; }
.maximize { background: #28c840; }

.mac-title {
    text-align: center;
    font-size: 0.9rem;
    color: #333;
    pointer-events: none; /* so clicks pass through */
    font-weight: 700;
}

/* Empty placeholder for symmetry if needed */
.mac-title-bar::after {
    content: "";
    width: 54px; /* approximate width of the 3 buttons + spacing */
}

/* Body */
/* .mac-body {
    padding: 30px 20px;
    text-align: center;
    font-size: 1.2rem;
    color: #000;
} */

.mac-body {
  flex: 1;
  padding: 20px;
  background: #f8f8f8;
  /* justify-items: center;
  align-items: center; */
  max-width: 40vw; /*media query phone: 65vw*/
  max-height: 60vh;
  overflow-y: scroll;
  overflow-x: clip;
  scrollbar-width: thin;
  /* max-width: 725px; */
  /* position: relative; */
}

.mac-body-about{
  width: 40vw;
  max-width: 725px;
}

.mac-body-request{
  max-width: 25vw;
}

.mac-body-info{
  max-width: 35vw;
  height: 45vh;
}

.mac-body-doc{
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.overlay-window, .overlay-window-reject {
  /* position: absolute; */
  
  box-shadow: 0 10px 40px rgba(0,0,0,0.3); /*weird thing with position: relative on mac-body*/
  pointer-events: auto; /* clickable */
}

.overlay-window-reject{
  position: relative;
  box-shadow: "";
}

/* Positioning */
.window-left {
  top: 50%;
  left: 50%;
  width: 25vw;
  margin: 1%;
}

.window-right {
  width: 25vw;
  margin: 1%;
  height: auto;
  /* left: calc(50% + 100px);  */
  /* transform: translate(-50%, -50%); */
  /* display: none; */
}

.window-right .mac-body{
  max-height: auto;
}

.window1, .window2, .window3, 
.window4, .window5, .window6, 
.window7, .window8{
  width: 350px;
  height: max-content;
  box-sizing: border-box;
  /* position: absolute; */
  /* position: absolute; */
}

.window1{
  margin: 0;
}

.window2{
  /* margin: 0% -10% 10% -10%; */
  margin: -66px 0 0 -33px;
  /* color: grey; */
  /* transform: translate(10%, -40%); */
}

.window3{
  /* color: darkmagenta; */
  margin: -66px 0 0 66px;
  /* transform: translate(20%, -80%); */
}

.window4{
  /* transform: translate(30%, -120%); */
  /* color: yellow; */
  margin: -66px 0px 0 33px;
}

#group1, #group2{
  margin-right: -50px;
}


.mac-body img {
  width: 100px;
  /* height: 100%; */ /*removed for the doc folder view*/
  height: auto;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
  cursor: pointer;
  margin-bottom: 5px;
}
.mac-body figure{
    text-align: center;
    margin: 20px;
}

.mac-body figcaption{
  text-align: center;
  font-size: 0.9em;
  padding-left: 5px;
  padding-right: 5px;
  line-height: normal;
  transition: background 0.2s, box-shadow 0.2s;
}

.mac-body figcaption.selected {
  color: #0078ff; /* macOS blue selection color */
  /* font-weight: 600; */
  background: rgba(0, 120, 215, 0.6);
  border-radius: 5px;
  color: #ebebeb;
}

.mac-body p{
  margin-bottom: 5px;
}

.mac-body p:first-child{
  margin-top: 0px;
}

.mac-body p:last-child{
  margin-bottom: 0px;
}

.mac-body a{
  font-weight: 400;
}

/* Overlay container (transparent, just for positioning) */
.zoom-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
}

/* Mac-style window */
.zoom-window {
  position: absolute;
  border-radius: 8px;
  background: #f8f8f8;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  overflow: hidden;
  transform-origin: top left;
  pointer-events: auto;
  transition: all 0.35s ease;
}

/* Title bar */
.zoom-title-bar {
  display: flex;
  align-items: center;
  background: #e0e0e0;
  height: 28px;
  padding: 0 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.85rem;
  user-select: none;
}

/* Close button on left */
.zoom-close {
  /* width: 16px; //otherwise the x is not centered
  height: 16px; */
  background: #474747;
  border: none;
  border-radius: 50%;
  margin-right: 10px;
  cursor: pointer;
  font-weight: 700;
  color: #e0e0e0;
  padding-bottom: 2px;
}

/* Filename in title */
.zoom-filename {
  flex: 1;
  text-align: left;
  font-weight: 700;
}

/* Body with small padding around image */
.zoom-body {
  padding: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.zoom-body img {
  display: block;
  width: 100%;
  border-radius: 4px;
  object-fit: contain;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.bold, legend{
  font-weight: 600;
}

.it{
 font-style: italic;
}

.underlined{
  text-decoration: 1px underline black;
}

.blink{
  color: grey;
}

.mac-body a {
  color: blue;
}

ul{
  padding-left: 40px;
  margin-bottom: 10px;
}

li{
  list-style: disc;
}

label{
  display: block;
}

input, select{
  margin-bottom: 5px;
}

input{
  font-size: 0.9rem;
}

fieldset{
  margin-bottom: 20px;
  pointer-events: auto;
  /* background-color: rgb(238, 238, 238); */
  border-style: dashed;
  border-width: 1px;
  border-color: black;
}

.submitButton{
  font-size: 0.95rem;
}

legend{
  font-size: 1rem;
}

dialog {
  border: none;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

dialog::backdrop {
  background: rgba(0,0,0,0.3);
}

#dialogClose {
  margin-top: 15px;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 4px;
  border: none;
  background: #0078ff;
  color: white;
  font-weight: 600;
}

/* .animate__animated.animate__flash {
  --animate-duration: 2s;
} */
