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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: linear-gradient(175deg, #e0fbfc 0%, #9db4c0 100%);
  color: white;
  padding: 40px 0;
  text-align: center;
}

header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -1px;
}

header h1 img {
  max-height: 80px;
  max-width: 350px;
  height: auto;
  width: auto;
}

.tagline {
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 300;
}

/* Hero section */
.hero {
  background: white;
  padding: 80px 0;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #2c3e50;
}

.hero p {
  font-size: 1.2rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

/* Services section */
.services {
  padding: 80px 0;
  background: #f8f9fa;
}

.services h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 60px;
  color: #2c3e50;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background: white;
  padding: 40px 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.service-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #2c3e50;
}

.service-card p {
  color: #666;
  line-height: 1.7;
}

/* About section */
.about {
  padding: 80px 0;
  background: white;
}

.about h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 60px;
  color: #2c3e50;
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-text ul {
  list-style: none;
  padding: 0;
}

.about-text li {
  background: #f8f9fa;
  margin: 15px 0;
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid #E6B800;
  font-size: 1.1rem;
}

.about-text li strong {
  color: #2c3e50;
}

/* Contact section */
.contact {
  padding: 80px 0;
  background: #f8f9fa;
}

.contact h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #2c3e50;
}

.contact > .container > p {
  text-align: center;
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 20px;
}

.phone-info {
  text-align: center;
  font-size: 1.3rem;
  margin-bottom: 50px;
}

.phone-link {
  color: #E6B800;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.phone-link:hover {
  color: #D4A017;
  text-decoration: underline;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #E6B800;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.btn-submit {
  background: linear-gradient(135deg, #E6B800 0%, #D4A017 100%);
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(230, 184, 0, 0.4);
}

/* Footer */
footer {
  background: linear-gradient(175deg, #c2dfe3 0%, #9DB4C0 100%);
  color: #2c3e50;
  padding: 18px 0;
  text-align: center;
}

footer p {
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  header h1 img {
    max-height: 60px;
    max-width: 280px;
  }

  .hero h2,
  .services h2,
  .about h2,
  .contact h2 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    margin: 0 20px;
    padding: 30px 20px;
  }

  .services,
  .about,
  .contact,
  .hero {
    padding: 50px 0;
  }
}

@media (max-width: 480px) {
  header {
    padding: 40px 0;
  }

  header h1 {
    font-size: 1.8rem;
  }

  header h1 img {
    max-height: 45px;
    max-width: 220px;
  }

  .tagline {
    font-size: 1rem;
  }

  .service-card {
    padding: 30px 20px;
  }

  .about-text li {
    padding: 15px;
    font-size: 1rem;
  }
}

/* Popup styles */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.show {
  opacity: 1;
  visibility: visible;
}

.popup {
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 90%;
  max-height: 90%;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.popup-overlay.show .popup {
  transform: translateY(0);
}

.popup-content {
  padding: 30px;
  text-align: center;
  position: relative;
}

.popup-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  line-height: 1;
  transition: color 0.3s ease;
}

.popup-close:hover {
  color: #333;
}

.popup-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 20px;
  font-size: 28px;
  font-weight: bold;
  color: white;
  transition: all 0.3s ease;
}

.popup-overlay.success .popup-icon {
  background: linear-gradient(135deg, #E6B800, #D4A017);
}

.popup-overlay.error .popup-icon {
  background: linear-gradient(135deg, #f44336, #d32f2f);
}

.popup h3 {
  margin: 0 0 15px 0;
  font-size: 1.5rem;
  color: #2c3e50;
}

.popup p {
  margin: 0;
  color: #666;
  line-height: 1.5;
}

.popup-overlay.success h3 {
  color: #D4A017;
}

.popup-overlay.error h3 {
  color: #f44336;
}

/* Button disabled state */
.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-submit:disabled:hover {
  transform: none;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

@media (max-width: 480px) {
  .popup {
    width: 95%;
  }

  .popup-content {
    padding: 20px;
  }

  .popup-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .popup h3 {
    font-size: 1.3rem;
  }
}

/* --- Slogan : Style Pro + Animation Arrivée + Curseur --- */

.animated-tagline {
  /* 1. LE STYLE DU TEXTE */
  font-family: 'Segoe UI', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #2c3e50;         /* Bleu Nuit */
  letter-spacing: 1px;
  
  /* 2. POSITIONNEMENT */
  /* Important : inline-block permet au bloc de coller au texte */
  display: inline-block; 
  position: relative;    /* Nécessaire pour que le curseur se positionne par rapport à ce texte */
  padding-right: 15px;   /* On ajoute un peu d'espace à droite pour le curseur */
  
  /* 3. L'ANIMATION D'ARRIVÉE */
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.3s forwards;
}

/* Le Curseur (La barre verticale) */
.animated-tagline::after {
  content: '';
  position: absolute;    /* On le sort du flux pour le placer au pixel près */
  right: 2%;              /* On le colle tout à droite de la zone de texte */
  top: 42%;              /* On le place au milieu (53% corrige souvent mieux l'effet d'optique que 50%) */
  transform: translateY(-50%); /* On le remonte de la moitié de sa propre hauteur pour être centré */
  
  width: 3px;            /* Épaisseur */
  height: 24px;          /* Hauteur fixe pour correspondre à la taille du texte (ajustez si besoin) */
  background-color: #2c3e50; /* Jaune Doré */
  
  /* Animation du clignotement */
  animation: blink-cursor 1s step-end infinite;
}

/* Animation : Le texte monte et apparaît */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation : Clignotement */
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Ajustement Mobile */
@media (max-width: 768px) {
  .animated-tagline {
    font-size: 1.2rem;
    display: block; /* Sur mobile on repasse en bloc pour centrer */
    width: fit-content; /* Le bloc s'adapte au contenu pour garder le curseur collé */
    margin: 10px auto; /* Centrage horizontal */
  }
  
  .animated-tagline::after {
    height: 22px; /* On réduit la hauteur du curseur sur mobile */
  }
}

/* --- Easter Egg: Mode Gamer --- */
.gamer-mode {
  animation: rainbow-bg 5s infinite;
  border: 5px solid red; /* Fallback */
  border-image: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet) 1;
}

.gamer-mode header, 
.gamer-mode footer {
  background: linear-gradient(90deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
  background-size: 400% 400%;
  animation: rainbow-move 3s linear infinite;
}

@keyframes rainbow-move {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* La particule RGB */
.rgb-particle {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none; /* Important : la souris passe au travers */
  z-index: 9999;
  animation: fadeOut 1s forwards;
}

@keyframes fadeOut {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0); opacity: 0; }
}

/* Mode Lampe Torche */
.flashlight-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none; /* Permet de cliquer à travers */
  /* Le fond est noir par défaut, le trou se fera en JS */
  background: radial-gradient(circle 150px at var(--x, 50%) var(--y, 50%), transparent 0%, rgba(0,0,0,0.95) 100%);
  opacity: 0;
  transition: opacity 0.5s;
}

.flashlight-active .flashlight-layer {
  opacity: 1;
}

/* Canvas pour Matrix */
#matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9998; /* Juste en dessous des popups mais au dessus du reste */
  pointer-events: none; /* On peut continuer à cliquer sur le site à travers */
  opacity: 0;
  transition: opacity 1s;
}

