/* =================================================================== */
/* #region GENERAL
/* =================================================================== */
:root {
  --primary-color: #03464f;
  --secondary-color: #f3931b;
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --font-main: "Jost", sans-serif;
  --font-secondary: "Montserrat", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--white);
}
/* #endregion */

/* =================================================================== */
/* #region HEADER
/* =================================================================== */
.header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #022a30 100%);
  color: var(--white);
  padding: 2rem 0;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.bubbles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  backdrop-filter: blur(2px);
  animation-name: float;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.bubble-1 {
  width: 150px;
  height: 150px;
  top: 10%;
  left: 5%;
  animation-duration: 15s;
  background: rgba(255, 255, 255, 0.1);
}
.bubble-2 {
  width: 80px;
  height: 80px;
  top: 60%;
  left: 15%;
  animation-duration: 12s;
  animation-direction: reverse;
  background: rgba(255, 255, 255, 0.1);
}
.bubble-3 {
  width: 200px;
  height: 200px;
  top: 30%;
  right: 10%;
  animation-duration: 18s;
  animation-delay: 2s;
  background: rgba(255, 255, 255, 0.1);
}
.bubble-4 {
  width: 100px;
  height: 100px;
  bottom: 20%;
  right: 20%;
  animation-duration: 14s;
  animation-direction: reverse;
  animation-delay: 1s;
  background-color: var(--secondary-color);
  opacity: 0.5;
}
.bubble-5 {
  width: 60px;
  height: 60px;
  top: 20%;
  left: 50%;
  animation-duration: 10s;
  animation-delay: 0.5s;
  background-color: var(--secondary-color);
  opacity: 0.5;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(20px) translateX(-20px);
  }
}

.header .head-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
}

.header .head-content {
  width: 100%;
}
.header .head-text {
  max-width: 700px;
  text-align: left;
}
.header .main-title {
  font-size: clamp(2.5rem, 5vw, 3.3rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 2rem;
  font-family: var(--font-secondary);
}
.header .title-word {
  display: block;
  opacity: 0;
  transform: translateY(20px);
}
.header .title-word-1 {
  animation: fadeInUp 0.8s ease-out 0.1s forwards;
}
.header .title-word-3 {
  animation: fadeInUp 0.8s ease-out 0.5s forwards;
  color: var(--secondary-color);
}
.header .divider {
  width: 100px;
  height: 4px;
  background: var(--secondary-color);
  margin: 2rem 0;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  animation: scaleIn 0.8s ease-out 1s forwards;
}
.header .subtitle {
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0;
  animation: fadeIn 1s ease-out 1.2s forwards;
  max-width: 600px;
  margin: 2rem 0;
}

.header .cta-buttons {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.header .cta-primary,
.header .cta-secondary {
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  opacity: 0;
}
.header .cta-primary {
  background: var(--secondary-color);
  color: var(--primary-color);
  animation: fadeIn 0.8s ease-out 1.4s forwards;
}
.header .cta-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
  animation: fadeIn 0.8s ease-out 1.6s forwards;
}
.header .cta-primary:hover,
.header .cta-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.header .social-links {
  display: flex;
  gap: 1.5rem;
}
.header .social-link {
  color: var(--white);
  font-size: 1.4rem;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(10px);
}
.header .social-link:hover {
  color: var(--secondary-color);
  transform: translateY(-5px) scale(1.1);
}
.header .social-link:nth-child(1) {
  animation: fadeInUp 0.5s ease-out 1.8s forwards;
}
.header .social-link:nth-child(2) {
  animation: fadeInUp 0.5s ease-out 2s forwards;
}
.header .social-link:nth-child(3) {
  animation: fadeInUp 0.5s ease-out 2.2s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
@keyframes scaleIn {
  to {
    transform: scaleX(1);
  }
}
/* #endregion */

/* =================================================================== */
/* #region CONTENEUR GLOBAL & TITRES
/* =================================================================== */
.main-container {
  width: 95%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
}
/* #endregion */

/* =================================================================== */
/* #region NAVIGATION DU PORTFOLIO (FILTRES)
/* =================================================================== */
.portfolio-nav {
  padding: 4rem 0 3rem;
  text-align: center;
}
.portfolio-nav .portfolio-header {
  margin-bottom: 2.5rem;
}
.portfolio-nav .portfolio-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0.8rem;
}
.portfolio-nav .portfolio-title span {
  color: var(--secondary-color);
}
.portfolio-nav .portfolio-subtitle {
  color: #555;
  font-size: 1.3rem;
  max-width: 700px;
  margin: 0 auto 1rem;
}
.portfolio-nav .filter-options {
  display: inline-flex;
  gap: 1rem;
  background: rgba(3, 70, 79, 0.05);
  padding: 0.8rem;
  border-radius: 50px;
  margin-top: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.portfolio-nav .filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  background: transparent;
  border: none;
  border-radius: 50px;
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.portfolio-nav .filter-btn:hover,
.portfolio-nav .filter-btn.active {
  color: var(--white);
  background: var(--secondary-color);
}
/* #endregion */

/* =================================================================== */
/* #region GALERIE MASONRY (Affiches, Logos, Templates)
/* =================================================================== */
.masonry-container {
  padding: 2rem 0 4rem 0;
}

/* NOUVEAU CODE CSS GRID */
.masonry-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.masonry-item {
  width: 100%;
  margin-bottom: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  position: relative;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  transition: transform 0.3s ease, opacity 0.3s ease;
  background-color: #eee;
}

.masonry-item img {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.4s ease;
  object-fit: cover;
}

.masonry-item:hover img {
  transform: scale(1.05);
}

.masonry-item.item-logo {
  height: 280px;
}
.masonry-item.item-logo img {
  height: 100%;
  object-fit: cover;
}
.item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  padding: 20px 15px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  pointer-events: none;
}
.masonry-item:hover .item-overlay {
  opacity: 1;
  pointer-events: all;
}
.item-stats {
  color: white;
  font-size: 14px;
  display: flex;
  gap: 15px;
  align-items: center;
}
.stat-item,
.like-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.like-btn {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  font-size: 14px;
}
.like-btn .fa-heart {
  transition: color 0.3s ease, transform 0.3s ease;
}
.like-btn.liked .fa-heart {
  color: #ff4d4d;
}
/* #endregion */

/* =================================================================== */
/* #region SECTION SITES WEB (CARTES)
/* =================================================================== */
.website-container {
  padding: 2rem 0 4rem 0;
}
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(3, 70, 79, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(3, 70, 79, 0.15);
}
.card-image-link {
  display: block;
  text-decoration: none;
}
.card-preview {
  position: relative;
  height: 200px;
  overflow: hidden;
  background-color: #e9ecef;
}
.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card-image {
  transform: scale(1.05);
}
.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 70, 79, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card:hover .card-overlay {
  opacity: 1;
}
.view-text {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 8px 16px;
  border: 2px solid #fff;
  border-radius: 50px;
  backdrop-filter: blur(2px);
}
.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.card-badge {
  background: var(--secondary-color);
  color: var(--primary-color);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  align-self: flex-start;
  margin-bottom: 1rem;
}
.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--primary-color);
  font-family: var(--font-secondary);
}
.card-description {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}
.card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--primary-color);
  color: #fff;
  padding: 12px 24px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
  margin-top: auto;
}
.card-btn:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}
.card-btn i {
  font-size: 0.9em;
}
/* #endregion */

