/* =========================================================
   PREMIUM PORTFOLIO — VAL CLANCY PEDRO
   ========================================================= */
:root {
  /* Nuancier Premium Épuré (3 Couleurs Clés) */
  --black-deep: #0a0a0c;
  --charcoal-light: #16161a;
  --accent-gold: #bb4d00; /* Couleur d'accentuation principale */
  --accent-gold-dark: #973c00;

  /* Textes & Neutres */
  --white-pure: #ffffff;
  --gray-light: #f4f4f6;
  --gray-text: #8e8e93;
  --gray-border: #2c2c2e;

  /* Rôles sémantiques adaptatifs */
  --bg-page: var(--white-pure);
  --bg-section-alt: var(--gray-light);
  --text-body: #1c1c1e;
  --text-inverse: var(--white-pure);

  /* Typographie de Caractère */
  --font-mono: "JetBrains Mono", monospace;
  --font-display: "Ubuntu", sans-serif;
  --font-body: "Roboto", sans-serif;

  --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-duration: 0.4s;
  --header-height: 70px;
}

/* Base Light/Dark Preference via system */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-page: var(--black-deep);
    --bg-section-alt: var(--charcoal-light);
    --text-body: #e5e5ea;
    --gray-light: #1c1c1e;
  }
}

/* =========================================================
   RESET & RE-ALIGNE GLOBALS
   ========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  counter-reset: section-counter;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  background: var(--bg-page);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

ul,
ol {
  list-style: none;
}

/* Conteneur d'alignement */
.section-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

section {
  padding: 100px 0;
}

/* En-têtes sémantiques & Numérotés */
.section-header {
  counter-increment: section-counter;
  margin-bottom: 60px;
  max-width: 600px;
}

.section-header::before {
  content: "// 0" counter(section-counter) ".";
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.section-title {
  font-size: 2.5rem;
  color: inherit;
  line-height: 1.2;
}

.section-sub {
  color: var(--gray-text);
  margin-top: 12px;
  font-size: 1.1rem;
}

/* Alternance élégante des arrière-plans */
.skills,
.realisations {
  background: var(--bg-section-alt);
}

/* =========================================================
   BOUTONS PREMIUM & CTAS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 14px 28px;
  border-radius: 4px;
  transition: all var(--transition-duration) var(--transition-smooth);
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-gold);
  color: var(--black-deep);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.2);
}

.btn-primary:hover {
  background: var(--white-pure);
  color: var(--black-deep);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--accent-gold);
  border: 2px solid var(--accent-gold);
}

.btn-outline:hover {
  background: var(--accent-gold);
  color: var(--black-deep);
  transform: translateY(-3px);
}

/* =========================================================
   HEADER & MENU RESPONSIVE SANS SCRIPT (Checkbox hack)
   ========================================================= */
.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 12, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-border);
}

.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: var(--header-height);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white-pure);
}

.logo span {
  color: var(--accent-gold);
}

/* Burger Icon */
.burger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 18px;
  cursor: pointer;
  z-index: 1100;
}

.burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--white-pure);
  transition: all var(--transition-duration) var(--transition-smooth);
}

/* Animation Burger */
.nav-toggle:checked ~ .site-header .burger span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  background: var(--accent-gold);
}
.nav-toggle:checked ~ .site-header .burger span:nth-child(2) {
  opacity: 0;
}
.nav-toggle:checked ~ .site-header .burger span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  background: var(--accent-gold);
}

/* Menu mobile transparent */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--black-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(100%);
  opacity: 0;
  transition:
    transform 0.5s var(--transition-smooth),
    opacity 0.5s ease;
  z-index: 1050;
}

.nav-toggle:checked ~ .site-header .main-nav {
  transform: translateX(0);
  opacity: 1;
}

.main-nav ul {
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
}

.main-nav a {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--white-pure);
  font-weight: 500;
  transition: color var(--transition-duration);
}

.main-nav a:hover {
  color: var(--accent-gold);
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero {
  position: relative;
  background: var(--black-deep);
  color: var(--white-pure);
  padding: 140px 0;
  overflow: hidden;
}

.hero-inner {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 60px;
}

.perso-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 0 16px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-gold);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.1;
}

.hero-text {
  font-size: 1.2rem;
  color: var(--gray-text);
  max-width: 50ch;
}

.highlight {
  color: var(--white-pure);
  font-weight: 600;
  border-bottom: 2px solid var(--accent-gold);
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.profile-container {
  position: relative;
}

.profile-img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--accent-gold);
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.15);
  transition: transform var(--transition-duration) var(--transition-smooth);
}

.profile-container:hover .profile-img {
  transform: scale(1.04);
}

/* Diviseur SVG */
.wave-divider {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  line-height: 0;
}

.wave-divider svg {
  width: 100%;
  height: 60px;
}

.wave-divider path {
  fill: var(--bg-page);
}

/* =========================================================
   ABOUT SECTION
   ========================================================= */
.about-body {
  display: flex;
  flex-direction: column;
  gap: 50px;
  align-items: center;
}

.img-wrapper {
  width: 100%;
  max-width: 450px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.img-wrapper img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.6s var(--transition-smooth);
}

.img-wrapper:hover img {
  transform: scale(1.05);
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lead {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--accent-gold-dark);
}

/* =========================================================
   SKILLS SECTION (Progress Bars Premium)
   ========================================================= */
.skills-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  max-width: 800px;
  margin: 0 auto;
}

