/* ===================================
   MAIN.CSS - Portfolio Pierre Bister
   Design Moderne et Minimaliste
   =================================== */

/* CSS Variables */
:root {
  /* Colors */
  --color-primary: #ba5f4f;
  --color-background: #faf8f4;
  --color-card-bg: #eae6dd;
  --color-dark: #1a1a1a;
  --color-dark-gray: #2d2d2d;
  --color-white: #ffffff;
  --color-overlay: rgba(0, 0, 0, 0.5);

  /* Typography */
  --font-heading: "Inter", "Helvetica Neue", sans-serif;
  --font-body: "Crimson Text", Georgia, serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  --spacing-xxl: 8rem;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.4s ease;
  --transition-slow: 0.6s ease;

  /* Sizes */
  --circle-size: 200px;
  --cursor-size: 40px;

  /* Z-index */
  --z-cursor: 9999;
  --z-nav: 1000;
  --z-modal: 2000;
  --z-loading: 3000;
}

/* ===================================
   BASE STYLES
   =================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-background);
  background-attachment: fixed;
  color: var(--color-dark);
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 900;
  line-height: 1.2;
  color: var(--color-dark);
}

h1 {
  font-size: clamp(3rem, 8vw, 7rem);
}
h2 {
  font-size: clamp(4rem, 9vw, 8rem);
}
h3 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}
h4 {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
}

/* Paragraphes avec drop cap (première lettre) */
p {
  font-size: 1.2rem;
  line-height: 1.8;
}

.about-text p:first-of-type::first-letter {
  initial-letter: 2;
  font-size: 3em;
  font-weight: bold;
  color: var(--color-primary);
  float: left;
  line-height: 1;
  margin-right: 0.1em;
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-dark);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Buttons */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: none;
  transition: var(--transition-normal);
  display: inline-block;
}

.btn-primary:hover {
  background-color: var(--color-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ===================================
   CUSTOM CURSOR
   =================================== */

.custom-cursor {
  width: var(--cursor-size);
  height: var(--cursor-size);
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: var(--z-cursor);
  transition: transform 0.3s ease, border-color 0.3s ease;
  transform: translate(-50%, -50%);
}

.custom-cursor-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-primary);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
}

.custom-cursor.hover {
  transform: translate(-50%, -50%) scale(1.5);
  border-color: var(--color-dark);
}

/* ===================================
   NAVIGATION
   =================================== */

.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-nav);
  padding: 2rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-normal);
  mix-blend-mode: difference;
}

.main-nav.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 4rem;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  mix-blend-mode: normal;
}

.nav-logo .nav-initials {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-white);
}

.main-nav.scrolled .nav-initials {
  color: var(--color-primary);
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 3rem;
  margin: 0;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
}

.main-nav.scrolled .nav-link {
  color: var(--color-dark);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-normal);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  gap: 5px;
  cursor: none;
}

.nav-toggle span {
  width: 25px;
  height: 2px;
  background-color: var(--color-white);
  transition: var(--transition-fast);
}

.main-nav.scrolled .nav-toggle span {
  background-color: var(--color-dark);
}

/* Scroll Progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background-color: var(--color-primary);
  z-index: calc(var(--z-nav) + 1);
  transition: width 0.1s linear;
}

/* ===================================
   SECTION TITLES (Background Decoration)
   =================================== */

.section-title-bg {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: clamp(6rem, 12vw, 15rem);
  font-weight: 900;
  color: rgba(186, 95, 79, 0.03);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
}

/* Point rouge signature après les titres */
.section-title::after {
  content: "●";
  color: var(--color-primary);
  font-size: 0.4em;
  margin-left: 0.2em;
  vertical-align: middle;
}

/* ===================================
   HERO SECTION
   =================================== */

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: var(--spacing-xl) var(--spacing-md);
  z-index: 1;
  background-color: var(--color-background);
}

