@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Dancing+Script:wght@700&family=Fredoka:wght@600;800&display=swap");

/* Reset et configuration de base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Classe pour masquer visuellement mais garder accessible aux lecteurs d'écran */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Html principal */
html {
  min-height: 100%;
  overscroll-behavior-y: none;
  overscroll-behavior-x: none;
}

/* Body principal */
body {
  font-family: "Fredoka";
  background-color: #f1c4e2;
  background-image: url("../Media/PageLayout/BackgroundLight.jpeg");
  background-repeat: repeat;
  background-size: 100%;
  background-attachment: scroll;
  background-position: top left;
  min-height: 100vh;
  width: 100%;
  color: #000000;
  display: flex;
}

/* Typographie de base */
h1 {
  font-family: "Bebas Neue", sans-serif;
  color: #000000;
  font-size: 3rem;
  text-align: left;
  margin-bottom: 1rem;
}

h2 {
  font-family: "Bebas Neue", sans-serif;
  color: #000000;
  font-size: 3rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  text-align: left;
}

p {
  font-size: 1rem;
  text-align: left;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* Main content */
main {
  flex: 1;
  min-width: 0;
  min-height: calc(100vh - 120px);
}

#footer-placeholder {
  min-height: 60px;
}

/* Sections générales */
section {
  padding: 2rem 2rem;
  position: relative;
}

/* Canvas Lottie */
#dotlottie-canvas {
  position: fixed;
  bottom: 20px;
  right: 0;
  width: 300px;
  z-index: 1000;
}

/* Container switch langue */
.switch-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* Labels FR/EN dans le slider */
.lang-switch .slider .lang-fr,
.lang-switch .slider .lang-en {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  font-weight: 700;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
  color: #000000;
}

.lang-switch .slider .lang-fr {
  left: 0.6em;
  opacity: 1;
}

.lang-switch .slider .lang-en {
  right: 0.6em;
  opacity: 0.3;
}

/* Quand la langue anglaise est activée */
.lang-switch input:checked + .slider .lang-fr {
  opacity: 0.3;
}

.lang-switch input:checked + .slider .lang-en {
  opacity: 1;
}

/* Switch général */
.switch {
  font-size: 1rem;
  position: relative;
  display: inline-block;
  width: 3.5em;
  height: 2em;
  cursor: pointer;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Slider switch en mode sombre */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #fdfefedc;
  transition: 0.4s;
  border-radius: 30px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 1.4em;
  width: 1.4em;
  left: 0.3em;
  bottom: 0.35em;
  transition: 0.4s;
  border-radius: 50%;
  box-shadow:
    rgba(0, 0, 0, 0.17) 0px -10px 10px 0px inset,
    rgba(0, 0, 0, 0.09) 0px -1px 15px -8px;
  background-color: #ff99fd;
  background-image:
    radial-gradient(at 81% 39%, hsla(327, 79%, 79%, 1) 0px, transparent 50%),
    radial-gradient(at 11% 72%, hsla(264, 64%, 79%, 1) 0px, transparent 50%),
    radial-gradient(at 23% 20%, rgb(247, 248, 243) 0px, transparent 50%);
  z-index: 1;
}

#LanguageSwitch:checked + .slider:before {
  transform: translateX(1.5em);
}

#ThemeSwitch:checked + .slider::before {
  transform: translateX(1.5em);
}

/* Icônes soleil et lune à l'intérieur du slider */
.theme-switch .slider .sun-icon,
.theme-switch .slider .moon-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.theme-switch .slider .sun-icon {
  left: 0.35em;
  opacity: 1;
}

.theme-switch .slider .moon-icon {
  right: 0.35em;
  opacity: 0.3;
}

/* Couleurs des icônes en mode lumineux (plus foncé pour visibilité) */
.theme-switch .slider .sun-icon {
  stroke: #000000;
}

.theme-switch .slider .moon-icon {
  stroke: #666666;
}

/* Quand le thème sombre est activé */
.theme-switch input:checked + .slider .sun-icon {
  opacity: 0.3;
}

.theme-switch input:checked + .slider .moon-icon {
  opacity: 1;
}

/* =================== HERO HOME =================== */

#Welcome {
  padding: 0;
  backdrop-filter: none;
  display: flex;
  height: 100vh;
  width: 100%;
}

