/* ============================================
   ANIMATION.CSS - Escalier Monte au Bois
   Transitions, Transforms & Animations
   ============================================ */

/* ============================================
   1. GLOBAL TRANSITIONS
   ============================================ */
:root {
  --transition: 0.3s ease;
  --transition-fast: 0.15s ease;
  --transition-slow: 0.5s ease;
}

/* ============================================
   2. LINK ANIMATIONS
   ============================================ */
a {
  transition: color var(--transition);
}

a:hover {
  color: #346b3b;
}

/* ============================================
   3. HEADER ANIMATIONS
   ============================================ */
header {
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

header:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.logo {
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: perspective(1000px) rotateY(-5deg) scale(1.02);
}

.logo img {
  transition: filter 0.3s ease;
}

.logo:hover img {
  filter: drop-shadow(0 4px 12px rgba(67, 102, 59, 0.2));
}

.header-link {
  transition: all 0.3s ease;
  position: relative;
}

.header-link::before {
  transition: opacity 0.3s ease;
}

.header-link:hover {
  color: white;
  transform: translateY(-2px);
}

.header-link:hover::before {
  opacity: 0.08;
}

.header-link img {
  transition: transform 0.3s ease;
}

.header-link:hover img {
  transform: scale(1.15) rotate(5deg);
}

/* ============================================
   4. NAVIGATION ANIMATIONS
   ============================================ */
nav a {
  transition: all 0.3s ease;
  position: relative;
}

nav a::before {
  transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

nav a:hover {
  color: var(--color-primary);
  transform: translateY(-2px);
}

nav a:hover::before {
  width: 100%;
}

/* Hamburger Menu */
.hamburger {
  transition: all 0.3s ease;
}

.hamburger:hover {
  background: rgba(67, 102, 59, 0.08);
  transform: scale(1.1);
}

/* ============================================
   5. HAMBURGER MENU ANIMATIONS
   ============================================ */
.hamburger span {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ============================================
   6. BUTTON ANIMATIONS
   ============================================ */
.btn {
  transition: all var(--transition);
}

.btn:hover {
  background-color: #346b3b;
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(67, 102, 59, 0.3);
}

.btn-primary:hover {
  background: #2d5f33;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(67, 102, 59, 0.3);
}

input[type="submit"],
button[type="submit"],
.btn-submit {
  transition: all var(--transition);
}

input[type="submit"]:hover,
button[type="submit"]:hover,
.btn-submit:hover {
  background-color: #346b3b;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(67, 102, 59, 0.3);
}

/* ============================================
   7. FORM ANIMATIONS
   ============================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  transition: border-color var(--transition), box-shadow var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(67, 102, 59, 0.1);
}

/* ============================================
   8. GALLERY ANIMATIONS
   ============================================ */
.gallery-item {
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
  transition: transform var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* ============================================
   9. SERVICE CARD ANIMATIONS
   ============================================ */
.service-card {
  transition: all var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(67, 102, 59, 0.15);
}

/* ============================================
   10. HERO IMAGE ANIMATIONS
   ============================================ */
.hero-image {
  transition: transform var(--transition);
}

.hero-image:hover {
  transform: scale(1.02);
}

/* ============================================
   11. CONTACT IMAGE ANIMATIONS
   ============================================ */
.contact-image {
  transition: transform var(--transition), box-shadow var(--transition);
}

.contact-image:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* ============================================
   12. SMOOTH PAGE TRANSITIONS
   ============================================ */
html {
  scroll-behavior: smooth;
}

body {
  animation: fadeIn var(--transition);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============================================
   13. FOCUS STATES & ACCESSIBILITY
   ============================================ */
a:focus,
button:focus,
input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  transition: outline-offset var(--transition-fast);
}

a:focus:not(:focus-visible) {
  outline: none;
}

/* ============================================
   14. ELEMENT HOVER LIFT EFFECTS
   ============================================ */
h1, h2, h3 {
  transition: color var(--transition);
}

h1:hover, h2:hover, h3:hover {
  color: #2d5f33;
}

/* ============================================
   15. IMAGE HOVER EFFECTS
   ============================================ */
img {
  transition: opacity var(--transition);
}

img:hover {
  opacity: 0.9;
}

/* ============================================
   16. FORM SUCCESS/ERROR ANIMATIONS
   ============================================ */
.form-success,
.form-error {
  animation: slideIn var(--transition) ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   17. RESPONSIVE ANIMATIONS
   ============================================ */
@media (max-width: 991px) {
  .hamburger span {
    transition: all var(--transition);
  }

  nav ul {
    transition: display var(--transition);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================
   18. MICRO-INTERACTIONS
   ============================================ */
button, a, input[type="submit"] {
  cursor: pointer;
  user-select: none;
}

/* Text selection animation */
::selection {
  background-color: var(--color-primary);
  color: white;
  transition: background-color var(--transition);
}

::-moz-selection {
  background-color: var(--color-primary);
  color: white;
  transition: background-color var(--transition);
}

/* ============================================
   19. SCROLL PERCENTAGE INDICATOR
   ============================================ */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 6px;
  transition: background var(--transition);
}

::-webkit-scrollbar-thumb:hover {
  background: #2d5f33;
}

/* ============================================
   20. FEATURE CARD ANIMATIONS
   ============================================ */
.feature-card {
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(67, 102, 59, 0.15);
  border-color: var(--color-primary);
}

.feature-icon {
  transition: transform var(--transition);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

/* ============================================
   21. STEP ANIMATIONS
   ============================================ */
.step {
  transition: all var(--transition);
}

.step-number {
  transition: all var(--transition);
}

.step:hover {
  transform: translateY(-3px);
}

.step:hover .step-number {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(67, 102, 59, 0.3);
}

/* ============================================
   22. GALLERY PREVIEW ANIMATIONS
   ============================================ */
.gallery-preview-img {
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-preview-img:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(67, 102, 59, 0.2);
}

/* ============================================
   23. CTA SECTION ANIMATIONS
   ============================================ */
.cta-final .btn {
  transition: all var(--transition);
}

.cta-final .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.cta-final .btn-outline:hover {
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* ============================================
   24. CONTACT FORM ANIMATIONS
   ============================================ */
.info-card {
  transition: all var(--transition), border-color var(--transition);
}

.info-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 8px 25px rgba(67, 102, 59, 0.1);
  transform: translateY(-3px);
}

.form-group input,
.form-group textarea {
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(67, 102, 59, 0.1);
}

/* ============================================
   25. GALLERY MODERN ANIMATIONS
   ============================================ */
.gallery-item-modern {
  transition: all var(--transition);
}

.gallery-item-modern:hover {
  box-shadow: 0 15px 40px rgba(67, 102, 59, 0.2);
  transform: translateY(-5px);
}

.gallery-item-modern img {
  transition: transform var(--transition);
}

.gallery-item-modern:hover img {
  transform: scale(1.08);
}

/* ============================================
   26. FOOTER ANIMATIONS
   ============================================ */
.footer-links li a {
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links li a::before {
  transition: transform 0.3s ease, color 0.3s ease;
}

.footer-links li a:hover {
  color: white;
  padding-left: 8px;
}

.footer-links li a:hover::before {
  transform: translateX(4px);
  color: white;
}

.social-link {
  transition: all 0.3s ease;
}

.social-link:hover {
  transform: translateY(-4px) scale(1.1);
  animation: socialPulse 0.6s ease;
}

@keyframes socialPulse {
  0%, 100% {
    box-shadow: 0 8px 20px rgba(67, 102, 59, 0.3);
  }
  50% {
    box-shadow: 0 12px 30px rgba(67, 102, 59, 0.5);
  }
}

.contact-item a {
  transition: all 0.3s ease;
}

.contact-item a:hover {
  text-shadow: 0 0 8px rgba(90, 140, 74, 0.3);
}

.footer-bottom-links a {
  transition: all 0.3s ease;
}

.footer-bottom-links a::after {
  transition: width 0.3s ease;
}

.footer-bottom-links a:hover {
  transform: translateY(-2px);
}

.footer-subheading {
  position: relative;
  display: inline-block;
}

.footer-subheading::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), transparent);
  transition: width 0.4s ease;
}

.footer-column:hover .footer-subheading::after {
  width: 50px;
}
