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

/* --- BASE --- */
:root {
  --color-primary: #1e3c72;
  --color-secondary: #e67e22;
  --color-accent: #16a085;
  --color-text: #2c3e50;
  --transition: 0.4s ease;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--color-text);
  background-color: #f8f8f8;
  line-height: 1.6;
  animation: fadeIn 1s ease;
}

/* --- HEADER --- */
.site-header {
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  color: white;
  text-align: center;
  padding: 3rem 1rem;
  border-bottom: 4px solid var(--color-secondary);
  position: relative;
}

.site-header::after {
  content: "";
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--color-secondary);
  border-radius: 2px;
}

.logo {
  font-weight: 700;
  font-size: 2rem;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
  display: inline-block;
}

.site-header h1 {
  font-size: 2.3rem;
  font-weight: 500;
}

.site-header p {
  font-size: 1.1rem;
  font-weight: 300;
  margin-top: 0.5rem;
}

/* --- SPLIT SECTIONS --- */
.split-container {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.split {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: white;
  overflow: hidden;
  transition: flex 0.6s var(--transition);
}

.split-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  transition: var(--transition);
}

.split-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
}

.split-content h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-shadow: 0 3px 10px rgba(0,0,0,0.5);
}

.split-content p {
  font-weight: 300;
  margin-bottom: 1rem;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 100px);
  grid-gap: 10px;
  justify-content: center;
}

.image-grid img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.4s ease, box-shadow 0.3s ease;
}

.image-grid img:hover {
  transform: scale(1.1) rotate(2deg);
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* --- BACKGROUND IMAGES --- */
.split-left {
  background: url('images/IMG_0256.JPG') center/cover no-repeat;
}

.split-right {
  background: url('images/2dwp.jpg') center/cover no-repeat;
}

/* --- HOVER EFFECTS --- */
.split:hover {
  flex: 1.2;
}

.split:hover .split-overlay {
  background: rgba(0,0,0,0.65);
}

/* --- FOOTER --- */
footer {
  background-color: var(--color-primary);
  color: white;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

footer a {
  color: var(--color-secondary);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Animation d'apparition du logo et du titre === */

/* États initiaux */
.logo {
  opacity: 0;
  transform: translateY(-15px);
}

.site-header h1 {
  opacity: 0;
  transform: translateY(15px);
}

.site-header p {
  opacity: 0;
  transform: translateY(15px);
}

/* Définition des animations */
@keyframes fadeInSlideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Application des animations avec délais progressifs */
.logo {
  animation: fadeInSlideDown 1s ease forwards;
}

.site-header h1 {
  animation: fadeInSlideUp 1s ease 0.4s forwards;
}

.site-header p {
  animation: fadeInSlideUp 1s ease 0.8s forwards;
}


/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .split-container {
    flex-direction: column;
    height: auto;
  }

  .split {
    height: 50vh;
  }

  .split-content h1 {
    font-size: 1.5rem;
  }

  .image-grid {
    grid-template-columns: repeat(2, 80px);
  }

  .image-grid img {
    width: 80px;
    height: 80px;
  }
}
