/* === RESET & BASE === */
* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
  font-family: Arial, Helvetica, sans-serif; 
}

body { 
  background: #f5f7fa; 
  color: #222;
  overflow-x: hidden;
}

/* === ÉCRAN DE CHARGEMENT === */
.loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeOut 0.5s ease-in-out 3s forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.loader-content {
  text-align: center;
  color: #fff;
}

.spinner {
  width: 80px;
  height: 80px;
  border: 8px solid rgba(255, 255, 255, 0.2);
  border-top: 8px solid #fff;
  border-radius: 50%;
  margin: 0 auto 30px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-text {
  font-size: 2.5em;
  margin-bottom: 10px;
  animation: pulse 1.5s ease-in-out infinite;
}

.loader-subtitle {
  font-size: 1.2em;
  opacity: 0.8;
  margin-bottom: 30px;
}

.progress-bar {
  width: 300px;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4ecdc4, #44a7db);
  border-radius: 10px;
  animation: loadProgress 3s ease-in-out forwards;
}

@keyframes loadProgress {
  from { width: 0%; }
  to { width: 100%; }
}

/* === HEADER === */
header { 
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); 
  color: #fff; 
  padding: 60px 20px; 
  text-align: center; 
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

header h1 { 
  font-size: 3em; 
  margin-bottom: 10px; 
  cursor: pointer;
  position: relative;
  z-index: 1;
}

header h1:hover { 
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

header p { 
  font-size: 1.2em; 
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.quick-actions { 
  position: absolute; 
  top: 20px; 
  left: 20px; 
  display: flex; 
  gap: 15px;
  z-index: 2;
}

.quick-btn { 
  background: rgba(255,255,255,0.2); 
  color: #fff; 
  padding: 12px 20px; 
  border-radius: 8px; 
  text-decoration: none; 
  font-weight: bold; 
  transition: all 0.3s; 
  backdrop-filter: blur(10px); 
  border: 1px solid rgba(255,255,255,0.3);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

.quick-btn:hover { 
  background: rgba(255,255,255,0.3); 
  transform: translateY(-2px) scale(1.05); 
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  animation: none;
}

.quick-btn:nth-child(1) {
  animation-delay: 0.2s;
}

.quick-btn:nth-child(2) {
  animation-delay: 0.4s;
}

/* === NAVIGATION === */
nav { 
  background: #203a43; 
  padding: 15px; 
  text-align: center; 
  position: sticky; 
  top: 0; 
  z-index: 100; 
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav a { 
  color: #fff; 
  text-decoration: none; 
  margin: 0 20px; 
  font-size: 1.1em; 
  transition: all 0.3s;
  position: relative;
  padding: 5px 0;
  display: inline-block;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #4ecdc4;
  transition: all 0.3s;
  transform: translateX(-50%);
}

nav a:hover::after {
  width: 100%;
}

nav a:hover { 
  color: #4ecdc4;
  transform: translateY(-2px);
}

/* === ANIMATIONS D'APPARITION === */
.fade-in {
  animation: fadeIn 1s ease-in-out;
}

.fade-in-delay {
  animation: fadeIn 1s ease-in-out 0.3s both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  animation: slideUp 0.8s ease-out;
}

.slide-up-delay {
  animation: slideUp 0.8s ease-out 0.3s both;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === SECTIONS === */
section { 
  padding: 60px 20px; 
  max-width: 1100px; 
  margin: auto; 
}

h2 { 
  text-align: center; 
  margin-bottom: 40px; 
  font-size: 2.2em; 
  color: #2c5364;
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #4ecdc4, #44a7db);
  border-radius: 2px;
  animation: expandLine 0.8s ease-out;
}

@keyframes expandLine {
  from {
    width: 0;
  }
  to {
    width: 80px;
  }
}

.about { 
  text-align: center; 
  max-width: 800px; 
  margin: auto; 
  font-size: 1.1em; 
  line-height: 1.6; 
}

/* === CARTES DE SERVICES === */
.services { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
  gap: 25px; 
}

.card { 
  background: #fff; 
  padding: 30px; 
  border-radius: 15px; 
  box-shadow: 0 10px 25px rgba(0,0,0,0.08); 
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
  cursor: pointer; 
  text-decoration: none; 
  color: inherit; 
  display: block;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(78,205,196,0.2), transparent);
  transition: left 0.5s;
}

.card:hover::before {
  left: 100%;
}

.card::after {
  content: '→';
  position: absolute;
  right: 20px;
  bottom: 20px;
  font-size: 1.5em;
  color: #2c5364;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s;
}

.card:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.card:hover { 
  transform: translateY(-10px) scale(1.02) rotate(1deg); 
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.card h3 { 
  margin-bottom: 15px; 
  color: #203a43;
  font-size: 1.5em;
  transition: color 0.3s;
}

.card:hover h3 {
  color: #4ecdc4;
}

.card p { 
  line-height: 1.5; 
}

.animate-card {
  opacity: 0;
  animation: cardAppear 0.6s ease-out forwards;
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* === CONTACT === */
.contact { 
  text-align: center; 
  background: #fff; 
  border-radius: 20px; 
  padding: 50px 20px; 
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  transition: transform 0.3s;
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(78,205,196,0.1) 0%, transparent 70%);
  animation: rotateGradient 10s linear infinite;
}

@keyframes rotateGradient {
  to { transform: rotate(360deg); }
}

.contact:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.contact p { 
  font-size: 1.1em; 
  margin-bottom: 10px;
  transition: all 0.3s;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.contact p:hover {
  transform: translateX(10px);
  color: #2c5364;
  font-weight: bold;
}

/* === FORMULAIRES === */
.form-group { 
  margin-bottom: 20px;
  animation: slideUp 0.5s ease-out backwards;
  position: relative;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }
.form-group:nth-child(6) { animation-delay: 0.6s; }
.form-group:nth-child(7) { animation-delay: 0.7s; }
.form-group:nth-child(8) { animation-delay: 0.8s; }

.form-group label { 
  display: block; 
  margin-bottom: 8px; 
  font-weight: bold; 
  color: #203a43;
  transition: color 0.3s;
}

.form-group:hover label {
  color: #4ecdc4;
}

.form-group input, .form-group select, .form-group textarea { 
  width: 100%; 
  padding: 12px; 
  border: 2px solid #e0e0e0; 
  border-radius: 8px; 
  font-size: 1em; 
  transition: all 0.3s; 
  background: #fff;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus { 
  outline: none; 
  border-color: #2c5364;
  transform: scale(1.02);
  box-shadow: 0 0 0 3px rgba(44,83,100,0.1);
  background: #f8fffe;
}

.form-group textarea { 
  resize: vertical; 
  min-height: 120px; 
}

.submit-btn { 
  background: linear-gradient(135deg, #2c5364, #203a43); 
  color: #fff; 
  padding: 15px 40px; 
  border: none; 
  border-radius: 8px; 
  font-size: 1.2em; 
  cursor: pointer; 
  transition: all 0.3s; 
  width: 100%;
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.submit-btn:hover::before {
  width: 300px;
  height: 300px;
}

.submit-btn:hover { 
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.submit-btn:active {
  transform: scale(0.98);
}

/* === COMMANDES === */
.orders-list { 
  display: grid; 
  gap: 20px; 
}

.order-card { 
  background: #fff; 
  padding: 25px; 
  border-radius: 12px; 
  box-shadow: 0 5px 15px rgba(0,0,0,0.08); 
  border-left: 5px solid #ccc;
  transition: all 0.3s;
  animation: slideUp 0.5s ease-out;
  position: relative;
  overflow: hidden;
}

.order-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 0;
  background: linear-gradient(180deg, #4ecdc4, #44a7db);
  transition: height 0.4s;
}

.order-card:hover::before {
  height: 100%;
}

.order-card:hover {
  transform: translateX(10px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.order-card.en-attente { border-left-color: #ff9800; }
.order-card.en-cours { border-left-color: #2196f3; }
.order-card.termine { border-left-color: #4caf50; }
.order-card.refuse { border-left-color: #f44336; }

.order-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 15px; 
  flex-wrap: wrap; 
  gap: 10px; 
}

.order-number { 
  font-weight: bold; 
  color: #203a43; 
  font-size: 1.1em;
  transition: color 0.3s;
}

.order-card:hover .order-number {
  color: #4ecdc4;
}

.order-status { 
  padding: 8px 16px; 
  border-radius: 20px; 
  font-size: 0.9em; 
  font-weight: bold;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.order-status.en-attente { background: #fff3e0; color: #e65100; }
.order-status.en-cours { background: #e3f2fd; color: #0d47a1; }
.order-status.termine { background: #e8f5e9; color: #1b5e20; }
.order-status.refuse { background: #ffebee; color: #b71c1c; }

.order-info { 
  margin: 10px 0; 
  color: #555; 
  line-height: 1.6; 
}

.order-info p {
  transition: transform 0.3s;
  padding-left: 10px;
  border-left: 2px solid transparent;
}

.order-info p:hover {
  transform: translateX(5px);
  border-left-color: #4ecdc4;
}

.order-info strong { 
  color: #203a43; 
}

.empty-orders { 
  text-align: center; 
  padding: 60px 20px; 
  color: #999; 
  font-size: 1.2em;
  animation: fadeIn 1s ease-in-out;
}

.success-message { 
  background: #e8f5e9; 
  color: #1b5e20; 
  padding: 20px; 
  border-radius: 8px; 
  margin-bottom: 20px; 
  border-left: 4px solid #4caf50;
  animation: slideDown 0.5s ease-out, glow 2s ease-in-out infinite;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(76, 175, 80, 0.3); }
  50% { box-shadow: 0 0 20px rgba(76, 175, 80, 0.6); }
}

/* === PAGES DE DÉTAIL === */
.detail-page { 
  display: none; 
  min-height: 60vh; 
}

.detail-page.active { 
  display: block; 
}

.back-btn { 
  background: #203a43; 
  color: #fff; 
  padding: 12px 30px; 
  border: none; 
  border-radius: 8px; 
  font-size: 1.1em; 
  cursor: pointer; 
  margin-bottom: 30px; 
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.back-btn::before {
  content: '←';
  position: absolute;
  left: 15px;
  transition: transform 0.3s;
}

.back-btn:hover::before {
  transform: translateX(-5px);
  animation: arrowBounce 0.6s ease infinite;
}

@keyframes arrowBounce {
  0%, 100% { transform: translateX(-5px); }
  50% { transform: translateX(-10px); }
}

.back-btn:hover { 
  background: #2c5364;
  transform: translateX(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  padding-left: 35px;
}

.detail-content { 
  background: #fff; 
  padding: 40px; 
  border-radius: 15px; 
  box-shadow: 0 10px 25px rgba(0,0,0,0.08); 
}

.detail-content h3 { 
  color: #203a43; 
  margin: 30px 0 15px 0; 
  font-size: 1.8em;
  position: relative;
  padding-left: 20px;
  animation: slideInFromLeft 0.6s ease-out;
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.detail-content h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 0;
  background: linear-gradient(180deg, #4ecdc4, #44a7db);
  border-radius: 2px;
  animation: growHeight 0.6s ease-out 0.3s forwards;
}

@keyframes growHeight {
  to { height: 100%; }
}

.detail-content ul { 
  margin: 15px 0; 
  padding-left: 30px; 
}

.detail-content li { 
  margin: 10px 0; 
  line-height: 1.6;
  transition: all 0.3s;
  position: relative;
  padding-left: 10px;
  animation: fadeInList 0.5s ease-out backwards;
}

.detail-content li:nth-child(1) { animation-delay: 0.1s; }
.detail-content li:nth-child(2) { animation-delay: 0.15s; }
.detail-content li:nth-child(3) { animation-delay: 0.2s; }
.detail-content li:nth-child(4) { animation-delay: 0.25s; }
.detail-content li:nth-child(5) { animation-delay: 0.3s; }
.detail-content li:nth-child(6) { animation-delay: 0.35s; }
.detail-content li:nth-child(7) { animation-delay: 0.4s; }
.detail-content li:nth-child(8) { animation-delay: 0.45s; }

@keyframes fadeInList {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.detail-content li::before {
  content: '✓';
  position: absolute;
  left: -20px;
  color: #4ecdc4;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s;
}

.detail-content li:hover {
  transform: translateX(10px);
  color: #2c5364;
  font-weight: 500;
}

.detail-content li:hover::before {
  opacity: 1;
}

.detail-content .price { 
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9); 
  padding: 20px; 
  border-radius: 10px; 
  margin: 20px 0; 
  border-left: 4px solid #4caf50;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  animation: slideUp 0.6s ease-out;
}

.detail-content .price::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(76,175,80,0.2) 0%, transparent 70%);
  animation: rotatePrice 8s linear infinite;
}

@keyframes rotatePrice {
  to { transform: rotate(360deg); }
}

.detail-content .price:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 30px rgba(76,175,80,0.2);
}

.detail-content .price h4 { 
  color: #2e7d32; 
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.detail-content .price p {
  position: relative;
  z-index: 1;
  transition: transform 0.3s;
}

.detail-content .price p:hover {
  transform: translateX(10px);
}

/* === FOOTER === */
footer { 
  background: #203a43; 
  color: #fff; 
  text-align: center; 
  padding: 20px; 
  margin-top: 60px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #4ecdc4, transparent);
  animation: footerLine 3s linear infinite;
}

@keyframes footerLine {
  to { left: 100%; }
}

footer p {
  position: relative;
  z-index: 1;
  animation: fadeIn 1s ease-in-out;
}

.home-page.hidden { 
  display: none; 
}

/* === ANIMATIONS SUPPLÉMENTAIRES POUR LES ICÔNES === */
.card h3, .contact p {
  position: relative;
  display: inline-block;
}

/* Animation des émojis dans les titres */
.card h3::first-letter {
  display: inline-block;
  animation: rotate3d 3s ease-in-out infinite;
}

@keyframes rotate3d {
  0%, 100% { transform: rotateY(0deg); }
  50% { transform: rotateY(180deg); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .quick-actions { 
    position: static; 
    margin-bottom: 20px; 
    justify-content: center; 
    flex-wrap: wrap; 
  }
  
  header { 
    padding-top: 100px; 
  }
  
  header h1 { 
    font-size: 2em; 
  }
  
  nav a { 
    margin: 0 10px; 
    font-size: 1em; 
  }
  
  h2 { 
    font-size: 1.8em; 
  }
  
  .detail-content { 
    padding: 20px; 
  }
  
  .card:hover {
    transform: translateY(-5px) scale(1.01);
  }
}

/* === ANIMATIONS DE PARTICULES (OPTIONNEL) === */
@keyframes float-particle {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
  }
  25% {
    transform: translateY(-20px) translateX(10px);
  }
  50% {
    transform: translateY(-10px) translateX(-10px);
  }
  75% {
    transform: translateY(-15px) translateX(5px);
  }
}