.hero-banner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1rem, 3vh, 2rem) clamp(1rem, 3vw, 2.5rem);
  position: relative;
  overflow: hidden;
  height: 100%;
}

/* Barre supérieure */
.hero-top {
  display: flex;
  justify-content: space-between;
  z-index: 2;
}

.hero-label {
  font-family: "Fredoka", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #000000;
  letter-spacing: 0.01em;
}

/* Titre central superposé */
.hero-center {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.hero-title-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(5rem, 22vw, 24rem);
  font-weight: 400;
  color: #f0eaf8;
  line-height: 0.82;
  letter-spacing: -0.01em;
  text-align: center;
  text-decoration: none;
  backdrop-filter: none;
  margin: 0;
  padding: 0;
  width: 100%;
  user-select: none;
}

.hero-name {
  font-family: "Dancing Script", cursive;
  font-size: clamp(1.5rem, 5vw, 5rem);
  font-weight: 700;
  color: #000000;
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: auto;
}

/* Étoiles décoratives */
.sparkle {
  position: absolute;
  color: #f0eaf8;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

@keyframes sparkle-twinkle {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.2) rotate(20deg);
  }
}

.sparkle-1 {
  top: 18%;
  left: 6%;
  font-size: 2rem;
  animation: sparkle-twinkle 3.2s ease-in-out infinite 0s;
}
.sparkle-2 {
  top: 12%;
  right: 12%;
  font-size: 2.8rem;
  animation: sparkle-twinkle 3.2s ease-in-out infinite 0.7s;
}
.sparkle-3 {
  bottom: 28%;
  left: 12%;
  font-size: 1.2rem;
  animation: sparkle-twinkle 3.2s ease-in-out infinite 1.4s;
}
.sparkle-4 {
  bottom: 22%;
  right: 8%;
  font-size: 1.6rem;
  animation: sparkle-twinkle 3.2s ease-in-out infinite 2.1s;
}
.sparkle-5 {
  top: 42%;
  left: 3%;
  font-size: 0.9rem;
  animation: sparkle-twinkle 3.2s ease-in-out infinite 2.8s;
}

/* Barre sociale */
.hero-bottom {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.hero-social {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: #000000;
  font-family: "Fredoka", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1.5px solid rgba(26, 19, 51, 0.35);
  background: #ffcff59d;
  transition:
    background 0.25s ease,
    transform 0.25s ease;
  white-space: nowrap;
}

.hero-social:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-3px);
}

/* =================== ABOUT SECTION =================== */

#about {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 5rem;
}

p.about-text {
  font-size: 1.2rem;
  text-align: left;
  margin-bottom: 0.2rem;
}

#about .Languages {
  grid-column: 1 / -1;
}

.about-card {
  padding: 1.5rem;
  border-radius: 16px;
  background: #ffcff59d;
  backdrop-filter: blur(2px);
  border: 1.5px solid rgba(26, 19, 51, 0.35);
  opacity: 0;
  transform: translateY(100px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.about-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

/* Lien Holberton intégré dans le texte */
.holberton-link {
  color: #ff6eb4;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

.holberton-link:hover {
  color: #ffffff;
  border-bottom: 1px solid #ffffff;
}

.Languages {
  padding-top: 2rem;
  opacity: 0;
  transform: translateY(100px);
}

.Languages.visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

/* Certifications bouton */
.certif-btn {
  margin-top: 1rem;
  cursor: pointer;
  font-family: "Fredoka", sans-serif;
  align-self: center;
}

/* Encadré disponibilité recruteurs */
.availability-banner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  border-left: 4px solid #ff6eb4;
  border-radius: 0 10px 10px 0;
  background: rgba(255, 110, 180, 0.1);
  font-family: "Fredoka", sans-serif;
}

.availability-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1a1333;
}

.availability-item svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

/* Certifications modale */
.certif-modal-box {
  width: min(700px, 95vw);
  max-height: 92vh;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow: hidden;
}

.certif-modal-title {
  text-align: center;
  margin: 0;
}

.certif-carousel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: 0;
}

.certif-carousel-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 0;
}

.certif-carousel .carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.certif-carousel .certif-prev {
  left: 4px;
}

.certif-carousel .certif-next {
  right: 4px;
}

.certif-carousel-track {
  display: flex;
  width: 100%;
  transition: transform 0.35s ease;
}

