/* Simple black & white dark theme CSS - clean and readable */

:root {
  --bg: #000;         /* page background */
  --panel: #0d0d0d;   /* cards, panels */
  --muted: #9aa0a6;   /* secondary text */
  --text: #fff;       /* main text */
  --border: rgba(255,255,255,0.06);
  --container: 1100px;
  --accent: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html { scroll-behavior: smooth }

/* Animated starfield background canvas */
#starfield-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  display: block;
  background: radial-gradient(ellipse at 50% 50%, #020202 0%, #000 60%);
}

#Problem{
  color: rgb(237, 22, 22);
  font-style: italic;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 2rem;
}

/* Header */

.logo_header {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: Playfair Display, serif;
  white-space: nowrap;
}

.logo_header h2 {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1;
  color: white;
  font-weight: 700;
  white-space: nowrap;
}

.site-header {
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

body.scrolled .site-header {
  background: rgba(0,0,0,0.45);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.header-inner {
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  align-items: center;
}

.brand {
  display: inline-block;
  text-decoration: none;
}

.brand img { height: 42px; display: inline-block }

.header-left { 
  text-align:left;
}
.header-center { 

  text-align:center;
}

.header-right { 
  
  text-align:right;
 }

/* .contact-cta removed (unused) */

.header-name {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.brand-name {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  color: inherit;
  margin-left: 20px;
}

.brand-name h2 {
  margin: 0;
  color: inherit;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  margin-left: 26rem;
  display: flex;
  gap: 2.25rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 2rem;
  position: relative;
  transition: color .3s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 1px;
  background: var(--text);
  transition: width .3s ease;
}

.site-nav a:hover { color: var(--text) }
.site-nav a:hover::after { width: 100% }

.site-nav a[aria-current] {
  color: var(--text);
  font-weight: 600;
}

#contact{

  background-color: white;
  color: black;
  border-radius: 5px;
  padding:15px;
  transition: transform .25s ease, box-shadow .25s ease;
}

#contact:hover{
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,255,255,0.08);
}

/* Hero */

.hero {
  padding: 3rem 0;
}

/* Subtle bands to differentiate sections */
.band-dark {
  border-radius: 25px;
  background: rgba(255,255,255,0.02);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.band-faint {
  background: rgba(255,255,255,0.01);
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 2.5rem;
  align-items: center;
  min-height: 66vh;
}

.hero-content h1 { 
margin-bottom: 2rem;
font-family: 'Poppins', sans-serif;
line-height: 1.05;
}

.hero-content .line { 
  display:block; 
  font-size:2.2rem;
 }

.hero-content .line.big { 
  font-size: 4rem;
  font-weight: 800;
}

.hero-illustration img { 

  width:300px; 
  margin-left: 6rem;
  max-width:520px; 
  display:block;
  transform: scaleX(-1);
  will-change: transform;
}

/* Floating animation for hero illustration */
@keyframes floatY {
  0% { transform: translateY(0) scaleX(-1); }
  50% { transform: translateY(-10px) scaleX(-1); }
  100% { transform: translateY(0) scaleX(-1); }
}

.hero-illustration img.float {
  animation: floatY 6s ease-in-out infinite;
}

.lead { 

  max-width: 48ch; 
  color: var(--muted); 
  font-weight: 400 
}

.cta-row .btn { margin-top: 1rem }

/* duplicate h1 removed */


.cta-row {
  display: flex;
  gap: 0.75rem;
}

.btn {
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
  transition: transform .25s ease, background-color .25s ease, color .25s ease, box-shadow .25s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 rgba(0,0,0,0);
}

.btn.primary {
  background: var(--text);
  color: var(--panel);
}

.btn.outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}

.btn:hover { transform: translateY(-2px) }
.btn:active { transform: translateY(0) }
.btn:hover { box-shadow: 0 10px 24px rgba(0,0,0,0.35) }

/* Button glow sweep */
.btn::before {
  content: "";
  position: absolute;
  top: 0; left: -150%;
  width: 120%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-20deg);
}
.btn:hover::before { animation: sweep 1.1s ease }

@keyframes sweep {
  0% { left: -150% }
  100% { left: 150% }
}

/* Click ripple (pure CSS approximation) */
.btn:active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255,255,255,0.12);
  animation: ripple .35s ease;
}
@keyframes ripple {
  from { opacity: 1 }
  to { opacity: 0 }
}

/* removed faint override to keep header border visible */

/* Compétences */

