/* ========================================
   ETPCL - STYLES PERSONNALISÉS OPTIMISÉS
   Palette de couleurs officielle
   ======================================== */

/* Performance optimizations */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-display: swap;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Variables CSS pour la palette de couleurs */
:root {
  /* Couleurs principales de la nouvelle palette */
  --turquoise: #09DBC7;
  --bleu-marine: #17364F;
  --bleu-fonce: #0D1A2F;
  --violet-fonce: #411E3A;
  --rouge-vif: #BD0927;
  --rouge-fonce: #500A1F;
  
  /* Couleurs supplémentaires pour l'harmonie */
  --blanc: #ffffff;
  --gris-clair: #f8fafc;
  --gris-moyen: #6b7280;
  --noir: #000000;
}

/* ========================================
   CONFIGURATION TAILWIND PERSONNALISÉE
   ======================================== */

/* Override des couleurs Tailwind avec notre palette */
.bg-primary {
  background-color: var(--bleu-marine) !important;
}

.bg-secondary {
  background-color: var(--turquoise) !important;
}

.bg-accent {
  background-color: var(--rouge-vif) !important;
}

.text-primary {
  color: var(--bleu-marine) !important;
}

.text-secondary {
  color: var(--turquoise) !important;
}

.text-accent {
  color: var(--rouge-vif) !important;
}

.border-primary {
  border-color: var(--bleu-marine) !important;
}

.border-secondary {
  border-color: var(--turquoise) !important;
}

.border-accent {
  border-color: var(--rouge-vif) !important;
}

/* ========================================
   STYLES PERSONNALISÉS
   ======================================== */

/* Section Accueil avec image de fond */
.hero-section {
  background: linear-gradient(135deg, rgba(23, 54, 79, 0.85) 0%, rgba(9, 219, 199, 0.75) 100%), 
              url('../img/bg.jpg') center/cover no-repeat;
  min-height: 100vh;
  position: relative;
  background-attachment: fixed;
}

/* Dégradés personnalisés */
.gradient-bg {
  background: linear-gradient(135deg, var(--bleu-marine) 0%, var(--turquoise) 100%);
}

.gradient-bg-reverse {
  background: linear-gradient(135deg, var(--turquoise) 0%, var(--bleu-marine) 100%);
}

.gradient-bg-light {
  background: linear-gradient(135deg, var(--turquoise) 0%, var(--rouge-vif) 100%);
}

/* Boutons personnalisés */
.btn-primary {
  background: var(--rouge-fonce);
  color: var(--blanc);
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(80, 10, 31, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(80, 10, 31, 0.4);
}

.btn-secondary {
  background: var(--rouge-fonce);
  color: var(--blanc);
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(80, 10, 31, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(80, 10, 31, 0.4);
}

/* Boutons Hero personnalisés */
.btn-hero-primary {
  background: var(--rouge-fonce);
  color: var(--blanc);
  border: none;
  padding: 16px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(80, 10, 31, 0.4);
  min-width: 220px;
  text-align: center;
}

.btn-hero-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(80, 10, 31, 0.5);
  color: var(--blanc);
  text-decoration: none;
}

.btn-hero-secondary {
  background: transparent;
  color: var(--blanc);
  border: 3px solid var(--blanc);
  padding: 16px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  min-width: 220px;
  text-align: center;
}

.btn-hero-secondary:hover {
  background: var(--blanc);
  color: var(--bleu-marine);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.3);
  text-decoration: none;
}

/* Cartes avec couleurs personnalisées */
.card-primary {
  background: var(--blanc);
  border: 2px solid var(--bleu-marine);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(23, 54, 79, 0.1);
  transition: all 0.3s ease;
}

.card-primary:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(23, 54, 79, 0.2);
}

.card-secondary {
  background: var(--blanc);
  border: 2px solid var(--turquoise);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(9, 219, 199, 0.1);
  transition: all 0.3s ease;
}

.card-secondary:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(9, 219, 199, 0.2);
}

/* Icônes avec couleurs personnalisées */
.icon-primary {
  color: var(--bleu-marine);
  font-size: 2.5rem;
}

.icon-secondary {
  color: var(--turquoise);
  font-size: 2.5rem;
}