.certif-slide {
  min-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.certif-slide img {
  width: 100%;
  max-height: min(52vh, 400px);
  object-fit: contain;
  border-radius: 12px;
  cursor: pointer;
}

.certif-slide p {
  font-family: "Fredoka", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #000;
  margin: 0;
}

.certif-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-height: 10px;
  padding-bottom: 0.4rem;
}

/* Technologies container */
.technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 1rem 0;
  max-width: 100%;
}

p.tech-label {
  color: #000000;
  font-size: 0.9rem;
  text-align: center;
}

/* Cards technologies */
.tech-card {
  width: 150px;
  height: 150px;
  min-width: 90px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #ffcff59d;
  backdrop-filter: blur(4px);
  border: 1.5px solid rgba(26, 19, 51, 0.35);
  padding: 0.5rem;
  opacity: 0;
  transform: translateY(100px);
}

.tech-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.tech-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(255, 207, 245, 0.3);
}

.tech-card img {
  width: clamp(25px, 8vw, 40px);
  height: clamp(25px, 8vw, 40px);
  object-fit: contain;
  margin-bottom: 0.3rem;
}

/* =================== PROJETS GRILLE =================== */

#projects {
  padding: 2rem;
}

#projects h2:not(.modal-title) {
  opacity: 0;
  transform: translateY(100px);
}

#projects h2.visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.project-square {
  max-width: 400px;
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(100px);
  transition: box-shadow 0.3s ease;
  border: 1.5px solid rgba(26, 19, 51, 0.35);
}

.project-square.visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease,
    box-shadow 0.3s ease;
}

.project-square:hover,
.project-square:focus {
  transform: scale(1.04);
  box-shadow: 0 12px 40px rgba(255, 110, 180, 0.4);
  outline: none;
}

.project-square-label {
  position: absolute;
  bottom: 14px;
  left: 16px;
  font-family: "Fredoka", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #000;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.5);
  z-index: 1;
  pointer-events: none;
}

.project-square-year {
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: "Fredoka", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #000;
  background: rgba(255, 255, 255, 0.5);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  z-index: 1;
  pointer-events: none;
}

.project-square-hover {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.project-square:hover .project-square-hover,
.project-square:focus .project-square-hover {
  opacity: 1;
}

.project-square-hover span {
  font-family: "Fredoka", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  text-shadow:
    0 0 10px #ffcff5,
    0 0 25px #ff99fd;
}

/* =================== MODALE =================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  box-sizing: border-box;
  isolation: isolate;
}

.modal-overlay.hidden-modal {
  display: none;
}

.modal-box {
  background: #ffcff5;
  border-radius: 20px;
  width: min(920px, 95vw);
  min-height: 300px;
  max-height: 88vh;
  overflow: hidden;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  opacity: 1;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #666;
  z-index: 10;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.08);
}

.modal-body {
  display: flex;
  height: 100%;
  overflow: hidden;
}

/* Côté gauche : carousel */
.modal-carousel {
  position: relative;
  flex: 0 0 55%;
  overflow: hidden;
  background: #ffcff5;
  display: flex;
  align-items: stretch;
}

.modal-carousel-track {
  display: flex;
  width: 100%;
  transition: transform 0.35s ease;
}

.modal-carousel-slide {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.modal-carousel-placeholder {
  width: 100%;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Fredoka", sans-serif;
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.3);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  z-index: 2;
  background: none;
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

.modal-prev {
  left: 10px;
}
.modal-next {
  right: 10px;
}

.modal-carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.modal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 0.2s;
}

.modal-dot.active {
  background: #000000;
}

/* Côté droit : infos */
.modal-info {
  flex: 1;
  padding: 2rem 1.8rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
}

.modal-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  margin: 0;
  color: #000000;
  padding-right: 2rem;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.modal-tag {
  font-family: "Fredoka", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.671);
  background: rgba(0, 0, 0, 0.075);
  color: #000000;
}

