/* Variables */
:root {
  --color-dark: #1a1a1a;
  --color-green: #006749;
  --color-gray-light: #f3f3f3;
}

/* Reset de base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

/* Utilitaires */
.container {
  width: 100%;
  padding-right: 1rem;
  padding-left: 1rem;
  margin-right: auto;
  margin-left: auto;
  max-width: 1140px;
}

.text-center {
  text-align: center;
}

.text-uppercase {
  text-transform: uppercase;
}

.text-green {
  color: var(--color-green) !important;
}

.text-gray {
  color: var(--color-dark) !important;
}

.text-primary {
  color: #f3f3f3 !important;
}

.text-secondary {
  color: var(--color-dark) !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.lead {
  font-size: 1.25rem;
  font-weight: 300;
}

/* Fonds */
.bg-primary {
  background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%) !important;
}

.bg-secondary {
  background: linear-gradient(135deg, #4d4d4d 0%, #666666 100%) !important;
}

.bg-tertiary {
  background: linear-gradient(135deg, #e9e9e9 0%, #f3f3f3 100%) !important;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  background: linear-gradient(135deg, #e9e9e9 0%, #f3f3f3 100%);
}

.navbar > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.navbar-brand {
  font-size: 1.25rem;
  text-decoration: none;
  white-space: nowrap;
  padding: 2px;
  display: flex;
  align-items: center;
}

.navbar-nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  margin: 0 0.5rem;
}

.nav-link {
  color: var(--color-dark) !important;
  text-decoration: none;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
  color: var(--color-green) !important;
}

/* Sections */
.page-section {
  padding: 2rem 0;
}

/* Image d'en-tête */
.masthead {
  width: 100%;
  margin-top: 64px; /* Hauteur de la barre de navigation */
}

.masthead .container {
  width: 100%;
  max-width: 100%;
  padding: 0;
}

.masthead-avatar {
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* Liens */
a {
  color: var(--color-gray-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-green);
}

/* Responsive */
@media (max-width: 991.98px) {
  .navbar {
    flex-wrap: wrap;
  }
  
  .navbar > .container {
    flex-wrap: wrap;
  }
  
  .navbar-collapse {
    display: none;
    width: 100%;
    order: 3;
    background: linear-gradient(135deg, #e9e9e9 0%, #f3f3f3 100%);
  }
  
  .navbar-collapse.show {
    display: block;
  }
  
  .masthead {
    margin-top: 56px; /* Hauteur réduite sur mobile */
  }
  
  .navbar-nav {
    flex-direction: column;
    width: 100%;
    padding: 5px 0;
  }
  
  .nav-item {
    margin: 0;
    width: 100%;
    text-align: center;
    padding-bottom: 2px;
  }
  
  .nav-link {
    padding: 0.75rem 1rem;
    display: block;
  }
  
  .navbar-toggler {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.25rem;
    background: transparent;
    cursor: pointer;
    margin-left: auto;
    order: 2;
  }
}

@media (min-width: 992px) {
  .navbar-collapse {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
  }
  
  .navbar-nav {
    align-items: center;
  }
  
  .nav-link {
    padding-top: 0;
    padding-bottom: 0.5rem;
  }
  
  .navbar-toggler {
    display: none;
  }
  
  .nav-item {
    margin: 0 1rem;
  }
}

/* Grille des réalisations */
.realisations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin: 2rem auto;
  max-width: 1000px;
  padding: 0 1rem;
  justify-content: center;
}

.realisation-item {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.realisation-item a {
  position: relative;
  display: block;
  width: 100%;
  max-width: 500px;
  overflow: hidden;
  border-radius: 8px;
}

.realisation-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  object-fit: cover;
  aspect-ratio: 4/3;
  pointer-events: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -moz-user-drag: none;
}

/* Titre overlay - SUPERPOSÉ sur l'image */
.realisation-item .image-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 10;
  padding: 10px 20px;
  white-space: nowrap;
  
  /* Ombre portée pour la lisibilité */
  text-shadow: 
    2px 2px 4px rgba(0, 0, 0, 0.9),
    -2px -2px 4px rgba(0, 0, 0, 0.9),
    2px -2px 4px rgba(0, 0, 0, 0.9),
    -2px 2px 4px rgba(0, 0, 0, 0.9),
    0 0 8px rgba(0, 0, 0, 0.9);
}

/* Overlay sombre au survol pour améliorer la lisibilité */
.realisation-item a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  z-index: 1;
  border-radius: 8px;
}

.realisation-item a:hover::before {
  background: rgba(0, 0, 0, 0.3);
}

.realisation-item a:hover img {
  transform: scale(1.05);
}

/* Responsive pour mobile */
@media (max-width: 768px) {
  .realisations-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }

  .realisation-item img {
    max-width: 100%;
    width: 100%;
  }
  
  .realisation-item .image-title {
    font-size: 1.2rem;
    padding: 8px 15px;
  }
  
  .realisation-item a {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .realisation-item .image-title {
    font-size: 1rem;
    padding: 5px 10px;
  }
}