/* --------------------------
   VARIABLES COULEURS
-------------------------- */
:root {
  --vert: #02554a;
  --rose: #fdecee;
  --rouge: #f9b342;
  --creme: #ee754d;
  --blanc: #ffffff;
  --noir: #000000;
}

/* --------------------------
   RESET
-------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: "montserrat", sans-serif;
  font-weight: 500;
  font-style: normal;
  line-height: 1.6;
  background-color: var(--creme);
  color: var(--vert);
}

main {
  padding: 8rem 2rem 2rem;
}

/* --------------------------
   Typographies
-------------------------- */
h1,
h2,
h3 {
  font-family: "sweet-and-salty", sans-serif;
font-weight: 400;
font-style: normal;
  text-transform: uppercase;
  color: var(--vert);
  letter-spacing: 1px;
}

h1.variant-gig {
  font-family: "gigalypse", sans-serif;
  font-weight: 800;
}

h1.variant-rosso {
  font-family: "artigo-display", serif;
  font-weight: 700;
}

p {
  font-family: "montserrat", sans-serif;
  font-weight: 500;
  font-style: normal;
}

/* --------------------------
   Grille de fond (carrelage)
-------------------------- */
.bg-quadrillage {
  background-color: #fdfcf7;
  background-image: url("img/Motif.svg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  width: 100%;
  height: auto;
}

/* --------------------------
   Navigation
-------------------------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--rose);
  padding: 1rem 2rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav ul li a {
  text-decoration: none;
  font-family: "fatfrank", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 1.1rem;
  color: var(--vert);
  transition: 0.3s;
}

nav ul li a:hover {
  color: var(--rouge);
}

/* Burger menu */
.menu-icon {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
}

.menu-icon span {
  width: 25px;
  height: 3px;
  background: var(--rouge);
  border-radius: 2px;
  transition: 0.3s;
}

#menu-toggle {
  display: none;
}

/* Responsive burger */
@media screen and (max-width: 768px) {
  nav ul {
    position: absolute;
    top: 53px;
    right: 0;
    background: var(--rose);
    flex-direction: column;
    width: 100%;
    padding: 1rem;
    gap: 1rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    text-align: center;
  }

  #menu-toggle:checked~ul {
    transform: translateX(0);
  }

  .menu-icon {
    display: flex;
  }
}

#menu-toggle:checked+.menu-icon span:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}
#menu-toggle:checked+.menu-icon span:nth-child(2) {
  opacity: 0;
}
#menu-toggle:checked+.menu-icon span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

/* --------------------------
   Hero
-------------------------- */
.hero {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

.hero-text {
  max-width: 600px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-family: "gigalypse", sans-serif;
  font-weight: 800;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  line-height: 1.4;
}

/* --------------------------
   Filtres Portfolio
-------------------------- */
.filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  position: relative;
  z-index: 1;
}

.filters button {
  background: var(--rouge);
  color: var(--blanc);
  font-family: 'Rosso Alt Regular', sans-serif;
  padding: 0.8rem 1.8rem;
  border-radius: 40px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filters button:hover {
  transform: translate(-4px, -4px);
}

.filters button.active {
  background: var(--rose);
  color: var(--vert);
}

/* --------------------------
   Bouton style sticker
-------------------------- */
.btn {
  display: inline-block;
  background: var(--rouge);
  color: var(--blanc);
  font-family: 'Rosso Alt Regular', sans-serif;
  padding: 1rem 2rem;
  border-radius: 40px;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--vert);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  transform: translate(-4px, -4px);
  box-shadow: 6px 6px 0 var(--rose);
}

/* --------------------------
   Portfolio / GRID
-------------------------- */
.portfolio-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
}

.project-card {
  width: 350px;
  flex: 0 0 auto;
  background: var(--blanc);
  border-radius: 20px;
  padding: 1rem;
  text-align: center;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.project-card img {
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 1rem;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.project-card:hover {
  transform: translateY(-6px);
}

.project-card.is-hidden {
  display: none;
}

/* --------------------------
   Modal
-------------------------- */
.modal-content {
  display: flex;
  flex-direction: row;
  background: var(--blanc);
  border-radius: 1rem;
  width: 90%;
  max-width: 900px;
  height: min(60vh, 720px);
  overflow: hidden;
  position: relative;
}

.modal-left {
  flex: 0 0 60%;
  max-width: 60%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9f9f9;
  overflow: hidden;
  position: relative;
}

.slide-container {
  display: flex;
  flex: 1;
  height: 100%;
  transform: translateX(0);
  transition: transform 0.4s ease;
}

.slide-container img,
.slide-container video {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  object-fit: cover;
  display: block;
}

.modal-right {
  flex: 0 0 40%;
  max-width: 40%;
  padding: 2rem;
  overflow-y: auto;
  background: var(--blanc);
  align-content: flex-start;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#prev,
#next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 50%;
  z-index: 10;
}

#prev { left: 10px; }
#next { right: 10px; }

#modal-title { padding-bottom: 1rem; }
.close { position: absolute; top: 10px; right: 15px; font-size: 2rem; cursor: pointer; z-index: 10; }

/* --------------------------
   Footer
-------------------------- */
footer {
  background: var(--rose);
  color: var(--blanc);
  font-family: "montserrat", sans-serif;
  font-weight: 500;
  font-style: normal;
}

footer a { color: var(--vert); text-decoration: none; }
footer a:hover { color: var(--rouge); }

.footer-top {
  display: grid;
  gap: 2rem;
  padding: 3rem 2rem;
  text-align: center;
}

.footer-section h3 {
  margin-bottom: 1rem;
  font-family: "fatfrank", sans-serif;
  font-weight: 400;
  font-style: normal;
  text-transform: uppercase;
  color: var(--vert);
}

.footer-section p,
.footer-section li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--vert);
}

.footer-section ul { list-style: none; padding: 0; }

.social-icons a { font-size: 1.5rem; margin-right: 1rem; display: inline-block; }
.social-icon a { font-size: 1.5rem; margin: 0 1rem; }

.footer-section form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.footer-section input[type="email"] {
  padding: 0.5rem 1rem;
  border-radius: 30px;
  border: none;
  flex: 1 1 auto;
}
.footer-section button {
  padding: 0.5rem 1.5rem;
  border-radius: 30px;
  border: none;
  background: var(--rouge);
  color: var(--blanc);
  cursor: pointer;
  transition: all 0.2s ease;
}
.footer-section button:hover {
  background: var(--rose);
  color: var(--vert);
  transform: translate(-2px, -2px);
}

.footer-bottom {
  text-align: center;
  padding: 1rem 2rem;
  background: rgba(0,0,0,0.1);
  font-size: 0.9rem;
  color: var(--vert);
}

/* --------------------------
   Responsive
-------------------------- */
@media screen and (max-width: 1024px) {
  .portfolio-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }
}

@media screen and (max-width: 768px) {
  nav { flex-direction: column; }
  nav ul { gap: 1rem; }

  .portfolio-grid { grid-template-columns: 1fr; }
  .project-card { padding: 1rem; }
  .project-card img { height: auto; }

  .hero { padding: 2rem 1rem; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 0.95rem; }

  .btn { padding: 0.7rem 1.2rem; }

  /* MODAL MOBILE */
  .modal-content {
    flex-direction: column;
    height: 90vh;
    align-items: flex-start; /* commence en haut */
  }
  .modal-left,
  .modal-right {
    flex: 0 0 auto;
    max-width: 100%;
  }
  .modal-left { height: 55vh; }
  .modal-right { height: 35vh; overflow-y: auto; }
}