/* GLOBAL */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  padding: 0vh 0vh 0vh 0vh;
  background-color: white;
  font-family: "Arial", "Helvetica", sans-serif;
}

div {
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: black;
  cursor: pointer;
}

#content {
  padding : 1rem 0rem 3rem 0rem;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#content button, .cta_modal {
  text-decoration: none;
  color: black;
  font-size: 14px;
  background-color: white;
}

.cta {
  padding: 0.7em;
  border: 2px solid black;
  text-transform: uppercase;
  cursor: pointer;
}

.cta:hover {
  animation: ctaHover 0.2s ease-in-out 0s 1 normal forwards;
}

@keyframes ctaHover {
  from { background-color: white; color: black; }
  to { background-color: black; color: white; }
}

/* MODALS AND POPUPS */

dialog {
  top: 10vh;
  height: 80vh;
  border-radius: 20px;
  background-color: white;
  color: black;
  padding: 0.7em;
  width: 90%;
  max-width: 700px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
  animation: popupGrow 0.4s ease-in-out 0s 1 normal forwards;
}

@keyframes popupGrow {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

dialog p {
  color: black;
}

dialog form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

dialog div {
  width: 100%;
}

.close_popup {
  align-self: end;
  background-color: white;
  color: grey;
  font-size: 25px;
  padding: 5px 10px;
  border: 0px solid white;
  border-radius: 50%;
  position: relative;
  /* top: 5%; */ /* right: 5%; */
  cursor: pointer;
}

.title_popup {
  text-transform: uppercase;
  margin-bottom: 1rem;
}

dialog form p {
  text-align: left;
}

.form_field input,
.form_field select,
.form_field p {
  width: 100%;
}

dialog span {
  font-size: small;
}

.dialog_radio {
  flex-direction: row;
  margin-left: 10px;
}

.form_category {
  text-transform: uppercase;
  margin: 1em 0em;
  text-align: center;
}

#title_page_new_memory {
  text-transform: uppercase ;
  width: 70%;
  z-index: 1;
  padding: 10px;
}

#form_new_memory {
  display: flex;
  flex-direction: column;
  align-items: flex-start !important;
  gap: 40px;
  padding: 0px 20px;

  background-color: white;
  padding-top: 40px;
  width: 90%;
  margin-top: -40px;
}

/* case desktop */
@media screen and (min-width: 767px) { 
  #form_new_memory {
    max-width: 400px;
  }
  #title_page_new_memory {
    max-width: 300px;
  }
}

#form_new_memory p {
  text-align: left;
}

input[type='text'],
input[type='file'],
input[type='password'],
input[type='datetime-local'],
input[type='email'] {
  background-color: white;
  border: 1px solid #ccc;
  padding: 0.5em;
  font-size: 1rem;
  border-radius: 8px;
  color: black; /* texte visible */
  width: 100%;
  font-family: Arial, Helvetica, sans-serif;
}

.custom-color-picker {
  position: relative;
  display: inline-block;
  width: 20%;
}

input[type='color'] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.color-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #ccc;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.field_new_memory, .field_new_memory input {
  width: 100%;
  height: 40px;
}

.field_new_memory input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

select {
  appearance: none;
  background-color: transparent;
  border: 1px solid #aaa;
  padding: 0.5em 1em;
  border-radius: 6px;
  font-size: 1rem;
  color: #333;
  background-image: url('https://fneto-prod.fr/timecapsule/img/arrow_bottom.png');
  background-repeat: no-repeat;
  background-position: right 0.75em center;
  background-size: 1em;
  width: 100%;
}


.field_new_memory input[type="file"] {
  height: fit-content;
  color: #656565 ;
}

.field_new_memory label p {
  background-color: black;
  color: white;
  width: fit-content;
  padding: 2px 10px 0px 10px;
  border-radius: 8px 8px 0px 0px;
  margin-left: 15px;
}

#form_new_memory summary {
  background-color: transparent;
  border: none;
  color: black;
  padding: 0;
  width: 100%;
}

.new_memory_options_field {
  width: 100%;
}

#preview_memory_buttons {
  margin: 15px 0px;
  align-self: center;
  width: auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 20px;
  margin: 25px 0px;
  width: 50%;
  text-wrap: auto;
}

#modal_submit_button_bloc, #submit_button_bloc {
  align-self: center;
  width: auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

.preview_double_buttons {
  margin-bottom: 20px;
}