/* Effet texture papier journal sur hero */
.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("../texture-fond.png");
  background-repeat: repeat;
  background-size: 1920px 1080px;
  background-position: center top;
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}

.hero-content {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: var(--spacing-lg);
  position: relative;
}

.hero-title {
  writing-mode: vertical-rl;
  font-size: clamp(4rem, 8vw, 8rem);
  letter-spacing: 10px;
  color: var(--color-dark);
}

.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
}

.hero-image-wrapper {
  position: relative;
  width: 400px;
  height: 400px;
}

.hero-image-container {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 10px solid var(--color-white);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(100%);
  transition: filter var(--transition-slow);
}

.hero-image:hover {
  filter: grayscale(0%);
}

.hero-info {
  text-align: center;
}

.hero-name {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: var(--spacing-xs);
}

.hero-tagline {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  color: var(--color-dark-gray);
  font-style: italic;
}

.red-circle {
  position: absolute;
  width: var(--circle-size);
  height: var(--circle-size);
  background-color: var(--color-primary);
  border-radius: 50%;
  top: 20%;
  right: 10%;
  z-index: -1;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-30px) rotate(180deg);
  }
}

.scroll-indicator {
  display: none; /* Caché comme demandé */
}

/* Hero subtitle (Étudiant finissant) */
.hero-subtitle {
  position: absolute;
  bottom: 3rem;
  right: 3rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-dark-gray);
}

@media (max-width: 768px) {
  .hero-subtitle {
    display: none;
  }
}

/* ===================================
   ABOUT SECTION
   =================================== */

.about-section {
  padding: var(--spacing-xxl) var(--spacing-md) var(--spacing-md) var(--spacing-md);
  position: relative;
  margin-top: 0;
  background-color: var(--color-background);
  z-index: 2;
}

.about-container {
  max-width: 1400px;
  margin: 0 auto;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--spacing-xl);
  align-items: start;
}

.about-title {
  font-size: clamp(3rem, 6vw, 5rem);
  color: var(--color-primary);
  position: sticky;
  top: 150px;
}

.about-text {
  columns: 2;
  column-gap: var(--spacing-lg);
  font-size: 1.5rem;
  line-height: 1.9;
}

.about-text p {
  margin-bottom: var(--spacing-md);
  break-inside: avoid;
}

/* ===================================
   PARCOURS - SLIDER 50/50 MODERNE
   =================================== */

.parcours-section {
  padding: var(--spacing-xl) var(--spacing-md);
  position: relative;
  background-color: var(--color-background);
  z-index: 2;
}

.parcours-container {
  max-width: 1200px;
  margin: 0 auto;
}

.parcours-title {
  font-size: 2.5rem;
  color: var(--color-dark);
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

/* Desktop: 50/50 layout */
.parcours-wrapper {
  display: flex;
  gap: var(--spacing-lg);
  align-items: stretch;
  min-height: 400px;
}

/* Partie gauche - Image et contenu actif */
.parcours-active {
  flex: 1;
  background-size: cover;
  background-position: center;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
  transition: all 0.5s ease;
}

.parcours-active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.1) 100%);
  z-index: 1;
}

.parcours-active-content {
  position: relative;
  z-index: 2;
  padding: var(--spacing-lg);
  color: white;
}

.parcours-active-content .parcours-year {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.95);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: var(--spacing-sm);
}

.parcours-active-content h3 {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: var(--spacing-xs);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  color: white;
}

.parcours-active-content .parcours-location {
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: var(--spacing-sm);
  opacity: 0.9;
  color: white;
}

.parcours-active-content p {
  font-size: 1rem;
  line-height: 1.7;
  opacity: 0.95;
  color: white;
}

