/* ==========================================
   1. GLOBAL & VARIABLES
   ========================================== */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
:root {
  --bg-color: #ffffff;
  --text-color: hsl(240, 9.7%, 6.1%);
  --border-color: #7f7979;
}

html.dark {
  --bg-color: #030303;
  --text-color: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --bg-color: #030303;
    --text-color: #ffffff;
  }
  
  .gradient-text {
    background-image: linear-gradient(180deg, #c099ff 0%, rgba(255, 255, 255, 0.3) 100%);
  }

  #contact form {
    background: rgb(16, 16, 16);
  }
}
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "Inter", sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1500px;
  margin: auto;
  padding: 1rem 3rem;
}

.hidden {
  display: none !important;
}
section {
  scroll-margin-top: 80px;  
}
/* Texte en dégradé */
.gradient-text {
  background-image: linear-gradient(180deg, #b588ff 0%, var(--text-color) 150%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-repeat: no-repeat;
}

html.dark .gradient-text {
  background-image: linear-gradient(180deg, #c099ff 0%, rgba(255, 255, 255, 0.3) 100%);
}

h1 {
  font-size: 2.8rem;
  line-height: normal;
}

/* ==========================================
   2. HEADER & NAVIGATION
   ========================================== */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--bg-color);
  z-index: 50000;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 3rem;
}

.logo {
  font-size: 40px;
  font-family: "Chewy", cursive;
  text-decoration: none;
  color: var(--text-color);
}

/* Menu de navigation */
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 80px;
}

nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  padding-bottom: 5px;
  display: block;
  position: relative;
}

nav ul li a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--text-color);
  transition: width 0.2s ease;
}

nav ul li a:hover::before {
  width: 100%;
}

/* Bouton Dark Mode */
#theme-toggle {
  background: transparent;
  border: 1px solid var(--text-color);
  border-radius: 8px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-color);
  transition: transform 0.2s ease, border-color 0.3s ease;
}

#theme-toggle:hover {
  transform: scale(1.05);
}

/* ==========================================
   3. SECTION ABOUT (HERO)
   ========================================== */
#about {
  min-height: 100dvh;
  background: url("/assets/imgs/square.svg");
  position: relative;
  display: flex;
  align-items: center; 
  z-index: 2;
  border-bottom: 1px solid var(--border-color);
}

#about::after {
  content: "";
  background:
    radial-gradient(at 38% 100%, hsla(331, 100%, 50%, 1) 0px, transparent 40%),
    radial-gradient(at 97% 50%, hsla(0, 100%, 59%, 1) 0px, transparent 50%),
    radial-gradient(at 80% 130%, hsla(198, 100%, 50%, 1) 0px, transparent 50%),
    radial-gradient(at 20% 160%, hsla(34, 100%, 65%, 1) 0px, transparent 50%);
  height: 50%;
  width: 80%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(100px);
  z-index: -1;
}

.banner-about {
  max-width: 800px;
  margin: auto;
}

/* ==========================================
   4. SECTION PROJETS / WORK (CARTE BENTO)
   ========================================== */
#projets {
  padding-top: 60px;
}

.row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}

#work .col {
  background-image:
    radial-gradient(
      146.13% 118.42% at 50% -15.5%,
      hsla(0, 0%, 100%, 0.04) 0,
      hsla(0, 0%, 100%, 0) 99.59%
    ),
    linear-gradient(180deg, rgba(46, 51, 90, 0), rgba(28, 27, 51, 0.04));
  padding: 25px;
  border-radius: 15px;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

#work .col:hover {
  transform: translateY(-5px);
  border-color: #b588ff;
}

.col svg {
  height: 35px;
  width: auto;
}

.col h3 {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 1.4rem;
  margin-top: 0;
}

.col ul {
  padding-left: 20px;
  margin-bottom: 0;
}

.col li {
  margin-bottom: 10px;
  line-height: 1.5;
}

/* ==========================================
   5. SECTION CONTACT
   ========================================== */
#contact {
  margin: 80px 0;
}

#contact .container-bloc-contact {
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 40px 20px 60px 20px;
  text-align: center;
  position: relative;
  overflow: hidden; /* Prévient les débordements d'arrière-plan */
}

/* Vague SVG en fond */
#contact .container-bloc-contact::before {
  content: "";
  background-image: url("imgs/waves.svg");
  background-size: cover;
  background-position: center;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  opacity: 0.15;
  pointer-events: none;
}

/* Halo Lumineux en fond */
#contact .container-bloc-contact::after {
  content: "";
  background:
    radial-gradient(at 38% 100%, hsla(331, 100%, 50%, 1) 0px, transparent 40%),
    radial-gradient(at 97% 50%, hsla(0, 100%, 59%, 1) 0px, transparent 50%),
    radial-gradient(at 80% 130%, hsla(198, 100%, 50%, 1) 0px, transparent 50%),
    radial-gradient(at 20% 160%, hsla(34, 100%, 65%, 1) 0px, transparent 50%);
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  opacity: 0.25;
  filter: blur(80px);
  pointer-events: none;
}

.header-contact,
#contact form {
  position: relative;
  z-index: 1; /* Assure que le texte et le formulaire restent au-dessus du fond */
}

.header-contact {
  max-width: 550px;
  margin: 0 auto 35px auto;
}

.header-contact h2 {
  font-size: 2.2rem;
}

/* Formulaire */
#contact form {
  max-width: 500px;
  margin: auto;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-align: left;
  padding: 25px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.dark #contact form {
  background: rgb(16, 16, 16);
}

#contact label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

#contact form input,
#contact form textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
}

#contact form input {
  height: 42px;
}

#contact form textarea {
  height: 110px;
  resize: vertical;
}

#contact form input:focus,
#contact form textarea:focus {
  outline: 2px solid #b588ff;
  border-color: transparent;
}

#contact button {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-color);
  align-self: flex-end;
  height: 40px;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  padding: 0 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#contact button:hover {
  background-color: var(--text-color);
  color: var(--bg-color);
}

/* ==========================================
   6. FOOTER
   ========================================== */
footer {
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.name {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 5px 0;
}

.loc {
  color: rgb(156, 163, 175);
  margin: 0 0 5px 0;
}

footer p {
  margin: 0;
}

/* ==========================================
   7. RESPONSIVE (MEDIA QUERIES)
   ========================================== */
@media screen and (max-width: 992px) {
  .container {
    padding: 1rem 1.5rem;
  } 
  .row {
    grid-template-columns: 1fr;
  } 
  h1 {
    font-size: 2.2rem;
  }
}
@media screen and (max-width: 600px) {
  .menu {
    gap: 20px;
  }
  .banner-about {
    text-align: center;
  }
   h1 {
    font-size: 1.9rem;
  }
}