.icon-accent {
  color: var(--rouge-vif);
  font-size: 2.5rem;
}

/* Sections avec arrière-plans personnalisés */
.section-primary {
  background: linear-gradient(135deg, rgba(23, 54, 79, 0.05) 0%, rgba(9, 219, 199, 0.05) 100%);
}

.section-secondary {
  background: linear-gradient(135deg, rgba(9, 219, 199, 0.05) 0%, rgba(189, 9, 39, 0.05) 100%);
}

/* Navigation personnalisée */
.navbar-custom {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--bleu-marine);
}

.nav-link-custom {
  color: var(--bleu-fonce);
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link-custom:hover {
  color: var(--bleu-marine);
}

.nav-link-custom::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--bleu-marine);
  transition: width 0.3s ease;
}

.nav-link-custom:hover::after {
  width: 100%;
}

/* Bouton WhatsApp flottant */
.btn-whatsapp {
  background: #25D366;
  color: var(--blanc);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
  animation: pulse-whatsapp 2s infinite;
}

.btn-whatsapp:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
  color: var(--blanc);
  text-decoration: none;
}

@keyframes pulse-whatsapp {
  0% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 0 0 0 10px rgba(37, 211, 102, 0.1);
  }
  100% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  }
}

/* Titres avec couleurs personnalisées */
.title-primary {
  color: var(--bleu-marine);
  font-weight: 700;
  position: relative;
}

.title-primary::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, var(--bleu-marine) 0%, var(--turquoise) 100%);
  border-radius: 2px;
}

.title-secondary {
  color: var(--turquoise);
  font-weight: 700;
}

.title-accent {
  color: var(--rouge-vif);
  font-weight: 700;
}