#modal_submit_button_bloc input[type="button"],
#submit_button_bloc input[type="button"],
#submit_button_bloc input[type="submit"] {
  width: 50%;
  text-wrap: auto;
}

#submit_button_bloc {
  margin: 30px 0px 20px 0px;
}

.main_cta {
  color: white;
  background-color: black;
  text-decoration: none;
  font-size: 14px;
  padding: 0.7em;
  border: 2px solid white;
  text-transform: uppercase;
  cursor: pointer;
}

.main_cta:hover {
  color: black;
  background-color: white;
  border: 2px solid black;
}

/* HEADER */

header {
  background-color: black;
  padding: 0.5em 0em;
  -moz-box-shadow: 0px 2px 5px 0px #656565;
  -webkit-box-shadow: 0px 5px 0px 0px #656565;
  -o-box-shadow: 0px 2px 5px 0px #656565;
  box-shadow: 0px 2px 5px 0px #656565;
  min-height: 10vh;
}

header a {
  margin: auto;
  display: block;
}

header img {
  width: auto;
  height: 100%;
  max-height: 80px;
}

/* NAV BAR */

nav {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  grid-template-rows: 1fr;
  align-items: start;
  width: 100%;
  padding: 0px 2vw;
}

nav img {
  height: 35px;
}

.nav_left {
  display: flex;
  justify-self: flex-start;
}

.nav_right {
  display: flex;
  justify-self: flex-end;
  width: 40px;
  border: 2px solid black;
}

.nav_right a {
  display: flex;
}

.param_button:hover img {
  animation: rotateAsset 0.7s ease-in-out 0s 1 normal forwards;
  filter: invert(1);
}

@keyframes rotateAsset {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


/* TEXTS */

h1,
h2,
h3,
h4,
h5,
p,
a {
  text-align: center;
  font-family: "Helvetica", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  /* si passage vers une couleur plus sombre
  color: white; */
}

.bold {
  font-weight: bold;
}

.italic {
  font-style: italic;
}

.underline {
  text-decoration: underline;
}

.smaller {
  font-size: 0.7em;
}

h1 {
  font-weight: bold;
  font-size: 1.2em;
  margin-bottom: 5vh;
}

h2 {
  font-size: 1em;
  margin: 1em 0em 1em 0em;
}

/* BUTTONS */

.back_button, .nav_right {
  height: 40px; width: 40px;
  background-color: white;
  font-weight: bold;
  font-size: large;
  border-radius: 25px;
  color: black;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* case mobile */
@media screen and (max-width: 1024px) { 
  .back_button {
  font-size: small;
  padding: 0px 5px;
}}

.back_button:hover {
  animation: ctaHover 0.2s ease-in-out 0s 1 normal forwards;
  text-decoration: none;
}

.admin_cta {
  padding: 0.7em;
  background-color: white;
  border: 2px solid black;
  border-radius: 0.5em;
  cursor: pointer;
}

.erase_button {
  background-color: crimson;
  color: white;
}

/* ADMIN MODAL */

details summary {
  margin: 15px 5%;
  background-color: black;
  color: white;
  padding: 10px;
  border: 2px solid black;
  border-radius: 1em;
  width: 90%;
}

details {
  display: flex;
  flex-direction: column;
  align-items: center;
}


details form {
  width: 100%;
}

/* Notification system */

.invisible_banner {
  visibility: hidden;
  opacity: 0;
}

.success-banner {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%), translateY(100px);
  background-color: #4CAF50;
  color: white;
  border-radius: 8px;
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s ease, opacity 0.5s ease;
  z-index: 9999;
  overflow: hidden;
}

.success-banner.show {
  visibility: visible;
  opacity: 1;
  bottom: 40px;
  transform: translateX(-50%) translateY(0);
}

.error-banner {
  background-color: #f44336;
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%), translateY(100px);
  color: white;
  border-radius: 8px;
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s ease, opacity 0.5s ease;
  z-index: 9999;
  overflow: hidden;
}

.error-banner.show {
  visibility: visible;
  opacity: 1;
  bottom: 40px;
  transform: translateX(-50%) translateY(0);
}

.banner-content {
  position: relative;
  padding: 14px 20px;
}

.progress-bar {
  height: 4px;
  background-color: rgba(255, 255, 255, 0.7);
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  animation: progressTimer 5s linear forwards;
  border-radius: 0 8px 8px 0;
}

@keyframes progressTimer {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}


