/*** CSS RESET ***/

/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
* {
  margin: 0;
}

body {
  /* 3. Add accessible line-height */
  line-height: 1.5;
  /* 4. Improve text rendering */
  -webkit-font-smoothing: antialiased;
}

/* 5. Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 6. Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* 7. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 8. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/*
  9. Create a root stacking context
*/
#root,
#__next {
  isolation: isolate;
}

/*** END OF CSS RESET ***/

:root {
  --pink: #cf0dc8;
  --purple: #9142ac;
  --blue-green: #2a4c66;
  --blue-dark: rgb(2, 23, 47);
  --spacing-section: 3rem;
  --spacing-item: 2rem;
}

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/Inter-VariableFont_opsz\,wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Anek Latin";
  src: url("/static/fonts/AnekLatin-VariableFont_wdth\,wght.woff2")
    format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  margin: 0 auto;
  background-color: #f4f4f4;
}

h1,
h2,
h3,
h4,
p {
  color: #fff;
  line-height: 2;
}

h1,
h2,
h3,
h4 {
  font-family: "Anek Latin", sans-serif;
}

p {
  font-family: "Inter", sans-serif;
}

li > p {
  text-decoration: none;
  color: var(--pink);
}
a {
  font-family: "Inter", sans-serif;
}

a:hover {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.to-top a img {
  width: 80px;
  margin: 0 1rem 0 auto;
  border-radius: 10px;
}

.to-top a img:hover {
  border: 1px solid #000;
  border-radius: 6px;
  animation: bounce 0.7s ease-in-out;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-15px);
  }
  50% {
    transform: translateY(-8px);
  }
  75% {
    transform: translateY(-12px);
  }
}

/* -----------PROJETS--------------- */

#home-wrapper {
  width: 100%;
  background-color: var(--blue-green);
  padding-top: 2rem;
}

.blue-title {
  color: #fff;
  background: linear-gradient(to right, #cf0dc8, #0d0d44);
  text-align: center;
  font-size: 2rem;
  font-weight: 600;
  width: 50%;
  padding: 0 30px;
  margin: 5rem auto;
  border-radius: 0 16px 0 16px;
  text-shadow: 0px 1px 4px #000;
}

#projets {
  width: 100%;
  padding: 4rem 0 6rem;
}

#projets-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding-left: 0;
  margin: 0 auto;
}

.projects-item {
  display: block;
  list-style-type: none;
  background-color: var(--blue-dark);
}

.projects-item a {
  display: block;
  text-decoration: none;
}

/* Zoom image au survol */
.project-img-container {
  overflow: hidden;
}

.project-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.projects-item:hover .project-img {
  transform: scale(1.03);
}

/* Caption permanente */
.project-caption {
  padding: 1.2rem 1.5rem 1.5rem;
  background-color: var(--blue-dark);
}

.project-caption h3 {
  font-family: "Anek Latin", sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.3rem;
  line-height: 1.3;
}

.project-stack {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  color: var(--pink);
  letter-spacing: 0.03em;
}

@media (max-width: 1200px) {
  .blue-title {
    margin: 3rem auto;
    font-size: 1.7rem;
  }
}

@media (max-width: 768px) {
  #home-wrapper {
    padding-top: 2rem;
  }

  #projets-container {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .blue-title {
    width: 60%;
    font-size: 1.5rem;
  }
}

@media (max-width: 492px) {
  #projets {
    padding-top: 0;
    padding-bottom: 3rem;
  }

  .project-caption h3 {
    font-size: 1.1rem;
  }

  .blue-title {
    width: 80%;
    font-size: 1.2rem;
  }
}

@media (max-width: 390px) {
  .blue-title {
    width: 90%;
    font-size: 1rem;
    margin-bottom: 3rem;
  }
}

/** SKILLS **/

#skills-section {
  background-color: var(--blue-dark);
  padding: 3rem 2rem 4rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  width: 80%;
  max-width: 1440px;
  margin: 0 auto;
}

.skills-group {
  background-color: var(--blue-green);
  border-radius: 0 16px 0 16px;
  padding: 1.5rem 2rem;
}