/* =================================================================== */
/* #region FENÊTRE MODALE (LIGHTBOX)
/* =================================================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.92);
  animation: fadeIn 0.3s;
}
.modal-content-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
}
.modal-content {
  max-width: 85%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
}
.logo-modal-info {
  margin-top: 15px;
  text-align: center;
  color: white;
}
#caption {
  font-size: 18px;
  color: #ccc;
}
.logo-likes {
  margin-top: 10px;
  color: #ff4d4d;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}
.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  padding: 16px;
  margin-top: -22px;
  color: white;
  font-size: 24px;
  background-color: rgba(0, 0, 0, 0.3);
  user-select: none;
  transition: 0.3s;
}
.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}
.prev {
  left: 0;
  border-radius: 0 3px 3px 0;
}
.prev:hover,
.next:hover,
.close:hover {
  color: var(--secondary-color);
}
/* #endregion */

/* =================================================================== */
/* #region RESPONSIVE
/* =================================================================== */
@media (max-width: 1254px) {
  .header .head-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
  }
  .header .divider,
  .header .cta-buttons,
  .header .social-links {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }

  .header .subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0;
    animation: fadeIn 1s ease-out 1.2s forwards;
    max-width: 600px;
    margin: 2rem auto;
  }
}

@media (max-width: 1454px) {
  .masonry-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  /* Header sur tablette */
  .header {
    min-height: 80vh;
  }
  .header .head-text {
    text-align: center;
  }
  .header .cta-buttons {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  /* Filtres sur tablette */
  .portfolio-nav .filter-options {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
    width: 90%;
    border-radius: 20px;
  }
  .portfolio-nav .filter-btn {
    padding: 0.8rem 1rem;
    font-size: 1rem;
  }
}

/* ===================================================================
   NOUVELLES RÈGLES SPÉCIFIQUES POUR LES PETITS ÉCRANS MOBILES (ex: iPhone)
   ===================================================================
*/
@media (max-width: 576px) {
  .masonry-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }

  /* FORCER LES LOGOS SUR 1 COLONNE */
  .masonry-item[data-category="logos"] {
    grid-column: 1 / -1;
  }

  /* FORCER LES SITES WEB SUR 1 COLONNE */
  .cards-container {
    grid-template-columns: 1fr;
  }

  .masonry-item[data-category="affiches"],
  .masonry-item[data-category="templates"] {
  }
}
/* #endregion */
