/* ============================================================
   VARIABLES GLOBALES & RESET
   ============================================================ */
:root {
  --primary: #0b2b3a;
  --light-blue: #d8eaf0;
  --accent: #1f2f38;
  --white: #ffffff;
  --text-dark: #0e2530;
  --text-soft: #6c7a82;
  --font-main: 'Inter', sans-serif;
  --font-title: 'Playfair Display', serif;
  --font-logo: 'Great Vibes', cursive;
  --radius: 14px;
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--light-blue);
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--text-soft);
  overflow-x: hidden;
}

/* ============================================================
   ANIMATIONS PERSONNALISÉES
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================================
   TOP BAR
   ============================================================ */
.top-bar {
  background: var(--accent);
  color: white;
  padding: 12px 40px;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: fadeInUp 0.6s ease-out;
}

.top-icons {
  display: flex;
  gap: 20px;
}

.icon {
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.icon:hover {
  opacity: 0.7;
  transform: scale(1.15) rotate(5deg);
}

/* ============================================================
   HEADER PRINCIPAL
   ============================================================ */
.main-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 20px 40px;
  margin: 0 auto;
  max-width: 1300px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  animation: fadeInUp 0.8s ease-out;
  transition: var(--transition);
}

.logo h1 {
  font-family: var(--font-logo);
  color: var(--accent);
  font-size: 2.2rem;
  transition: var(--transition);
}

.logo h1:hover {
  transform: scale(1.05);
}

