@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
  --primary: #0f172a; /* Bleu nuit très élégant */
  --accent: #3b82f6; /* Bleu électrique technologique */
  --bg-light: #f8fafc;
  --text-main: #334155;
  --card-bg: rgba(255, 255, 255, 0.9);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.6;
}

/* --- NAVBAR PREMIUM --- */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: var(--primary);
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 1px;
}

.logo-icon {
  font-size: 2rem;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn-contact {
  background: var(--accent);
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-contact:hover {
  background: white;
  color: var(--accent);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

/* --- PROFIL INGÉNIEURS --- */
.profile-trigger {
  background: rgba(255,255,255,0.1);
  padding: 5px 15px;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: 0.3s;
}
.profile-trigger:hover { background: rgba(255,255,255,0.2); }

/* --- HEADER HERO SECTION --- */
header {
  background: linear-gradient(135deg, var(--primary) 0%, #1e293b 100%);
  color: white;
  text-align: center;
  padding: 6rem 2rem;
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

header h1 { font-size: 3rem; margin-bottom: 1rem; }
header p { font-size: 1.2rem; color: #94a3b8; }

/* --- GRILLE ET CARTES WOW --- */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 3rem 5%;
  max-width: 1400px;
  margin: auto;
}

.card {
  background: var(--card-bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 3px solid var(--accent);
}

.card-content { padding: 20px; }
.category {
  background: #e2e8f0;
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* --- ADMIN DASHBOARD --- */
.admin-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto;
}

.form-container, .graph-container {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

input, textarea {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
}

button {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}
button:hover { background: #2563eb; }

/* On cible le lien admin dans le footer */
.admin-link {
  text-decoration: none;
  color: #64748b !important; /* Couleur grise de base */
  transition: all 0.3s ease;
  display: inline-block;
}

/* L'effet au survol sur le lien ET ses enfants */
.admin-link:hover,
.admin-link:hover div,
.admin-link:hover span {
  color: #3b82f6 !important; /* Bleu électrique */
  transform: translateY(-3px);
  cursor: pointer;
}

/* --- LE BOUTON FLOTTANT (CORRIGÉ EN ROUGE ET RECADRÉ) --- */
.floating-guide-btn {
  position: fixed !important;
  bottom: 40px !important;
  right: 40px !important;
  left: auto !important; /* Empêche le bouton de s'étirer depuis la gauche */
  width: auto !important; /* La largeur s'adapte parfaitement au texte */
  z-index: 1000 !important;
  background: linear-gradient(135deg, #ef4444, #b91c1c) !important; /* Un beau rouge vif et professionnel */
  color: white !important;
  border: none !important;
  padding: 15px 25px !important;
  border-radius: 50px !important;
  font-size: 16px !important;
  font-weight: bold !important;
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.5) !important; /* Ombre rouge assortie */
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  animation: bounceBtn 2s infinite !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
}

.floating-guide-btn:hover {
  transform: translateY(-5px) scale(1.05) !important;
  box-shadow: 0 15px 35px rgba(239, 68, 68, 0.8) !important;
}

@keyframes bounceBtn {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* --- LA FENÊTRE MODAL DU GUIDE --- */
.guide-modal-overlay {
  display: none; /* Caché par défaut */
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.8);
  z-index: 2000;
  backdrop-filter: blur(5px);
}

.guide-modal-content {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 40px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  animation: fadeInModal 0.3s ease;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: translate(-50%, -45%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

.close-guide {
  position: absolute;
  top: 15px; right: 20px;
  font-size: 28px;
  color: #94a3b8;
  cursor: pointer;
  transition: 0.2s;
}

.close-guide:hover { color: #ef4444; }

.download-btn {
  display: inline-block;
  background: #10b981;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.download-btn:hover {
  background: #059669;
  transform: translateY(-2px);
}


/* ========================================== */
/* CUSTOMISATION GOOGLE TRANSLATE (MODE INVISIBLE) */
/* ========================================== */

/* 1. Cacher la grosse barre d'outil Google en haut */
.goog-te-banner-frame {
  display: none !important;
}

/* 2. Empêcher Google de décaler la page vers le bas */
body, html {
  top: 0px !important;
  margin-top: 0px !important;
}

/* 3. Style de la liste déroulante (Menu des langues) */
#google_translate_element select {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid var(--accent);
  border-radius: 5px;
  padding: 6px 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

#google_translate_element select option {
  color: #0f172a;
}

/* 4. Cacher les logos Google et les pop-ups au survol du texte */
.goog-logo-link, .goog-te-gadget span {
  display: none !important;
}
.goog-te-gadget {
  color: transparent !important;
  font-size: 0px !important;
}
#goog-gt-tt, .goog-te-balloon-frame {
  display: none !important;
}
.goog-text-highlight {
  background: none !important;
  box-shadow: none !important;
}