/* Partie droite - Liste des dates */
.parcours-steps {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.parcours-step {
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--color-white);
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.parcours-step:hover {
  transform: translateX(10px);
  border-left-color: var(--color-primary);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.parcours-step.active {
  background: var(--color-primary);
  border-left-color: var(--color-dark);
  transform: translateX(10px);
}

.parcours-step .step-date {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--color-primary);
  margin-bottom: 0.3rem;
  transition: color 0.3s;
}

.parcours-step.active .step-date {
  color: white;
}

.parcours-step .step-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-dark);
  transition: color 0.3s;
}

.parcours-step.active .step-title {
  color: white;
}

.parcours-step .step-location {
  font-size: 0.9rem;
  color: var(--color-dark-gray);
  font-style: italic;
  margin-top: 0.2rem;
  transition: color 0.3s;
}

.parcours-step.active .step-location {
  color: rgba(255, 255, 255, 0.85);
}

/* Mobile */
@media (max-width: 992px) {
  .parcours-wrapper {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .parcours-active {
    min-height: 300px;
  }

  .parcours-steps {
    flex-direction: row;
    overflow-x: auto;
    gap: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    -webkit-overflow-scrolling: touch;
  }

  .parcours-step {
    min-width: 200px;
    flex-shrink: 0;
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .parcours-step:hover,
  .parcours-step.active {
    transform: translateY(-5px);
  }

  .parcours-step .step-date {
    font-size: 1.1rem;
  }

  .parcours-step .step-title {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .parcours-section {
    padding: var(--spacing-lg) var(--spacing-sm);
  }

  .parcours-title {
    font-size: 2rem;
  }

  .parcours-active {
    min-height: 280px;
  }

  .parcours-active-content {
    padding: var(--spacing-md);
  }

  .parcours-active-content h3 {
    font-size: 1.4rem;
  }

  .parcours-active-content p {
    font-size: 0.95rem;
  }

  .parcours-step {
    min-width: 160px;
  }
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 1200px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-title {
    writing-mode: horizontal-tb;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .about-text {
    columns: 1;
  }
}

@media (max-width: 992px) {
  .main-nav {
    padding: 1.5rem 2rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--color-white);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right var(--transition-normal);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-link {
    color: var(--color-dark);
    font-size: 1.5rem;
  }

  .hero-image-wrapper {
    width: 300px;
    height: 300px;
  }

  .timeline-item {
    min-width: 250px;
    max-width: 280px;
  }
}

@media (max-width: 768px) {
  /* Désactiver le curseur custom sur mobile */
  body {
    cursor: auto !important;
  }

  /* Réduire les espacements globaux sur mobile */
  :root {
    --spacing-xs: 0.4rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1.25rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 3.5rem;
    --spacing-xxl: 5rem;
  }

  .main-nav {
    padding: 1rem;
    mix-blend-mode: normal !important;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  .nav-initials {
    color: var(--color-primary) !important;
  }

  .nav-toggle span {
    background-color: var(--color-dark) !important;
  }

  /* Fix menu mobile z-index */
  .nav-menu {
    z-index: 9999;
  }

  .nav-toggle {
    z-index: 10000;
  }

  .hero-section {
    padding: var(--spacing-lg) var(--spacing-sm);
    overflow: visible;
  }

  .hero-image-wrapper {
    width: 250px;
    height: 250px;
  }

  /* Désactiver les effets parallax sur mobile */
  .hero-circle,
  .about-circle,
  .contact-circle {
    transform: none !important;
  }

  .about-section {
    padding: var(--spacing-lg) var(--spacing-sm);
  }

  /* Réduire les espacements des sections */
  section {
    padding: var(--spacing-lg) var(--spacing-sm) !important;
  }

  /* Réduire l'espacement dans le timeline mobile */
  .timeline-item {
    padding: var(--spacing-md) 0 !important;
  }

  .timeline-content .timeline-year {
    margin-bottom: var(--spacing-xs) !important;
  }

  .timeline-content .timeline-item-title {
    margin-bottom: var(--spacing-xs) !important;
  }

  .timeline-content .timeline-location {
    margin-bottom: var(--spacing-xs) !important;
  }
}
