/* ===============================
   RESET & BASE
================================== */

* { margin:0; padding:0; box-sizing:border-box; }

.navbar-custom .navbar-toggler-icon {
    filter: invert(1);
}


html {
  scroll-padding-top: 3rem; 
}


@media (max-width: 480px) {
  html {
    scroll-padding-top: 2rem; 
  }
}


@media (min-width: 1200px) {
  html {
    scroll-padding-top: 4rem; 
  }
}


@media (min-width: 1400px) {
  html {
    scroll-padding-top: 1rem; 
  }
}

body { font-family:'Poppins',sans-serif; background:#FDFDFD; color:#1E2019; line-height:1.6; }

/* ===============================
   NAVBAR
================================== */
.navbar-custom { background:#003153; padding:clamp(0.5rem, 2vw, 1rem) 0; }
.navbar-brand { font-size:clamp(1.5rem, 4vw, 2rem); font-weight:500; color:#FDFDFD !important; }
.navbar-nav .nav-link { font-size:clamp(1rem, 2vw, 1.2rem); color:#FDFDFD !important; margin:0 0.5rem; transition:color 0.3s; }
.navbar-nav .nav-link:hover { color:#FFD500 !important; }

/* ===============================
   HERO
================================== */
.hero-section { padding:clamp(4rem, 10vw, 6rem) 0 clamp(2rem, 5vw, 4rem); text-align:left; }
.hero-title { font-size:clamp(2rem, 6vw, 4rem); font-weight:600; line-height:1.2; margin-bottom:2rem; text-align:left; }
.hero-subtitle { font-size:clamp(1rem, 3vw, 1.8rem); font-weight:400; color:#587B7F; margin-bottom:2rem; text-align:left; }
.profile-image { width:clamp(150px, 15vw, 250px); height:clamp(150px, 15vw, 250px); border-radius:50%; object-fit:cover; margin:0; box-shadow:4px 4px 19px rgba(0,0,0,0.25); }
.hero-buttons { display:flex; flex-wrap:wrap; gap:0.5rem; justify-content:flex-start; }

/* ===============================
   BUTTONS
================================== */
.btn-custom {
  background:#754668; color:#fff; border:none; border-radius:21px;
  padding:clamp(0.5rem,1vw,0.8rem) clamp(1rem,2vw,1.5rem);
  font-size:clamp(0.9rem,1.5vw,1rem); font-weight:500;
  display:inline-block; transition:all 0.3s ease;
}
.btn-custom:hover { background:#5a3450; transform:translateY(-2px); color:#fff; }
.btn-secondary {
  background:#003153; color:#fff; border:none; border-radius:21px;
  padding:clamp(0.4rem,1vw,0.6rem) clamp(0.8rem,1.5vw,1.2rem);
  font-size:clamp(0.9rem,1.5vw,1rem); font-weight:500; transition:all 0.3s ease;
}

/* ===============================
   TITLES & TEXT
================================== */
.section-title { font-size:clamp(1.5rem,5vw,4rem); font-weight:600; line-height:1.2; margin-bottom:2rem; color:#1E2019; text-align:left; }
.section-text { font-size:clamp(0.9rem,2vw,1rem); font-weight:500; color:#587B7F; text-align:left; }

/* ===============================
   CARDS & FLIP
================================== */
.card-flip {
  perspective: 1000px;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  position: relative;
}

/* Front et Back préparés pour une hauteur identique */
.card-flip > .card-front,
.card-flip > .card-back {
  background: #FDFDFD;
  border: 2px solid #D9D9D9;
  border-radius: 15px;
  padding: clamp(1rem, 2vw, 1.5rem);
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  backface-visibility: hidden;
  transition: transform 0.6s;
  min-height: 0; /* permet au JS de recalculer correctement la hauteur */
  box-sizing: border-box; /* assure que padding et border sont inclus dans la hauteur */
}

.card-front {
  position: relative;
  z-index: 2;
}

.card-back {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotateY(180deg);
}

/* Effet flip */
.card-flip:hover .card-front {
  transform: rotateY(180deg);
}

.card-flip:hover .card-back {
  transform: rotateY(0deg);
}


.card-title { font-size:clamp(1rem,2.5vw,1.2rem); font-weight:600; color:#754668; margin-bottom:0.5rem; }
.card-text { font-size:clamp(0.9rem,2vw,1rem); font-weight:500; color:#587B7F; }
.about-card { background:#FDFDFD; border:2px solid #D9D9D9; border-radius:15px; padding:clamp(0.5rem,1vw,0.8rem) clamp(0.8rem,1.5vw,1rem); margin-bottom:0.5rem; min-height:50px; text-align:center; color:#587B7F; transition:transform 0.3s ease; }
.experience-card {
  background: #FDFDFD;
  border: 2px solid #D9D9D9;
  border-radius: 15px;
  padding: clamp(0.5rem, 1vw, 0.8rem) clamp(0.8rem, 1.5vw, 1rem);
  margin-bottom: 0.5rem;
  min-height: 50px;
  text-align: center;
  color: #754668;
  transition: transform 0.3s ease;
  font-weight: bold;
  height: 100%;        
  display: flex;       
  align-items: center; 
  justify-content: center; 
}
.experience-card:hover {
  transform: translateY(-5px);
}

.project-card-link { text-decoration:none; color:inherit; display:block; }
.project-image { max-width:100%; margin-bottom:1rem; border-radius:0.5rem; }

/* ===============================
   FOOTER
================================== */
.footer-custom { background:#003153; color:#fff; padding:clamp(1rem,3vw,1.5rem) 0; text-align:center; font-size:clamp(0.8rem,1.5vw,1rem); font-weight:500; margin-top:3rem; }
.footer-custom a { color:#fff; margin:0 0.8rem; font-size:clamp(1.2rem,2vw,1.5rem); transition:color 0.3s; }
.footer-custom a:hover { color:#FFD500; }
.footer-custom span { display:block; margin-top:0.5rem; font-size:clamp(0.7rem,1.2vw,0.9rem); }

/* ===============================
   DIVIDERS
================================== */
.divider { 
  width: 60%; 
  height: 2px; 
  margin: 2rem auto; 
  border: none; 
  background-color: #003153; 
}

.divider-vertical {
  width: 0.5px;
  height: 90%;
  background-color: #003153;
  transform: scaleX(0.5); 
  margin: 0 auto;
}

/* ===============================
   LOGOS
================================== */
.company-logo { height:clamp(50px,10vw,80px); object-fit:contain; display:block; margin:0.5rem auto; max-width:100%; }

/* ===============================
   SECTIONS
================================== */
section { padding:clamp(1rem,3vw,2rem) 0; display:flex; flex-direction:column; justify-content:center; }
#project-container { display:block; min-height:auto; padding-top:clamp(1rem,2vw,2rem); }

.main-offset {
  padding-top: 5rem;   
  padding-bottom: 5rem;

  @media (max-width: 480px) {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  @media (min-width: 1200px) {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}


/* ===============================
   RESPONSIVE
================================== */
@media (max-width: 480px) {
  .hero-title { font-size:2rem; }
  .hero-subtitle { font-size:1rem; }
  .section-title { font-size:1.2rem; }
  .profile-image { width:120px; height:120px; }
  .btn-custom { padding:0.4rem 0.8rem; font-size:0.85rem; }
  section { padding:1rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
  .hero-title { font-size:2.5rem; }
  .hero-subtitle { font-size:1.2rem; }
  .section-title { font-size:1.5rem; }
  .profile-image { width:150px; height:150px; }
  .btn-custom { padding:0.5rem 1rem; font-size:0.9rem; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hero-title { font-size:3rem; }
  .hero-subtitle { font-size:1.5rem; }
  .section-title { font-size:2.5rem; }
  .profile-image { width:200px; height:200px; }
  .btn-custom { padding:0.7rem 1.2rem; font-size:0.95rem; }
}

@media (min-width:1025px) {
  section { min-height:100vh; }
  .hero-buttons .btn-custom { min-width:200px; }
}