/* --- Mode Windows 98 --- */
body.retro-98 {
  background-color: #c0c0c0 !important;
  color: #000 !important;
  font-family: "MS Sans Serif", Geneva, sans-serif !important;
}
body.retro-98 header, body.retro-98 footer, body.retro-98 section {
  background: #c0c0c0 !important;
  box-shadow: none !important;
  border: 2px solid #fff;
  border-right-color: #848484;
  border-bottom-color: #848484;
}
body.retro-98 h1, body.retro-98 h2, body.retro-98 h3 {
  background: #000080;
  color: #fff !important;
  padding: 5px;
  font-family: 'Courier New', monospace;
}
body.retro-98 .btn-submit, body.retro-98 button {
  background: #c0c0c0 !important;
  border: 2px outset #fff !important;
  color: #000 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
body.retro-98 .btn-submit:active {
  border: 2px inset #fff !important;
}
body.retro-98 input, body.retro-98 textarea {
  border: 2px inset #fff !important;
  background: #fff !important;
  border-radius: 0 !important;
}

/* --- NOUVEAUX EASTER EGGS --- */

/* 1. Mode BIOS */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

.bios-hidden { display: none; }
.bios-visible {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-color: #0000AA; /* Bleu BIOS classique */
  color: #c0c0c0;
  font-family: 'VT323', monospace; /* Police pixelisée */
  font-size: 1.5rem;
  z-index: 99999;
  padding: 20px;
  border: 10px solid #0000AA; 
  outline: 5px double #fff;
}
.bios-container { display: flex; flex-direction: column; height: 100%; }
.bios-header { text-align: center; margin-bottom: 40px; color: #fff; text-shadow: 2px 2px #000; }
.bios-content { display: flex; justify-content: space-around; flex-grow: 1; }
.bios-column p { margin: 5px 0; cursor: pointer; }
.bios-column.stats { color: #00ff00; border: 2px solid #fff; padding: 20px; height: fit-content; }
.highlight { color: #ffff00; background: #AA0000; padding: 0 5px; }
.bios-footer { margin-top: auto; border-top: 2px solid #fff; padding-top: 10px; display: flex; gap: 20px; }
.blink-red { color: red; animation: blink-fast 0.5s infinite; }

@keyframes blink-fast { 0% { opacity: 1; } 50% { opacity: 0; } }

/* 2. Mode FPS (Tir) */
.fps-mode {
  cursor: crosshair !important; /* Viseur */
}
.shot-target {
  transition: all 0.2s ease-out;
  transform: scale(0.9) rotate(5deg);
  opacity: 0;
  filter: blur(4px) grayscale(100%);
  pointer-events: none;
}

/* 3. Mode CRT (Écran Cathodique) */
.crt-overlay {
  display: none;
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 2px, 3px 100%;
  pointer-events: none; 
  z-index: 10000;
}

.crt-active .crt-overlay { display: block; }

.crt-active body {
  overflow: hidden; 
  filter: contrast(1.2) brightness(1.1) saturate(1.2);
  animation: flicker 0.15s infinite;
}

.crt-overlay::after {
  content: " ";
  display: block;
  position: absolute; top: 0; left: 0; bottom: 0; right: 0;
  background: rgba(18, 16, 16, 0.1);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  animation: flicker 0.15s infinite, scanline 5s linear infinite;
}

@keyframes scanline {
  0% { transform: translateY(-100%); opacity: 0.5; }
  100% { transform: translateY(100%); opacity: 0.5; }
}

@keyframes flicker {
  0% { opacity: 0.95; }
  50% { opacity: 1; }
  100% { opacity: 0.98; }
}