/**********************************************
 *  GLOBAL VARIABLES & BASE STYLES
 **********************************************/
:root {
  --color-dark: #031900;
  --color-light: #deecde;
  --color-light-alt: #d0dcd0;
  --color-medium: #adb6ad;

  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  margin: 0;
  width: 100%;
  overflow-x: hidden;
  color: var(--color-dark);
}

/* Headings & Typography */
h1, h2, h3, h4, blockquote, .navbar-brand {
  font-family: var(--font-serif);
}

h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.8rem; font-weight: 600; }
h3, h4 { font-weight: 600; }

p.lead { font-size: 1.05rem; }
.text-muted { color: var(--color-dark) !important; }

/**********************************************
 *  HERO SECTION
 **********************************************/
.hero {
  height: 100vh;
  background: url('../img/accueil_banner.jpg') center/cover no-repeat fixed;
  color: var(--color-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero h1 {
  text-shadow: 0 0 10px rgba(0,0,0,0.4);
}

.hero h2 {
  font-size: 1.2rem;
  font-style: italic;
  text-shadow: 0 0 10px rgba(0,0,0,0.4);
}

.mini-hero {
  height: 33vh !important;
}

/**********************************************
 *  SECTIONS
 **********************************************/
section {
  padding: 6vh 4vw;
}

section:nth-child(odd) {
  background-color: var(--color-light);
}

/**********************************************
 *  NAVIGATION
 **********************************************/
.navbar {
  background: var(--color-dark);
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
}

.nav-link,
.navbar-brand {
  font-weight: 500;
  color: var(--color-light-alt) !important;
}

/**********************************************
 *  BUTTONS
 **********************************************/
.btn {
  background: rgba(222,236,222,0.2);
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
  color: var(--color-light);
}

.btn-dark {
  background: var(--color-dark);
  color: var(--color-light-alt);
}

.btn-section {
  display: block;
  margin: 1rem auto;
  transition: transform 0.2s ease;
}

.btn-section:hover {
  transform: scale(1.1);
}

/* Prevent overlay button from taking focus */
.btn-discover {
  pointer-events: none;
}
/**********************************************
 *  CARDS
 **********************************************/
.card {
  background: #fff;
  border: none;
  margin: 1vh 0;
  transition: transform 0.3s ease;
}

#home-project-cards .card:hover {
  transform: scale(1.05);
}

/* Alternating project card backgrounds */
.project-card:nth-child(even)   { background: var(--color-medium) !important; }
.project-card:nth-child(odd)    { background: var(--color-light-alt) !important; }

.card-link-wrapper {
  display: block;
  color: inherit; /* keep text color natural */
}

.card-link-wrapper:hover .card,
.card-link-wrapper:focus .card {
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

/* Remove blue link highlights inside card */
.card-link-wrapper:hover .card-title,
.card-link-wrapper:hover p {
  text-decoration: none;
}

/* Keep focus accessibility */
.card-link-wrapper:focus {
  outline: 2px solid var(--color-dark);;
  outline-offset: 4px;
}

/**********************************************
 *  IMAGE WRAPPER & OVERLAY (Discover button)
 **********************************************/
.img-wrapper {
  position: relative;
  overflow: hidden;
}

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

.img-wrapper .overlay {
  position: absolute;
  inset: 0;
  background: rgba(80, 80, 80, 0.55);
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* "Discover" button */
.btn-discover {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
  font-weight: 500;
  letter-spacing: 0.5px;
}

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

.img-wrapper:hover .overlay {
  opacity: 1;
}

.img-wrapper:hover .btn-discover {
  opacity: 1;
  transform: translateY(0);
}

/**********************************************
 *  CAROUSEL
 **********************************************/
.carousel-item img {
  height: 40vh;
  object-fit: cover;
  width: 100%;
}

/**********************************************
 *  FORMS
 **********************************************/
input.form-control,
textarea.form-control {
  color: var(--color-dark);
}

/**********************************************
 *  FOOTER
 **********************************************/
footer {
  background: var(--color-dark);
  color: var(--color-light-alt);
  padding: 40px 0;
  text-align: center;
}

/**********************************************
 *  RESPONSIVE BREAKPOINTS (Mobile-first)
 *  Matches Bootstrap breakpoints
 **********************************************/

/* ≥ 576px — Small devices */
@media (min-width: 576px) {
  h1 { font-size: 2.4rem; }
  .hero { height: 100vh; }
}

/* ≥ 768px — Medium (tablets) */
@media (min-width: 768px) {
  h1 { font-size: 2.8rem; }
  .hero h2 { font-size: 1.4rem; }
}

/* ≥ 992px — Large (laptops) */
@media (min-width: 992px) {
  h1 { font-size: 3.2rem; }
  .hero { height: 100vh; }
}

/* ≥ 1200px — XL (desktops) */
@media (min-width: 1200px) {
  h1 { font-size: 3.8rem; }
  .hero h1 { font-size: 4rem; }
}

/* ≥ 1400px — XXL (large monitors) */
@media (min-width: 1400px) {
  .hero h1 { font-size: 4.5rem; }
}
