
:root {
  --light-grey:#ececec;
  --dark-grey:#acacac;
  --green:#4CAF50;
  --red:#FF5252;
  --black-transparent:rgba(0,0,0, 0.8);

  --transition-time:.4s;
}

* {
  box-sizing: border-box;
  margin:0;
  padding: 0;
}

html {
  background:var(--light-grey);
  background-image: url("/images/bg.jpg");
}

body {
  font-family: 'Poppins', sans-serif;
  width: 100%;
  height:100vh;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding-top: 10px;
}

main {
  max-width: 90%;
}

main, .profiles {
  width: 600px;
  max-width: 100%;
}


.logo{
  display: block;
  margin-bottom: 20px;
  max-width: 80%;
  width: 200px;
}


.profiles {
  max-width: 90%;
  height: calc(100vh - 200px);
  position: absolute;
  padding-bottom: 164px;
  left: 50%;
  transform: translateX(-50%);
}

@media (max-width: 767px) {
  main, .profiles {
    width: 400px;
  }
  .logo{
    width: 160px;
  }
}


@media (max-width: 430px) {
  .profiles {
    height: calc(100vh - 280px);
  }
}


img {
  max-width: 100%;
}
.topbar{
  margin-bottom: 10px;
  padding: 0 10px;
}
.topbar-like{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.topbar-like > img{
  width: 18px;
}


.profile {
  position: absolute;
  left:0px;
  max-height: 100%;
  top:0px;
  width:100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
  cursor:pointer;
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Old versions of Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}

.profiles::before {
  content:'Plus rien à matcher...';
  color:var(--dark-grey);
  display:flex;
  align-items: center;
  justify-content: center;
  height:100%;
}

.profile__image {
  height: 100%;
  padding-bottom:150%;
  background-size: cover;
  background-position: bottom center ;
  background-color: #e7918d;
}

.profile__infos {
  padding:12px;
  position:absolute;
  bottom:0px;
  background:linear-gradient(0deg, black, transparent);
  width: 100%;
}

.profile__type{
  background-color: rgba(255, 255, 255, 0.76);
  display: inline-block;
  border-radius: 4px;
  padding: 0 6px;
  font-size: 0.8rem;
}


.profile__name {
  color:white;
  font-weight: bold;
  font-size:22px;
}

.profile__age {
  color:var(--light-grey);
  font-weight: normal;
}

.profile__description {
  color:white;
  font-size:13px;
}


.bottombar {
  margin-top:24px;
  display:flex;
  justify-content: center;
  align-items: center;
  gap:24px;
  position: absolute;
  bottom: 15px;
  z-index: 0;
  width: 100%;
  left: 0;
}

.bottombar__button {
  width: 64px;
  height: 64px;
  border-radius:100%;
  background:white; 
  padding:16px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
  transition:.4s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottombar__button-info{
  width: 44px;
  height: 44px;
  padding:10px;
}

.bottombar__button:hover {
  cursor:pointer;
  opacity:0.8;
}

.bottombar__button > img{
  max-width: 90%;
  max-height: 90%;
}

.profile--match {
  transition: var(--transition-time);
  transform:translateX(1500px) translateY(600px) rotate(90deg);
}

.profile--next {
  transition: var(--transition-time);
  transform:translateX(-1500px) translateY(600px) rotate(-90deg);
}

.profile--back {
  transition:var(--transition-time);
  background-color: #e7918d;
}

.profile--matching::after, .profile--nexting::after, .profile--matching-btn::after, .profile--nexting-btn::after {
  content:'MATCH';
  font-weight: bold;
  font-size:28px;
  padding:8px 12px;
  border:solid 2px var(--green);
  color:var(--green);
  background:var(--black-transparent);
  position:absolute;
  top:24px;
  right:12px;
  border-radius: 4px;
  transform:rotate(24deg);
} 

.profile--nexting::after, .profile--nexting-btn::after {
  content:'NEXT';
  border:solid 2px var(--red);
  color:var(--red);
}

.topbar{
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Pop-up styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: start;
  justify-content: center;
  z-index: 100;
  padding: 100px 0;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 1rem;
  border-radius: 12px;
  max-width: 90%;
  width: 400px;
  max-height: 75vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 0.8rem;
  font-size: 2rem;
  cursor: pointer;
  color: #888;
}
#match-list .match-item {
  border-bottom: 1px solid #eee;
  padding: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.match-prets{
  border-bottom: 1px solid #eee;
  padding-bottom: 30px;
  font-size: 0.8rem;
}

#match-list .match-item:last-child {
  border-bottom: none;
}
.match-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 50%; }
.match-info { flex: 1; }
.match-info a { display: inline-block; margin-top: 4px; color: #007c8c; font-size: 0.9rem; }
.match-remove {
  cursor: pointer;
  font-size: 1.2rem;
  height: 15px;
  width: 15px;
  background-size: contain;
  background-repeat: no-repeat;
  background-image: url("/images/icon-delete.svg");
  padding-left: 8px;
  opacity: 0.7;
}
.match-remove:hover {
  opacity: 1;
}

/* Didacticiel - Onboarding */
.onboarding {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: white;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px); /* pour Safari */
}

.onboarding-slide {
  position: absolute;
  width: 100%;
  max-width: 90%;
  text-align: center;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.4s ease;
}

.onboarding-slide.active {
  opacity: 1;
  transform: translateX(0);
  z-index: 2;
}

.onboarding-slide h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.onboarding-slide p {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.onboarding-slide a {
  color: #FF5252;
  text-decoration: underline;
  font-weight: bold;
}

.onboarding-slide button {
  background:#FF5252;
  color: white;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.onboarding-slide button:hover {
  background: #FF5252;
}

#profileDetail .modal-content {
  max-width: 600px;
  margin: auto;
  padding: 2rem;
  background: white;
  border-radius: 10px;
}
#profileDetail img {
  border-radius: 10px;
}