.skills-group h3 {
  font-family: "Anek Latin", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--pink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1rem;
  line-height: 1.4;
  border-bottom: 1px solid var(--purple);
  padding-bottom: 0.5rem;
}

.skills-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skills-group ul li {
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  color: #fff;
  line-height: 1.8;
}

/* Surcharge de la règle globale li > p */
.skills-group ul li::before {
  content: "— ";
  color: var(--purple);
}

@media (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    width: 90%;
  }
}

@media (max-width: 540px) {
  .skills-grid {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 1rem;
  }

  #skills-section {
    padding: 2rem 1rem 3rem;
  }
}

/* ---------A PROPOS-------- */

#apropos {
  padding: 4rem;
  margin: 0 auto;
  background-color: var(--purple);
}

#avatar-container {
  display: flex;
  align-items: center;
}

#avatar {
  width: 50%;
}

#avatar > img {
  padding: 4rem;
}

#apropos-text {
  width: 40%;
}

#apropos-text > h2 {
  font-size: 2.5rem;
  color: #fff;
}

#apropos-text > p {
  color: #fff;
  margin-bottom: 2rem;
}

.CV-btn {
  background: #f4f4f4;
  margin: 2rem 0;
  padding: 5px 15px;
  border-radius: 6px;
  border: 1px solid #000;
  text-decoration: none;
  color: #000;
}

.CV-btn:hover {
  background: var(--blue-dark);
  border: 1px solid #fff;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
}

.CV-btn a {
  text-decoration: none;
  color: #000;
}

.CV-btn:hover a {
  color: #fff;
}

@media (max-width: 940px) {
  #avatar > img {
    padding: unset;
  }
}

@media (max-width: 768px) {
  #avatar-container {
    flex-direction: column;
    padding: 0;
  }

  #apropos-text {
    width: unset;
  }
}

@media (max-width: 540px) {
  #apropos {
    padding: 2rem;
  }

  #apropos-text > h2 {
    font-size: 2rem;
  }
}

@media screen and (max-width: 700px) {
  h1 {
    font-size: 4rem;
  }

  .video {
    width: 440px;
    height: 280px;
  }
}

@media screen and (max-width: 492px) {
  main {
    margin-top: 0;
  }

  .skills-wrapper {
    padding: 1rem;
  }

  .home-title-wrap {
    margin-top: 2rem;
  }
  h1 {
    font-size: 3rem;
  }
}

@media screen and (max-width: 370px) {
  h1 {
    font-size: 2rem;
  }
}

/* -----------PROJECT PAGE---------------------- */
#web-sites {
  padding-bottom: 3rem;
}

#site-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  width: 90%;
  margin: 0 auto 4rem;
  padding: 0 1rem;
}

/** GALLERY **/

.wrapper {
  flex: 1 1 calc(50% - 2rem); /* limite pour éviter trop large */
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 10px 10px 30px grey;
}

.project-title {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.project-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #000;
  margin-left: 10px;
  opacity: 0.45;
}

.project-link:hover {
  color: #727272;
}

.project-title-info {
  font-size: 0.6rem;
  color: #524d47;
  margin-top: -20px;
}

.wrapper h3 {
  width: fit-content;
  font-size: 0.9rem;
  background-color: var(--blue-green);
  padding: 0px 10px;
  border-radius: 10px;
  text-shadow: 0px 1px 4px #000;
}

.gallery {
  display: flex;
  overflow: scroll;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: 6px 6px 0 0;
}

.gallery_img_wrapper {
  position: relative;
  scroll-snap-align: start;
  flex: 0 0 100%;
}

.gallery_img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.gallery_text {
  position: absolute;
  top: 65%;
  left: 2%;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.5rem;
  border-radius: 5px;
}

#theater .gallery .gallery_img_wrapper .gallery_text,
#votehub .gallery .gallery_img_wrapper .gallery_text {
  background: rgba(255, 255, 255, 0.9);
}