.modal-desc {
  font-family: "Fredoka", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #000000;
  flex: 1;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.modal-github,
.modal-deploy {
  align-self: flex-start;
  border: 1px solid rgba(0, 0, 0, 0.671);
  background: rgba(0, 0, 0, 0.075);
}

.modal-github img {
  width: 20px;
  height: 20px;
}

/* Footer */
footer {
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  background: #ffcff59d;
}

/* Footer credits */
.footer-credits {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  max-width: 1200px;
  margin: 0 auto;
}

footer p {
  margin: 0;
  color: #000;
  opacity: 0.85;
}

.footer-text {
  font-size: 0.9rem;
  color: #ffffff;
}

/* =================== Dark Theme =================== */

/* Body principal en mode sombre */
body.dark-theme {
  background-image: url("../Media/PageLayout/BackgroundDark.jpeg");
  color: #ffcff5;
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme p {
  color: #ffcff5;
}

/* Labels langue en mode sombre */
body.dark-theme .lang-switch .slider .lang-fr,
body.dark-theme .lang-switch .slider .lang-en {
  color: #ffcff5;
}

/* États checked des switches en mode sombre */
body.dark-theme .lang-switch .slider {
  background-color: #000;
}

body.dark-theme #LanguageSwitch:checked + .slider {
  background-color: #000;
}

body.dark-theme #ThemeSwitch:checked + .slider {
  background-color: #000;
}

/* Icônes soleil/lune en mode sombre avec couleurs roses */
body.dark-theme .theme-switch .slider .sun-icon {
  opacity: 0.3;
  stroke: #ffcff5;
}

body.dark-theme .theme-switch .slider .moon-icon {
  opacity: 1;
  stroke: #ffcff5;
}

body.dark-theme footer {
  background: rgba(0, 0, 0, 0.075);
}

body.dark-theme .footer-text {
  color: #ffffff;
}

/* =================== HERO HOME =================== */

/* Dark theme overrides */
body.dark-theme .hero-label {
  color: #e8dff8;
}

body.dark-theme .hero-name {
  color: #f0eaf8;
}

body.dark-theme .hero-social {
  color: #ffcff5;
  border-color: rgba(240, 234, 248, 0.4);
  background: rgba(0, 0, 0, 0.3);
}

body.dark-theme .hero-social:hover {
  background: #ffcff550;
}

/* =================== ABOUT SECTION =================== */

body.dark-theme .about-card {
  border-color: rgba(243, 240, 247, 0.4);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}

body.dark-theme .certif-btn {
  border-color: rgba(240, 234, 248, 0.8);
}

body.dark-theme .availability-banner {
  background: #ffcff536;
  border-left-color: #ffcff5;
}

body.dark-theme .availability-item,
body.dark-theme .certif-slide p {
  color: #ffcff5;
}

body.dark-theme .tech-card {
  border-color: rgba(243, 240, 247, 0.4);
  background: rgba(0, 0, 0, 0.075);
}

body.dark-theme .project-square {
  border-color: rgba(243, 240, 247, 0.4);
}

body.dark-theme .project-square-label {
  color: #ffcff5;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

body.dark-theme .project-square-year {
  color: #ffcff5;
  background: rgba(0, 0, 0, 0.4);
}

body.dark-theme .modal-box {
  background: #000000;
  border: 1.5px solid rgba(255, 207, 245, 0.2);
}

body.dark-theme .modal-carousel {
  background: #000000;
}

body.dark-theme .carousel-btn {
  color: #ffcff5;
}

body.dark-theme .modal-dot {
  background: rgba(255, 255, 255, 0.4);
}

body.dark-theme .modal-dot.active {
  background: #ffcff5;
}

body.dark-theme .modal-close {
  color: #ffcff5;
}

body.dark-theme .modal-title {
  color: #ffcff5;
}

body.dark-theme .modal-github,
body.dark-theme .modal-deploy {
  background: rgba(255, 207, 245, 0.2);
}

body.dark-theme .modal-tag {
  background: rgba(255, 207, 245, 0.2);
  color: #ffcff5;
}

/* =================== RESPONSIVE =================== */

/* <= 1200px */
@media (max-width: 1200px) {
  .technologies {
    gap: 0.8rem;
  }

  footer {
    padding: 0.5rem 1rem;
  }

  .footer-credits {
    gap: 0.3rem;
  }
}

/* <= 992px */
@media (max-width: 992px) {
  /* Titres: même échelle responsive sur tous les h2 */
  h2 {
    font-size: 2.5rem;
  }

  /* Cards visuellement carrées: comportement aligné */
  .tech-card,
  .project-square {
    border-radius: 16px;
  }

  .technologies {
    gap: 0.6rem;
  }

  .tech-card {
    width: 100px;
    height: 100px;
  }

  .tech-card img {
    width: 35px;
    height: 35px;
  }

  #about {
    grid-template-columns: 1fr;
  }

  footer {
    padding: 0.8rem 1rem;
    font-size: 0.75rem;
  }

  .footer-text {
    font-size: 0.85rem;
  }
}

