/* ==========================================
   PORTFOLIO PREMIUM - STYLES PERSONNALISÉS
   Thème Bordeaux - Moderne & Élégant
   ========================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
}

/* ========== GLASSMORPHISM ========== */
.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(123, 3, 35, 0.08);
  box-shadow: 0 8px 32px 0 rgba(123, 3, 35, 0.12);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(123, 3, 35, 0.15);
  box-shadow: 0 12px 48px 0 rgba(123, 3, 35, 0.2);
  transform: translateY(-5px);
}

/* ========== LOADER ========== */
.loader-circle {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========== NAVIGATION ========== */
nav {
  transition: all 0.3s ease;
}

nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px rgba(123, 3, 35, 0.1);
}

/* ========== HERO ANIMATIONS ========== */
.hero-title {
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  animation: fadeInUp 1.2s ease-out;
}

.cta-button {
  animation: fadeInUp 1.4s ease-out;
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
  width: 300px;
  height: 300px;
}

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

/* ========== STATS ANIMATIONS ========== */
.stat-item {
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-10px);
}

/* ========== SWIPER CUSTOMIZATION ========== */
.swiper {
  padding: 2rem 0 4rem;
}

.swiper-button-next,
.swiper-button-prev {
  color: #7B0323 !important;
  width: 50px !important;
  height: 50px !important;
  background: white;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(123, 3, 35, 0.2);
  transition: all 0.3s ease;
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 20px !important;
  font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: #7B0323;
  color: white !important;
  transform: scale(1.1);
}

.swiper-pagination-bullet {
  width: 12px !important;
  height: 12px !important;
  background: #7B0323 !important;
  opacity: 0.3 !important;
  transition: all 0.3s ease !important;
}

.swiper-pagination-bullet-active {
  opacity: 1 !important;
  width: 30px !important;
  border-radius: 6px !important;
}

/* ========== PORTFOLIO / PROJECTS ========== */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  transition: all 0.5s ease;
}

.portfolio-item img {
  transition: transform 0.5s ease;
}

.portfolio-item:hover img {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(123, 3, 35, 0.95), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

/* ========== PARTNER LOGOS ========== */
.partner-logo {
  transition: all 0.3s ease;
  cursor: pointer;
  background-color: #ffffff !important;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-logo img {
  filter: grayscale(0%) !important;
  opacity: 1 !important;
  max-height: 80px;
  width: auto;
  object-fit: contain;
}

.partner-logo:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 16px 48px rgba(123, 3, 35, 0.25) !important;
}

.partner-logo:hover img {
  filter: grayscale(0%) !important;
  opacity: 1 !important;
}

/* ========== FAQ ACCORDION ========== */
.faq-toggle.active i {
  transform: rotate(180deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-content.active {
  max-height: 500px;
  display: block !important;
}

/* ========== FORM STYLES ========== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  background-color: #ffffff !important;
  color: #2d2d2d !important;
  font-size: 16px;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #7B0323 !important;
  box-shadow: 0 0 0 3px rgba(123, 3, 35, 0.1) !important;
  background-color: #ffffff !important;
}

input::placeholder,
textarea::placeholder {
  color: #9CA3AF !important;
  opacity: 1;
}

/* Style pour les options du select */
select option {
  background-color: #ffffff;
  color: #2d2d2d;
  padding: 10px;
}

/* Success Message */
.form-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
}

/* Error Message */
.form-error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
}

/* ========== BUTTONS ========== */
button,
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

button:active,
.btn:active {
  transform: scale(0.98);
}

/* ========== TIMELINE ========== */
.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #7B0323, transparent);
}

/* ========== SCROLL ANIMATIONS ========== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* ========== HOVER EFFECTS ========== */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(123, 3, 35, 0.2);
}

.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(123, 3, 35, 0.4);
}

/* ========== GRADIENT TEXT ========== */
.gradient-text {
  background: linear-gradient(135deg, #7B0323 0%, #f6efe8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== PULSE ANIMATION ========== */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* ========== BOUNCE ANIMATION ========== */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-bounce {
  animation: bounce 2s ease-in-out infinite;
}

/* ========== RESPONSIVE UTILITIES ========== */
@media (max-width: 768px) {
  .swiper-button-next,
  .swiper-button-prev {
    width: 40px !important;
    height: 40px !important;
  }
  
  .swiper-button-next::after,
  .swiper-button-prev::after {
    font-size: 16px !important;
  }
  
  .hero-title {
    font-size: 2.5rem !important;
  }
  
  .hero-subtitle {
    font-size: 1.25rem !important;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2rem !important;
  }
  
  .hero-subtitle {
    font-size: 1rem !important;
  }
}

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 12px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7B0323 0%, #a30429 100%);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #a30429 0%, #7B0323 100%);
}

/* ========== SELECTION COLOR ========== */
::selection {
  background: #7B0323;
  color: white;
}

::-moz-selection {
  background: #7B0323;
  color: white;
}

/* ========== IMAGE LOADING ========== */
img {
  transition: opacity 0.3s ease;
}

img[data-loaded="false"] {
  opacity: 0;
}

img[data-loaded="true"] {
  opacity: 1;
}

/* ========== PRINT STYLES ========== */
@media print {
  nav,
  footer,
  .swiper-button-next,
  .swiper-button-prev,
  .swiper-pagination {
    display: none !important;
  }
}

/* ========== ACCESSIBILITY ========== */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: #7B0323;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  z-index: 100;
}

.skip-to-content:focus {
  top: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 3px solid #7B0323;
  outline-offset: 3px;
}

/* ========== UTILITY CLASSES ========== */
.text-shadow {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.shadow-primary {
  box-shadow: 0 10px 30px rgba(123, 3, 35, 0.3);
}

.border-primary {
  border-color: #7B0323;
}

.bg-primary-gradient {
  background: linear-gradient(135deg, #7B0323 0%, #a30429 100%);
}

.bg-cream-gradient {
  background: linear-gradient(135deg, #f6efe8 0%, #ffffff 100%);
}

/* ========== PAGE TRANSITIONS ========== */
.page-transition {
  animation: pageTransition 0.5s ease;
}

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

/* ========== MOBILE MENU ANIMATION ========== */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

#mobile-menu.active {
  max-height: 500px;
}

/* ========== CARD HOVER EFFECTS ========== */
.card-shine {
  position: relative;
  overflow: hidden;
}

.card-shine::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: rotate(45deg);
  transition: all 0.6s ease;
}

.card-shine:hover::before {
  left: 100%;
}

/* ========== LOGO ANIMATION ========== */
@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

nav a .w-12 {
  animation: logoFloat 3s ease-in-out infinite;
}

/* ========== FOOTER STYLES ========== */
footer a {
  position: relative;
}

footer a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #7B0323;
  transition: width 0.3s ease;
}

footer a:hover::after {
  width: 100%;
}