.logos{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin:1rem 0;
  flex-direction: column;
  align-items: center;
  border: #fff 1px solid;
  padding: 2.25rem 1.75rem;
  border-radius: 5px;
  margin-top: 4rem;
  overflow: hidden; /* keep marquee content within border */
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.services{
  margin-bottom: 5rem;
  background-color: rgba(219, 219, 219, 0.1); /* noir avec 25% d'opacité */
}

.TitrePartie {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2.5rem;
  background: linear-gradient(90deg, #fff, #c5c5c5, #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: titleShimmer 8s linear infinite;
}

@keyframes titleShimmer {
  0% { background-position: 0% 50% }
  100% { background-position: 200% 50% }
}

.compet {
  scale: 150%;
  margin: 25px;
}

.compet2 {
  scale: 150%;
  padding: 10px;
  margin: 25px;
  border: #fff 1px solid;
  border-radius: 5px;
}

/* Cards & projects */

.projects-preview {
}

.project-grid {
  display: grid;
  gap: 1rem;
}

/* .cards removed (unused) */

.project-grid {
  grid-template-columns: repeat(3, 1fr);
}

.project {
  background: var(--panel);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid white;

}
/* .card removed (unused) */

.project{ transition: transform .3s ease, box-shadow .3s ease }
.project:hover{ --ty: -6px }
.project { box-shadow: 0 0 0 rgba(0,0,0,0) }
.project:hover { box-shadow: 0 18px 36px rgba(0,0,0,0.45) }

/* Tilt effect via CSS custom properties set by JS */
.project {
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
  transform-style: preserve-3d;
}

.project img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  filter: grayscale(100%);
  transition: filter .5s ease, transform .5s ease;
}

.project:hover img { filter: grayscale(0%); transform: scale(1.03) }

/* Video thumbnail */
.video-thumbnail {
  position: relative;
  width: 100%;
  height: 140px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--panel);
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter .5s ease, transform .5s ease;
}

.project:hover .video-thumbnail img {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--bg);
  pointer-events: none;
  transition: transform .3s ease, background .3s ease;
}

.project:hover .play-icon {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(255, 255, 255, 1);
}

/* Forms */

.contact-form {
  max-width: 640px;
  display: grid;
  gap: 0.75rem;

}

label {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
}

input,
textarea {
  margin-top: 20px;
  width: 100%;
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid white;
  background: transparent;
  color: white;
  transition: border-color .25s ease, box-shadow .25s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: rgba(255,255,255,0.6);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.08);
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid rgba(255,255,255,0.6);
  outline-offset: 2px;
}
.btn:focus-visible, .site-nav a:focus-visible, .header-name:focus-visible {
  outline: 2px solid rgba(255,255,255,0.8);
  outline-offset: 2px;
  border-radius: 8px;
}

.more{
  text-align: center;
  margin-top: 1.5rem;
  font-weight: 600;
  text-decoration: underline;
  font-size: 1.2rem;
  padding: 2rem;

}

.more a {
  color: white;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  padding-bottom: 2rem;
  border-top: #fff 1px solid;
  background-color: black;
}

.site-footer p {
  padding-top: 2rem;
  font-size: 1.5rem;
  margin: 0;
  text-align: center;
}


@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .cards,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    display: none;
  }
}

/* Contact */

.title-contact {
  font-size: 3rem;
  font-weight: 700;
  color: white;
}

.contact{
}

#contact-form{
    border: #fff 1px solid;
    border-radius: 10px;
    background-color: #000;
    padding: 40px;
    margin-top: 40px;
    margin-bottom: 40px;
}

#contact-form input{
  font-size: 1rem;
  padding: 20px;
}

#contact-form textarea{
    font-size: 1rem;
    padding: 20px;
    min-height: 150px;
}

#contact-form button{
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 1.2rem;
    border: none;
    border-radius: 5px;
    background-color: white;
    color: black;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .3s ease, transform .3s ease;
}

#contact-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#contact-form button:not(:disabled):hover {
    transform: translateY(-2px);
}

/* Form message feedback */
.form-message {
    display: none;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-message--success {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.form-message--error {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #f44336;
}

.form-message--info {
    background: rgba(33, 150, 243, 0.15);
    border: 1px solid rgba(33, 150, 243, 0.3);
    color: #2196f3;
}

/* Projets */

.images-fond {
    padding-bottom: 40px;
    margin-bottom: 4rem;
}

/* Removed bgPan (replaced by canvas animation) */

/* Header logo gentle breathing */
.logo_header .brand img {
  transform-origin: center;
  animation: breathe 6s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1) }
  50% { transform: scale(1.03) }
}