.skill-card-premium {
  background: var(--bg-page);
  padding: 24px;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--gray-border);
  border-radius: 3px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--accent-gold-dark),
    var(--accent-gold)
  );
  border-radius: 3px;
  transition: width 1.5s var(--transition-smooth);
}

/* =========================================================
   FORMATION SECTION
   ========================================================= */
.formation-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.formation-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  padding: 30px 0;
  border-bottom: 1px solid var(--gray-border);
  transition: padding-left var(--transition-duration);
}

.formation-item:hover {
  padding-left: 16px;
}

.formation-item dt {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.formation-item dd {
  font-size: 1.1rem;
  font-weight: 500;
}

.country {
  display: inline-block;
  background: var(--gray-border);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  margin-left: 8px;
  color: var(--gray-text);
}

/* =========================================================
   REALISATIONS (Galerie & Animations Hover Avancées)
   ========================================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.project-card {
  position: relative;
  background: var(--bg-page);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
  height: 380px; /* Hauteur fixe pour stabiliser le conteneur */
}

.card-img-wrapper {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.grid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tech-tags {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  z-index: 10;
}

.tech-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(10, 10, 12, 0.85);
  color: var(--accent-gold);
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.card-content {
  padding: 24px;
  position: relative;
  height: calc(380px - 220px);
  background: var(--bg-page);
  transition: transform 0.4s var(--transition-smooth);
}

.grid-title {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.description-short {
  font-size: 0.9rem;
  color: var(--gray-text);
  line-height: 1.4;
}

/* Volet de détails caché qui monte au hover */
.hover-details {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--black-deep);
  color: var(--white-pure);
  padding: 24px;
  box-sizing: border-box;
  transition: transform 0.4s var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.description-long {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #d1d1d6;
}

.project-links {
  display: flex;
  gap: 16px;
}

.proj-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-gold);
  border-bottom: 1px dashed var(--accent-gold);
}

.proj-link:hover {
  color: var(--white-pure);
  border-color: var(--white-pure);
}

/* Activation Hover Multi-Couches */
.project-card:hover .grid-img {
  transform: scale(1.08);
}

.project-card:hover .card-content {
  /* Aligne le déplacement */
}

.project-card:hover .hover-details {
  transform: translateY(-100%); /* Fait remonter le panneau */
}

/* =========================================================
   EXPERIENCE SECTION (Timeline Vectorielle)
   ========================================================= */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 24px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;
  width: 2px;
  background: var(--gray-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-page);
  border: 2px solid var(--accent-gold);
  z-index: 2;
  transition: background var(--transition-duration);
}

.timeline-item:hover::before {
  background: var(--accent-gold);
}

.timeline-content {
  background: var(--bg-section-alt);
  padding: 32px;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-gold-dark);
  font-weight: 700;
}

.timeline-content h3 {
  font-size: 1.4rem;
  margin: 4px 0;
}

.timeline-company {
  font-size: 1rem;
  color: var(--gray-text);
  font-weight: 400;
  margin-bottom: 16px;
}

/* =========================================================
   CONTACT SECTION
   ========================================================= */
.contact {
  background: var(--black-deep);
  color: var(--white-pure);
}

.contact .section-title {
  color: var(--white-pure);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
}

.contact-info-block h3 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.contact-info-block p {
  color: var(--gray-text);
  margin-bottom: 24px;
}

.contact-meta li {
  margin-bottom: 12px;
}

.contact-form {
  background: var(--charcoal-light);
  padding: 40px;
  border-radius: 8px;
  border: 1px solid var(--gray-border);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-gold);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px;
  background: var(--black-deep);
  border: 1px solid var(--gray-border);
  border-radius: 4px;
  color: var(--white-pure);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition-duration);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent-gold);
}

.btn-submit {
  width: 100%;
  border: none;
}

/* =========================================================
   FOOTER SECTION
   ========================================================= */
.site-footer {
  background: var(--black-deep);
  color: var(--white-pure);
  padding: 60px 0;
  border-top: 1px solid var(--gray-border);
  text-align: center;
}

.site-footer h2 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent-gold);
  margin-bottom: 24px;
}

.social-link {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.social-link a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: color var(--transition-duration);
}

.social-link a:hover {
  color: var(--accent-gold);
}

.copyright {
  margin-top: 40px;
  font-size: 0.85rem;
  color: var(--gray-text);
}

/* =========================================================
   MEDIA QUERIES (3 Breakpoints - Mobile First Actif)
   ========================================================= */

/* Breakpoint 1: Tablettes et écrans intermédiaires (min-width: 768px) */
@media screen and (min-width: 768px) {
  .burger {
    display: none;
  }

  .main-nav {
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    transform: none;
    opacity: 1;
  }

  .main-nav ul {
    flex-direction: row;
    gap: 32px;
  }

  .main-nav a {
    font-size: 1rem;
  }

  .hero-inner {
    flex-direction: row;
    justify-content: center;
  }

  .perso-info {
    padding: 0;
  }
  .profile-img {
    width: 350px;
    height: 350px;
  }

  .about-body {
    flex-direction: row;
    align-items: flex-start;
  }

  .about-content {
    flex: 1;
  }

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

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .img-wrapper img {
    width: 100%;
    height: 300px;
    object-fit: cover;
  }
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Breakpoint 2: Ordinateurs portables / Desktops standards (min-width: 1024px) */
@media screen and (min-width: 1024px) {
  .hero h1 {
    font-size: 4.5rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(
      3,
      1fr
    ); /* 3 colonnes pour afficher les 6 projets proprement */
  }

  .formation-item {
    grid-template-columns: 150px 1fr;
  }
}