/* Animations personnalisées optimisées */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translate3d(-30px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translate3d(30px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.8s ease-out;
}

.animate-fade-in-right {
  animation: fadeInRight 0.8s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
  from { opacity: 0; transform: translate3d(0, 30px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Effets de survol personnalisés optimisés */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.hover-lift:hover {
  transform: translate3d(0, -10px, 0);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.card-hover:hover {
  transform: translate3d(0, -10px, 0);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Formulaires personnalisés */
.form-control-custom {
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 12px 16px;
  transition: all 0.3s ease;
  font-size: 16px;
}

.form-control-custom:focus {
  border-color: var(--bleu-principal);
  box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
  outline: none;
}

/* Footer personnalisé */
.footer-custom {
  background: linear-gradient(135deg, var(--bleu-fonce) 0%, var(--violet-fonce) 100%);
  color: var(--blanc);
}

.footer-link {
  color: var(--gris-moyen);
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--turquoise);
}

/* Responsive design */
@media (max-width: 768px) {
  .hero-section {
    background-attachment: scroll;
  }
  
  .title-primary::after {
    width: 40px;
  }
  
  .card-primary,
  .card-secondary {
    padding: 20px;
  }
  
  /* Boutons hero responsive */
  .btn-hero-primary,
  .btn-hero-secondary {
    min-width: 200px;
    padding: 14px 28px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .btn-hero-primary,
  .btn-hero-secondary {
    min-width: 180px;
    padding: 12px 24px;
    font-size: 0.95rem;
  }
  
  /* Bouton WhatsApp responsive */
  .btn-whatsapp {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
}

/* Styles pour les éléments spécifiques du site ETPCL */

/* Logo ETPCL personnalisé */
.logo-etpcl {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.logo-etpcl:hover {
  transform: translateY(-2px);
}

.logo-etpcl img {
  transition: all 0.3s ease;
}

.logo-etpcl:hover img {
  filter: brightness(1.1);
}

/* Statistiques avec couleurs personnalisées */
.stat-number {
  color: var(--bleu-marine);
  font-weight: 700;
  font-size: 3rem;
}

.stat-label {
  color: var(--gris-moyen);
  font-size: 1rem;
}

/* Services avec couleurs alternées */
.service-card:nth-child(odd) {
  border-left: 4px solid var(--bleu-marine);
}

.service-card:nth-child(even) {
  border-left: 4px solid var(--turquoise);
}

/* Contact avec style personnalisé */
.contact-info {
  background: linear-gradient(135deg, rgba(23, 54, 79, 0.1) 0%, rgba(9, 219, 199, 0.1) 100%);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
}

.contact-icon {
  background: var(--bleu-marine);
  color: var(--blanc);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Responsive pour les logos */
@media (max-width: 768px) {
  .logo-etpcl img {
    height: 2.5rem;
  }
}

@media (max-width: 480px) {
  .logo-etpcl img {
    height: 2rem;
  }
}

/* ========================================
   STYLES POUR LES NOUVELLES FONCTIONNALITÉS
   ======================================== */

/* Portfolio Styles */
.portfolio-filter {
  background: var(--blanc);
  border: 2px solid var(--bleu-marine);
  color: var(--bleu-marine);
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.portfolio-filter:hover,
.portfolio-filter.active {
  background: var(--bleu-marine);
  color: var(--blanc);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(23, 54, 79, 0.3);
}

.portfolio-item {
  transition: all 0.3s ease;
}

.portfolio-item.hidden {
  display: none;
}

.portfolio-overlay {
  transition: all 0.3s ease;
}

.portfolio-details-btn {
  transition: all 0.3s ease;
}

.portfolio-details-btn:hover {
  transform: translateX(5px);
}

/* Calculateur de Devis Styles */
.calculator-step {
  transition: all 0.5s ease;
}

.calculator-step.hidden {
  display: none;
}

.service-option {
  transition: all 0.3s ease;
  cursor: pointer;
}

.service-option:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-option.selected {
  border-color: var(--bleu-marine);
  background: var(--bleu-marine);
  color: var(--blanc);
}

.service-option.selected h4,
.service-option.selected p,
.service-option.selected div {
  color: var(--blanc);
}

/* Chatbot Styles */
#chatbot-window {
  animation: slideUp 0.3s ease-out;
}

.quick-action-btn {
  background: var(--gris-clair);
  color: var(--gris-fonce);
  border: none;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.quick-action-btn:hover {
  background: var(--bleu-marine);
  color: var(--blanc);
  transform: translateY(-1px);
}

.chat-message {
  animation: fadeInUp 0.3s ease-out;
}

.chat-message.user {
  margin-left: auto;
  flex-direction: row-reverse;
}

.chat-message.user .message-bubble {
  background: var(--bleu-marine);
  color: var(--blanc);
}

.message-bubble {
  background: var(--gris-clair);
  color: var(--gris-fonce);
  padding: 10px 15px;
  border-radius: 18px;
  max-width: 80%;
  word-wrap: break-word;
}

/* Statistiques Animées */
.stat-counter {
  transition: all 0.3s ease;
}

/* Animations supplémentaires */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* Responsive pour les nouvelles fonctionnalités */
@media (max-width: 768px) {
  .portfolio-filter {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  
  .service-option {
    padding: 1rem;
  }
  
  #chatbot-window {
    width: 90vw;
    height: 80vh;
    right: 5vw;
    bottom: 5vh;
  }
  
  .quick-action-btn {
    font-size: 0.7rem;
    padding: 4px 8px;
  }
  
  /* Mobile touch optimizations */
  .btn-hero-primary,
  .btn-hero-secondary,
  .service-option,
  .portfolio-filter {
    min-height: 44px; /* Minimum touch target size */
    touch-action: manipulation;
  }
  
  /* Improve scrolling on mobile */
  .hero-section {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Optimize animations for mobile */
  .hover-lift:hover,
  .card-hover:hover {
    transform: none; /* Disable hover effects on touch devices */
  }
}

@media (max-width: 480px) {
  .portfolio-filter {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .service-option {
    padding: 0.75rem;
  }
  
  .service-option h4 {
    font-size: 0.9rem;
  }
  
  .service-option p {
    font-size: 0.8rem;
  }
  
  .service-option div {
    font-size: 0.8rem;
  }
  
  /* Extra small screen optimizations */
  .container {
    padding: 0 0.75rem;
  }
  
  .text-4xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
  
  .btn-hero-primary,
  .btn-hero-secondary {
    min-width: 160px;
    padding: 12px 20px;
    font-size: 0.9rem;
  }
  
  /* Improve readability on small screens */
  .text-sm {
    font-size: 0.875rem;
    line-height: 1.5;
  }
  
  /* Optimize spacing for small screens */
  .py-20 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}