.main-nav ul {
  display: flex;
  gap: 35px;
  list-style: none;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  position: relative;
  padding: 5px 0;
  transition: var(--transition);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.main-nav a:hover::after {
  width: 100%;
}

.main-nav a:hover {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.login-btn {
  background: var(--accent);
  color: white;
  padding: 12px 26px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}

.login-btn:hover::before {
  left: 100%;
}

.login-btn:hover {
  background: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.heroSection {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  background: 
    linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
    url('images/heroimg.jpg') center/cover no-repeat;
  padding: 140px 40px;
  text-align: center;
  color: white;
  animation: scaleIn 1s ease-out;
}

.heroSection h5 {
  font-style: italic;
  opacity: 0.9;
  margin-bottom: 10px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.heroSection h1 {
  font-family: var(--font-title);
  font-size: 3rem;
  margin-bottom: 15px;
  line-height: 1.2;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.heroSection p {
  max-width: 600px;
  margin: 0 auto 25px;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.ctah {
  background: white;
  color: var(--accent);
  border: none;
  padding: 16px 32px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  animation: fadeInUp 0.8s ease-out 0.8s both;
  position: relative;
  overflow: hidden;
}

.ctah:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* ============================================================
   GRID SECTION
   ============================================================ */
.wrap {
  max-width: 1300px;
  margin: 80px auto;
  padding: 0 40px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 45px;
}

.card {
  background: var(--white);
  padding: 45px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  animation: fadeInUp 0.8s ease-out;
}

.card:nth-child(odd) {
  animation-delay: 0.1s;
}

.card:nth-child(even) {
  animation-delay: 0.2s;
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

/* Text blocks */
.kicker,
.small-kicker {
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--text-soft);
  letter-spacing: 1.2px;
  margin-bottom: 12px;
  font-weight: 600;
}

.hero-title {
  font-family: var(--font-title);
  color: var(--text-dark);
  font-size: 2.2rem;
  margin-bottom: 18px;
  line-height: 1.2;
}

.hero-desc {
  margin-bottom: 28px;
  font-size: 1.05rem;
}

.controls,
.sub-controls {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  background: var(--accent);
  color: white;
  padding: 14px 28px;
  border-radius: 40px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* Images hover */
.hero-image img,
.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  transition: var(--transition);
}

.hero-image,
.photo-card {
  overflow: hidden;
  border-radius: var(--radius);
}

.hero-image img:hover,
.photo-card img:hover {
  transform: scale(1.08);
}

/* Secondary Card */
.sub-title {
  font-family: var(--font-title);
  color: var(--text-dark);
  font-size: 1.6rem;
  margin-bottom: 16px;
  line-height: 1.3;
}

.ghost {
  opacity: 0.7;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta {
  max-width: 1300px;
  margin: 0 auto;
  padding: 140px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: 
    linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
    url("images/cta.jpg") center/cover no-repeat;
  text-align: center;
  color: white;
  transition: var(--transition);
  animation: scaleIn 1s ease-out;
}

.cta:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
}

.cta h3 {
  font-family: var(--font-title);
  font-size: 2.4rem;
  max-width: 650px;
  margin-bottom: 25px;
  line-height: 1.3;
}

.cta button {
  background: white;
  color: var(--accent);
  padding: 16px 34px;
  border-radius: 50px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.cta button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer-clean {
  background: white;
  padding: 80px 40px 20px;
  max-width: 1300px;
  margin: 0 auto;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 45px;
}

.footer-small-title {
  font-size: 0.9rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-clean h2 {
  font-family: var(--font-title);
  font-size: 2.2rem;
  margin-top: 10px;
  color: var(--text-dark);
  line-height: 1.2;
}

/* Footer links */
.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 12px;
}

.footer-col a {
  text-decoration: none;
  color: var(--text-dark);
  transition: var(--transition);
  position: relative;
  padding: 2px 0;
}

.footer-col a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: var(--transition);
}

.footer-col a:hover::after {
  width: 100%;
}

.footer-col a:hover {
  color: var(--accent);
}

/* CTA */
.footer-cta {
  background: var(--accent);
  color: white;
  padding: 14px 26px;
  border-radius: 40px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  margin-top: 15px;
  transition: var(--transition);
}

.footer-cta:hover {
  background: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* Bottom */
.footer-bottom {
  margin-top: 50px;
  padding-top: 25px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-socials {
  display: flex;
  gap: 20px;
}

.footer-socials span {
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.footer-socials span:hover {
  transform: rotate(12deg) scale(1.3);
  opacity: 0.8;
}

/* ============================================================
   RESPONSIVE DESIGN AMÉLIORÉ
   ============================================================ */
@media (max-width: 1200px) {
  .main-header,
  .heroSection,
  .wrap,
  .cta,
  .footer-clean {
    max-width: 100%;
    padding-left: 30px;
    padding-right: 30px;
  }
}

@media (max-width: 1024px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }
  
  .heroSection h1 {
    font-size: 2.5rem;
  }
  
  .cta h3 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .top-bar {
    padding: 10px 20px;
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .main-header {
    padding: 15px 20px;
    flex-direction: column;
    gap: 20px;
    position: relative;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .header-actions {
    gap: 15px;
  }
  
  .heroSection {
    padding: 100px 20px;
  }
  
  .heroSection h1 {
    font-size: 2rem;
  }
  
  .wrap {
    margin: 60px auto;
    padding: 0 20px;
  }
  
  .card {
    padding: 30px;
  }
  
  .cta {
    padding: 100px 20px;
  }
  
  .cta h3 {
    font-size: 1.6rem;
  }
  
  .footer-clean {
    padding: 60px 20px 20px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .heroSection {
    padding: 80px 15px;
  }
  
  .heroSection h1 {
    font-size: 1.8rem;
  }
  
  .cta {
    padding: 80px 15px;
  }
  
  .cta h3 {
    font-size: 1.4rem;
  }
  
  .card {
    padding: 25px;
  }
  
  .controls,
  .sub-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .btn,
  .login-btn,
  .ctah,
  .footer-cta {
    width: 100%;
    text-align: center;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* ============================================================
   ACCESSIBILITÉ & PERFORMANCE
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible pour l'accessibilité */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Amélioration du contraste */
@media (prefers-contrast: high) {
  :root {
    --text-soft: #2c2c2c;
    --light-blue: #e8f4f8;
  }
}