/* Subtle idle float for skill icons */
.compet, .compet2 {
  animation: idleFloat 8s ease-in-out infinite;
}

@keyframes idleFloat {
  0% { transform: translateY(0) }
  50% { transform: translateY(-6px) }
  100% { transform: translateY(0) }
}

@media (max-width: 480px) {
  .logo_header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
  }
  .logo_header h2 { font-size: 1rem }
}

/* Logos */
.logos-audio, .logos-web {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin: 1rem 0;
}
.logos-audio img, .logos-web img {
  height: 40px;
  width: auto;
  display: block;
}

/* Marquee */
.marquee {
  overflow: hidden;
  position: relative;
  /* Laisser une marge interne suffisante pour que les logos entrent/sortent sans être coupés */
  --edge: 60px;
  padding-inline: var(--edge);
  width: 100%;
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: scrollX 55s linear infinite;
  will-change: transform;
}

@keyframes scrollX {
  0% { transform: translateX(0) }
  100% { transform: translateX(-50%) }
}

/* Remove large margins from icons inside the marquee track */
.marquee__track img { margin: 0 !important }

/* Ensure logos are fully visible inside marquee (override global scale) */
.marquee__track .compet, .marquee__track .compet2 { scale: 1 !important }
/* Disable vertical idle float in marquee: keep motion strictly left → right */
.marquee__track .compet, .marquee__track .compet2 { animation: none !important }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease }
.reveal.is-visible { opacity: 1; transform: translateY(0) }

/* Stagger utility */
.stagger > * { opacity: 0; transform: translateY(12px) }
.stagger.is-visible > * { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease }
.stagger.is-visible > *:nth-child(1){ transition-delay: .05s }
.stagger.is-visible > *:nth-child(2){ transition-delay: .1s }
.stagger.is-visible > *:nth-child(3){ transition-delay: .15s }
.stagger.is-visible > *:nth-child(4){ transition-delay: .2s }
.stagger.is-visible > *:nth-child(5){ transition-delay: .25s }
.stagger.is-visible > *:nth-child(6){ transition-delay: .3s }
.stagger.is-visible > *:nth-child(7){ transition-delay: .35s }

/* Reduced motion safety */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important }
}

/* Project Modal */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .3s ease;
}

.project-modal.is-open {
  display: flex;
  opacity: 1;
}

.project-modal__overlay {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.project-modal__content {
  position: relative;
  max-width: 95vw;
  max-height: 90vh;
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 2rem;
  overflow: visible;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: scale(0.95);
  transition: transform .3s ease;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 968px) {
  .project-modal__content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.project-modal.is-open .project-modal__content {
  transform: scale(1);
}

.project-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  transition: background .2s ease, border-color .2s ease;
  z-index: 10;
}

.project-modal__close:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.5);
}

.project-modal__media {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.2);
  max-height: calc(90vh - 4rem);
  position: sticky;
  top: 2rem;
  align-self: start;
}

.project-modal__media img {
  max-width: 100%;
  max-height: calc(90vh - 4rem);
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  margin: 0 auto;
}

.project-modal__media video {
  max-width: 100%;
  max-height: calc(90vh - 4rem);
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.project-modal__text {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: calc(90vh - 4rem);
  min-height: 0;
  padding-right: 0.5rem;
}

.project-modal__text::-webkit-scrollbar {
  width: 6px;
}

.project-modal__text::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
}

.project-modal__text::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}

.project-modal__text::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}

.project-modal__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
  flex-shrink: 0;
  line-height: 1.2;
}

.project-modal__description {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
  font-size: 1rem;
}

.project-modal__details {
  color: var(--text);
  line-height: 1.6;
  flex-shrink: 0;
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Make project cards clickable */
.project {
  cursor: pointer;
}

@media (max-width: 968px) {
  .project-modal__content {
    padding: 1.5rem;
  }
  .project-modal__media {
    max-height: 50vh;
    position: relative;
    align-self: stretch;
  }
  .project-modal__media img,
  .project-modal__media video {
    max-height: 50vh;
  }
  .project-modal__text {
    max-height: none;
    overflow-y: visible;
  }
  .project-modal__title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
  .project-modal__description {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }
  .project-modal__details {
    font-size: 0.85rem;
    margin-top: 0;
    padding-top: 0.75rem;
  }
}
