/* ===== VARIABLES - Couleurs du logo ===== */
:root {
  --bleu: #1a6dff;
  --bleu-fonce: #0a3d91;
  --orange: #ff8c00;
  --noir: #0a0a0a;
  --noir-carte: #141414;
  --blanc: #f5f5f5;
  --gris: #aaaaaa;
}

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

body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background: var(--noir);
  color: var(--blanc);
  line-height: 1.6;
}

/* ===== NAVBAR ===== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: rgba(10, 10, 10, 0.95);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--orange);
}

.navbar .logo-img { height: 55px; }

.nav-links { display: flex; gap: 2rem; list-style: none; }

.nav-links a {
  color: var(--blanc);
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
  padding: 0.5rem 0;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--orange);
  border-bottom: 2px solid var(--bleu);
}

.btn-nav {
  background: linear-gradient(135deg, var(--bleu), var(--orange));
  padding: 0.6rem 1.5rem !important;
  border-radius: 25px;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 5% 3rem;
  background: radial-gradient(circle at center, #14213d 0%, var(--noir) 70%);
}

.hero h1 {
  font-size: 3.5rem;
  margin: 1.5rem 0;
}

.hero h1 span { color: var(--orange); }

.hero p { font-size: 1.3rem; color: var(--gris); max-width: 700px; }

.hero-logo {
  width: 200px;
  filter: drop-shadow(0 0 30px rgba(26, 109, 255, 0.6));
  animation: pulse 3s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ===== BOUTONS ===== */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  margin-top: 2rem;
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 50px;
  transition: 0.3s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--bleu), var(--bleu-fonce));
  color: white;
  border: 2px solid var(--bleu);
}

.btn-orange {
  background: linear-gradient(135deg, var(--orange), #ff6600);
  color: white;
  border: 2px solid var(--orange);
}

.btn:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(255, 140, 0, 0.4); }

/* ===== SECTIONS ===== */
section { padding: 5rem 8%; }

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.section-title span { color: var(--orange); }

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--bleu), var(--orange));
  margin: 1rem auto;
  border-radius: 2px;
}

/* ===== CARTES FORMATIONS ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--noir-carte);
  border: 1px solid #222;
  border-radius: 15px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: 0.4s;
}

.card:hover {
  transform: translateY(-10px);
  border-color: var(--orange);
  box-shadow: 0 15px 40px rgba(26, 109, 255, 0.2);
}

.card .icon { font-size: 3rem; margin-bottom: 1rem; }

.card h3 { color: var(--bleu); margin-bottom: 1rem; font-size: 1.4rem; }

.card .prix {
  color: var(--orange);
  font-size: 1.5rem;
  font-weight: bold;
  margin: 1rem 0;
}

/* ===== STATS ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
  background: linear-gradient(135deg, var(--bleu-fonce), var(--noir));
  padding: 4rem 8%;
}

.stat h2 { font-size: 3rem; color: var(--orange); }

/* ===== FORMULAIRES ===== */
.form-container {
  max-width: 650px;
  margin: 8rem auto 4rem;
  background: var(--noir-carte);
  padding: 3rem;
  border-radius: 15px;
  border-top: 4px solid var(--orange);
}

.form-group { margin-bottom: 1.5rem; }

.form-group label { display: block; margin-bottom: 0.5rem; color: var(--orange); font-weight: 600; }

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.9rem;
  background: #1c1c1c;
  border: 1px solid #333;
  border-radius: 8px;
  color: var(--blanc);
  font-size: 1rem;
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 10px rgba(26, 109, 255, 0.4);
}