/* <= 768px */
@media (max-width: 768px) {
  h2 {
    font-size: 2.2rem;
  }

  .technologies {
    gap: 0.5rem;
    padding: 1rem 0;
  }

  .tech-card {
    width: 90px;
    height: 90px;
  }

  .tech-card img {
    width: 30px;
    height: 30px;
  }

  footer {
    padding: 1rem 0.8rem;
    font-size: 0.7rem;
    margin-top: 1.5rem;
  }

  .footer-credits {
    gap: 0.4rem;
  }

  footer p {
    line-height: 1.4;
  }

  .footer-text {
    font-size: 0.8rem;
    text-align: center;
  }
}

/* <= 700px */
@media (max-width: 700px) {
  /* Modal certifications */
  .certif-modal-box {
    width: min(700px, 96vw);
    padding: 1.2rem;
    gap: 0.9rem;
  }

  .certif-slide img {
    max-height: 46vh;
  }

  .hero-bottom {
    gap: 0.5rem;
  }

  .hero-social span {
    display: none;
  }

  .hero-social {
    padding: 0.5rem 0.7rem;
  }

  .sparkle-1 {
    font-size: 1.4rem;
  }

  .sparkle-2 {
    font-size: 1.8rem;
  }

  .sparkle-3 {
    font-size: 0.9rem;
  }

  .sparkle-4 {
    font-size: 1rem;
  }

  .sparkle-5 {
    font-size: 0.7rem;
  }

  .modal-body {
    flex-direction: column;
  }

  .modal-carousel {
    flex: none;
    width: 100%;
    min-height: 220px;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* <= 576px */
@media (max-width: 576px) {
  h2 {
    font-size: 1.9rem;
  }

  .tech-card,
  .project-square {
    border-radius: 14px;
  }

  .technologies {
    gap: 0.4rem;
  }

  .tech-card {
    width: 80px;
    height: 80px;
  }

  .tech-card img {
    width: 25px;
    height: 25px;
  }

  #about {
    padding: 1rem;
  }

  footer {
    padding: 1rem 0.5rem;
    font-size: 0.65rem;
    margin-top: 1rem;
    text-align: center;
  }

  .footer-credits {
    gap: 0.5rem;
    text-align: center;
  }

  footer p {
    line-height: 1.5;
    max-width: 90%;
    text-align: center;
    margin: 0 auto;
  }

  .footer-text {
    font-size: 0.75rem;
    line-height: 1.3;
    text-align: center;
  }
}

/* <= 480px */
@media (max-width: 480px) {
  /* Modal certifications */
  .certif-modal-box {
    padding: 0.9rem;
  }

  .certif-slide img {
    max-height: 40vh;
  }

  .hero-label {
    font-size: 0.75rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* <= 400px */
@media (max-width: 400px) {
  h2 {
    font-size: 1.6rem;
  }

  .tech-card,
  .project-square {
    border-radius: 12px;
  }

  .technologies {
    gap: 0.3rem;
  }

  .tech-card {
    width: 70px;
    height: 70px;
  }

  .tech-card img {
    width: 20px;
    height: 20px;
  }

  footer {
    padding: 0.8rem 0.3rem;
    font-size: 0.6rem;
    text-align: center;
  }

  .footer-credits {
    gap: 0.3rem;
    text-align: center;
  }

  footer p {
    max-width: 95%;
    word-wrap: break-word;
    text-align: center;
    margin: 0 auto;
  }

  .footer-text {
    font-size: 0.7rem;
    text-align: center;
  }
}

/* <= 320px */
@media (max-width: 320px) {
  h2 {
    font-size: 1.4rem;
  }

  .tech-card,
  .project-square {
    border-radius: 10px;
  }

  .tech-card {
    width: 60px;
    height: 60px;
  }

  .tech-card img {
    width: 18px;
    height: 18px;
  }

  footer {
    padding: 0.6rem 0.2rem;
    font-size: 0.55rem;
    text-align: center;
  }

  .footer-credits {
    text-align: center;
  }

  footer p {
    text-align: center;
    margin: 0 auto;
  }

  .footer-text {
    font-size: 0.65rem;
    text-align: center;
  }
}