#theater .gallery .gallery_img_wrapper .gallery_text p,
#theater .gallery .gallery_img_wrapper .gallery_text ul li,
#votehub .gallery .gallery_img_wrapper .gallery_text p {
  color: #000;
}

.gallery_text p,
.gallery_text ul li {
  font-size: 0.7rem;
  line-height: 1.4;
}

#restaurant,
#theater {
  position: relative;
}

.lil-nav {
  position: absolute;
  top: 90%;
  display: flex;
  justify-content: space-between;
  border-radius: 0 0 6px 6px;
  opacity: 0;
  max-height: 0;
  transition:
    opacity 0.4s ease,
    max-height 1s ease;
}

#restaurant:hover .lil-nav {
  opacity: 1;
  max-height: 100px;
}

#theater:hover .lil-nav {
  opacity: 1;
  max-height: 100px;
}

.lil-nav a {
  display: flex;
}

.lil-nav__img {
  object-fit: cover;
  aspect-ratio: 16/9;
  max-height: 85px;
  filter: saturate(0);
  transition: 0.3s ease all;
}

.lil-nav__img:hover {
  transform: scale(1.5);
  filter: saturate(1);
  border-radius: 4px;
  z-index: 10;
}

@media (max-width: 900px) {
  #site-wrapper {
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    padding: 0;
  }
  .wrapper {
    flex: 1 1 100%;
    max-width: 700px;
  }
}

@media (max-width: 1080px) {
  #site-images {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  #project-section-title {
    font-size: 2rem;
  }

  #site-images {
    grid-template-columns: 1fr;
    padding: 0;
    row-gap: 50px;
  }

  #site1 > h3,
  #site2 > h3 {
    font-size: 1.5rem;
  }

  #site1 > h4,
  #site2 > h4 {
    font-size: 1.2rem;
  }
}

@media (max-width: 492px) {
  .wrapper h3 {
    font-size: 0.8rem;
  }

  .gallery_text {
    top: 60%;
    padding: 0.5rem;
  }

  .gallery_text p,
  .gallery_text ul li {
    font-size: 0.5rem;
  }
}

@media (max-width: 370px) {
  .wrapper h3 {
    font-size: 0.3rem;
    padding: 0 0.4px;
  }
}

/*********** AUTRES REALISATIONS *********************/
/* --- AUTRES REALISATIONS --- */

#autres-realisations {
  background-color: var(--blue-dark);
  padding: 3rem 2rem 5rem;
}

.autres-subtitle {
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  color: var(--pink);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: -2rem auto 2.5rem;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.video-card {
  background-color: var(--blue-green);
  border-radius: 0 12px 0 12px;
  overflow: hidden;
}

/* Bouton-miniature */
.video-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  cursor: pointer;
  background: none;
}

.video-poster {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.video-trigger:hover .video-poster {
  opacity: 0.7;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  transition: transform 0.2s ease;
}

.video-trigger:hover .play-icon {
  transform: translate(-50%, -50%) scale(1.2);
}

/* Quand la vidéo est active — remplace la miniature */
.video-trigger.is-playing {
  cursor: default;
}

.video-trigger.is-playing .video-poster {
  display: none;
}

.video-trigger.is-playing .play-icon {
  display: none;
}

.video-trigger.is-playing video {
  display: block;
}

.video-card__body {
  padding: 0.8rem 1rem 1rem;
}

.video-card__body h3 {
  font-family: "Anek Latin", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.3rem;
  line-height: 1.3;
}

.video-tool {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  color: var(--pink);
  letter-spacing: 0.03em;
}

@media (max-width: 1024px) {
  .videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .videos-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  #autres-realisations {
    padding: 2rem 1rem 3rem;
  }
}

/********************** PAGE LEGALE**************************/
.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  line-height: 1.7;
}

.legal-page h1 {
  color: #000;
  font-size: 2rem;
  margin-bottom: 2.5rem;
}

.legal-page h2 {
  color: #000;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.legal-page p {
  color: #000;
  margin: 0 0 0.5rem;
}

.legal-page a {
  color: blue;
}