.alert-success {
  background: rgba(40, 167, 69, 0.2);
  border: 1px solid #28a745;
  color: #5cd65c;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.alert-error {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid #dc3545;
  color: #ff6b75;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

/* ===== FOOTER ===== */
footer {
  background: #050505;
  border-top: 2px solid var(--bleu);
  padding: 3rem 8% 1.5rem;
  text-align: center;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  text-align: left;
  margin-bottom: 2rem;
}

footer h4 { color: var(--orange); margin-bottom: 1rem; }

footer a { color: var(--gris); text-decoration: none; display: block; margin: 0.4rem 0; }
footer a:hover { color: var(--bleu); }

.copyright { border-top: 1px solid #222; padding-top: 1.5rem; color: var(--gris); font-size: 0.9rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { gap: 1rem; font-size: 0.85rem; }
  .hero h1 { font-size: 2.2rem; }
  .hero-logo { width: 140px; }
}


/* ===== MENU MOBILE ===== */
.burger { display: none; background: none; border: none; color: var(--orange); font-size: 1.8rem; cursor: pointer; }
@media (max-width: 768px) {
  .burger { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; width: 100%;
    flex-direction: column; background: var(--noir); padding: 1.5rem 5%;
    border-bottom: 2px solid var(--orange); gap: 1.2rem;
  }
  .nav-links.open { display: flex; }
}

/* ===== APPARITION CARTES ===== */
.card { opacity: 0; transform: translateY(30px); }
.card.visible { opacity: 1; transform: translateY(0); }

/* ===== PAGE BANNER (apropos/formations/404) ===== */
.page-banner {
  padding: 9rem 8% 3rem;
  text-align: center;
  background: radial-gradient(circle at center, #14213d, var(--noir));
}
.page-banner h1 { font-size: 3rem; }
.page-banner h1 span { color: var(--orange); }
.page-banner p { color: var(--gris); font-size: 1.15rem; }

.apropos-texte { max-width: 800px; margin: 0 auto; color: #d0d0d0; font-size: 1.05rem; }
.apropos-texte p { margin-bottom: 1.2rem; }
.fond-alternatif { background: #0d0d0d; }

.avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--bleu), var(--orange));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: bold; margin: 0 auto 1rem;
}
.role { color: var(--gris); font-size: 0.9rem; }

/* ===== FORMATIONS ===== */
.formation-card { text-align: left; position: relative; display: flex; flex-direction: column; }
.badge-cat {
  position: absolute; top: -12px; left: 20px;
  background: linear-gradient(135deg, var(--bleu), var(--orange));
  padding: 0.25rem 0.9rem; border-radius: 20px; font-size: 0.75rem; font-weight: bold;
}
.programme { list-style: none; margin: 1rem 0; flex-grow: 1; }
.programme li { color: #cfcfcf; padding: 0.25rem 0; font-size: 0.95rem; }
.formation-infos { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; }
.formation-infos .prix { font-size: 1.2rem; }

/* ===== PAGE 404 ===== */
.erreur-page { text-align: center; }
.code-404 { font-size: 8rem; line-height: 1; }
.code-404 span { color: var(--orange); }

/* ===== ADMIN ===== */
.admin-topbar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  background: #050505; border-bottom: 2px solid var(--orange);
  padding: 1rem 4%; position: sticky; top: 0; z-index: 500;
}
.admin-brand { font-size: 1.4rem; font-weight: bold; color: var(--bleu); }
.admin-brand span { color: var(--orange); }
.admin-topbar nav { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.admin-topbar a { color: var(--blanc); text-decoration: none; padding: 0.4rem 0.9rem; border-radius: 6px; transition: 0.3s; }
.admin-topbar a:hover, .admin-topbar a.active { background: var(--bleu-fonce); color: var(--orange); }
.admin-topbar .logout { color: #ff6b75; }

.admin-container { max-width: 1200px; margin: 2.5rem auto; padding: 0 4%; }
.admin-title { font-size: 1.8rem; margin-bottom: 2rem; }
.admin-subtitle { color: var(--orange); margin: 2rem 0 1rem; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat-link { text-decoration: none; }
.stat-card {
  background: var(--noir-carte); border: 1px solid #222; border-left: 4px solid var(--orange);
  border-radius: 12px; padding: 1.5rem; transition: 0.3s;
}
.stat-card:hover { transform: translateY(-5px); border-color: var(--orange); }
.stat-card h2 { font-size: 2.2rem; color: var(--orange); }
.stat-card p { color: var(--gris); }

.table-wrapper { background: var(--noir-carte); border-radius: 12px; padding: 1.5rem; overflow-x: auto; margin-bottom: 1.5rem; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.8rem; text-align: left; border-bottom: 1px solid #222; font-size: 0.95rem; }
th { color: var(--orange); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; }
tr:hover td { background: #191919; }

.badge { padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.8rem; font-weight: bold; white-space: nowrap; }
.badge-en_attente { background: rgba(255, 193, 7, 0.15); color: #ffc107; }
.badge-accepte { background: rgba(40, 167, 69, 0.15); color: #5cd65c; }
.badge-refuse { background: rgba(220, 53, 69, 0.15); color: #ff6b75; }

.actions { display: flex; gap: 0.3rem; }
.actions form { display: inline; }
.btn-small { padding: 0.35rem 0.7rem; font-size: 0.85rem; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; }
.btn-accept { background: #28a745; color: white; }
.btn-refuse { background: #ffc107; color: #111; }
.btn-delete { background: #dc3545; color: white; }

.filters { display: flex; gap: 0.8rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.filters a { color: var(--gris); text-decoration: none; padding: 0.4rem 1.1rem; border: 1px solid #333; border-radius: 20px; transition: 0.3s; }
.filters a.active, .filters a:hover { border-color: var(--orange); color: var(--orange); }

.message-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }

/* ===== LOGIN ADMIN ===== */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at center, #14213d, var(--noir)); padding: 1rem; }
.login-box { width: 100%; max-width: 400px; background: var(--noir-carte); padding: 3rem; border-radius: 15px; border-top: 4px solid var(--orange); }
.login-logo { display: block; width: 90px; margin: 0 auto 1rem; }