/* ============================================================
   ILÉVIA RP - Feuille de style principale
   ============================================================ */

:root {
  --blue: #1a5faf;
  --blue-dark: #0d3f7a;
  --blue-light: #2a7dd4;
  --yellow: #f5c200;
  --yellow-dark: #d4a800;
  --red: #e63232;
  --green: #22c55e;
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-600: #6c757d;
  --gray-800: #343a40;
  --font: 'Inter', sans-serif;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font); color: var(--gray-800); background: var(--white); }
a { text-decoration: none; color: inherit; }

/* ===== TOPBAR ===== */
.topbar {
  background: #1a1a2e;
  color: #aaa;
  font-size: 12px;
  padding: 6px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-badge {
  background: var(--yellow);
  color: #1a1a2e;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
}

/* ===== NAVBAR ===== */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 12px 40px;
  display: flex;
  align-items: center;
  gap: 4px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.logo {
  font-size: 26px;
  font-weight: 800;
  color: var(--blue-dark);
  letter-spacing: -1px;
  margin-right: 16px;
  font-style: italic;
}
.logo span { color: var(--blue); }
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; flex-wrap: wrap; }
.nav-btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  color: var(--gray-800);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s;
}
.nav-btn:hover { background: var(--gray-100); }
.nav-btn.active { background: var(--blue); color: var(--white); }
.nav-btn.connect {
  background: var(--blue-dark);
  color: var(--white);
  margin-left: auto;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  white-space: nowrap;
}
.nav-btn.connect:hover { background: var(--blue); }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #0d2a5c 0%, #1a5faf 50%, #2a7dd4 100%);
  min-height: 500px;
  padding: 60px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 { font-size: 50px; font-weight: 800; color: white; line-height: 1.1; margin-bottom: 20px; }
.hero h1 span { color: var(--yellow); }
.hero p { color: rgba(255,255,255,0.8); font-size: 16px; line-height: 1.6; margin-bottom: 32px; }
.btn-primary {
  background: var(--yellow);
  color: #1a1a2e;
  border: none;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover { background: var(--yellow-dark); transform: translateY(-1px); }
.btn-blue {
  background: var(--blue);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
.btn-blue:hover { background: var(--blue-dark); }
.btn-danger {
  background: var(--red);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: opacity 0.2s;
}
.btn-danger:hover { opacity: 0.85; }

.hero-cards { display: flex; flex-direction: column; gap: 14px; }
.hero-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.hero-card:hover { background: rgba(255,255,255,0.18); }
.hero-card-icon {
  width: 44px; height: 44px;
  background: var(--blue-light);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.hero-card h3 { color: white; font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.hero-card p { color: rgba(255,255,255,0.7); font-size: 13px; line-height: 1.4; }

/* ===== SECTIONS ===== */
.section { padding: 48px 40px; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}
.section-title { font-size: 28px; font-weight: 700; }
.section-title span { color: var(--blue); }
.section-date { display: flex; align-items: center; gap: 10px; color: var(--gray-600); font-size: 14px; }
.time-badge {
  background: var(--yellow);
  color: #1a1a2e;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
}

/* ===== FILTER TABS ===== */
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.filter-tab {
  padding: 8px 16px;
  border-radius: 50px;
  border: 1.5px solid var(--gray-200);
  background: white;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  display: flex; align-items: center; gap: 6px;
}
.filter-tab:hover { border-color: var(--blue); color: var(--blue); }
.filter-tab.active { background: var(--gray-800); color: white; border-color: var(--gray-800); }

/* ===== LIGNE BADGES ===== */
.ligne-badge {
  position: relative;
  padding: 10px 16px;
  border-radius: 10px;
  color: white;
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  min-width: 62px;
  text-align: center;
  display: inline-block;
}
.ligne-badge:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.2); }
.status-dot {
  position: absolute; top: -3px; right: -3px;
  width: 12px; height: 12px;
  border-radius: 50%; border: 2px solid white;
}
.status-dot.green { background: var(--green); }
.status-dot.red { background: var(--red); }
.status-dot.orange { background: #f59e0b; }

.lignes-category { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.category-letter {
  width: 30px; height: 30px;
  background: var(--gray-800); color: white;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.category-label { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--gray-600); }
.lignes-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }

/* Couleurs lignes */
.bg-blue   { background: #1a5faf; }
.bg-red    { background: #e63232; }
.bg-cyan   { background: #06b6d4; }
.bg-navy   { background: #1e3a5f; }
.bg-navy2  { background: #2d4f7c; }
.bg-teal   { background: #0891b2; }
.bg-lime   { background: #84cc16; }
.bg-green2 { background: #16a34a; }
.bg-emerald{ background: #059669; }
.bg-teal2  { background: #0d9488; }
.bg-cyan2  { background: #0e7490; }
.bg-orange { background: #ea580c; }
.bg-yellow2{ background: #ca8a04; }
.bg-pink   { background: #db2777; }
.bg-magenta{ background: #d946ef; }
.bg-gray2  { background: #6b7280; }

/* ===== PERMANENCE ===== */
.permanence-section {
  background: #e8f1fb;
  padding: 60px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.permanence-section h2 { font-size: 30px; font-weight: 800; color: var(--blue-dark); margin-bottom: 16px; }
.permanence-section p { color: var(--gray-600); font-size: 15px; line-height: 1.7; margin-bottom: 10px; }
.perm-img {
  border-radius: 16px;
  height: 180px;
  background: linear-gradient(135deg,#374151,#6b7280);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 15px; font-weight: 600;
  margin-bottom: 14px;
}
.perm-img.boutique { background: linear-gradient(135deg,#f093fb,#f5576c); }

/* ===== TRAFIC CARDS ===== */
.trafic-card {
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 14px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.trafic-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.trafic-icon.normal { background: #dcfce7; }
.trafic-icon.perturb { background: #fee2e2; }
.trafic-icon.travaux { background: #fef9c3; }
.trafic-title { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.trafic-msg { color: var(--gray-600); font-size: 14px; line-height: 1.5; }
.trafic-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 50px;
  font-size: 12px; font-weight: 600; margin-top: 10px;
}
.trafic-badge.ok { background: #dcfce7; color: #166534; }
.trafic-badge.ko { background: #fee2e2; color: #991b1b; }
.trafic-badge.info { background: #dbeafe; color: #1e40af; }
.trafic-badge.travaux { background: #fef9c3; color: #854d0e; }

/* ===== ACTUALITÉS ===== */
.actu-card {
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}
.actu-card:hover { box-shadow: var(--shadow); }
.actu-meta { font-size: 12px; color: var(--gray-600); margin-bottom: 8px; }
.actu-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.actu-card p { color: var(--gray-600); line-height: 1.7; font-size: 15px; }
.actu-card img { width: 100%; border-radius: 10px; margin-top: 16px; max-height: 300px; object-fit: cover; }

/* ===== LIGNES PAGE ===== */
.ligne-row {
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 20px;
  transition: box-shadow 0.2s;
}
.ligne-row:hover { box-shadow: var(--shadow); }
.ligne-badge-sm {
  padding: 8px 14px;
  border-radius: 8px;
  color: white;
  font-weight: 800;
  font-size: 15px;
  min-width: 54px;
  text-align: center;
  flex-shrink: 0;
}
.ligne-row-info { flex: 1; }
.ligne-row-info h3 { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.ligne-row-info p { color: var(--gray-600); font-size: 13px; }
.cat-title { font-size: 13px; font-weight: 700; letter-spacing: 1px; color: var(--gray-600); margin: 24px 0 12px; }

/* ===== ABONNEMENTS ===== */
.abo-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.abo-card {
  background: white; border: 1.5px solid var(--gray-200);
  border-radius: 20px; padding: 32px 24px; text-align: center;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.abo-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.08); border-color: var(--blue); }
.abo-card.featured { background: var(--blue-dark); color: white; border-color: var(--blue-dark); }
.abo-card .icon { font-size: 36px; margin-bottom: 12px; }
.abo-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.abo-card .price { font-size: 36px; font-weight: 800; margin: 14px 0 6px; }
.abo-card .price small { font-size: 15px; font-weight: 500; }
.abo-card p { font-size: 14px; opacity: 0.7; margin-bottom: 20px; }
.abo-card ul { list-style: none; text-align: left; margin-bottom: 24px; }
.abo-card ul li { padding: 6px 0; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.abo-card ul li::before { content: "✓"; color: var(--green); font-weight: 700; }
.abo-card.featured ul li::before { color: var(--yellow); }
.btn-abo {
  width: 100%; padding: 12px; border-radius: 10px; border: none;
  font-family: var(--font); font-weight: 700; font-size: 15px;
  cursor: pointer; background: var(--blue); color: white;
}
.abo-card.featured .btn-abo { background: var(--yellow); color: #1a1a2e; }
.btn-abo:hover { opacity: 0.9; }

/* ===== RECRUTEMENT ===== */
.recrutement-hero {
  background: linear-gradient(135deg,#0d2a5c,#1a5faf);
  padding: 60px 40px; text-align: center; color: white;
}
.recrutement-hero h1 { font-size: 42px; font-weight: 800; margin-bottom: 16px; }
.recrutement-hero p { font-size: 17px; opacity: 0.8; max-width: 600px; margin: 0 auto 32px; }
.poste-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; padding: 40px; }
.poste-card {
  background: white; border: 1.5px solid var(--gray-200);
  border-radius: 20px; padding: 28px;
  transition: box-shadow 0.2s; cursor: default;
}
.poste-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.08); }
.poste-icon { font-size: 36px; margin-bottom: 12px; }
.poste-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.poste-card p { color: var(--gray-600); font-size: 14px; line-height: 1.6; margin-bottom: 16px; }
.poste-tag {
  display: inline-block; background: #dbeafe; color: var(--blue);
  padding: 4px 10px; border-radius: 50px; font-size: 12px; font-weight: 600;
  margin-right: 6px; margin-bottom: 6px;
}

/* ===== DIRECTION ===== */
.direction-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.direction-card {
  background: white; border: 1.5px solid var(--gray-200);
  border-radius: 20px; padding: 28px; text-align: center;
}
.direction-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; background: linear-gradient(135deg,#dbeafe,#bfdbfe);
}
.direction-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.direction-card .role {
  display: inline-block;
  background: #dbeafe; color: var(--blue);
  padding: 4px 12px; border-radius: 50px;
  font-size: 12px; font-weight: 600; margin-top: 8px;
}

/* ===== TAD ===== */
.tad-hero { text-align: center; padding: 60px 40px 0; }
.tad-hero h1 { font-size: 38px; font-weight: 800; margin-bottom: 14px; }
.tad-hero p { color: var(--gray-600); font-size: 16px; line-height: 1.7; max-width: 600px; margin: 0 auto 32px; }
.tad-zones { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; padding: 40px; }
.tad-zone-card {
  background: white; border: 1.5px solid var(--gray-200);
  border-radius: 16px; padding: 24px;
}
.tad-zone-card h4 { font-weight: 700; margin-bottom: 6px; }
.tad-zone-card p { font-size: 13px; color: var(--gray-600); }

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0d2a5c 0%, #1a5faf 100%);
  display: flex; align-items: center; justify-content: center;
}
.login-box {
  background: white; border-radius: 24px;
  padding: 48px 40px; width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo { font-size: 32px; font-weight: 800; color: var(--blue-dark); font-style: italic; margin-bottom: 8px; }
.login-logo span { color: var(--blue); }
.login-sub { color: var(--gray-600); font-size: 14px; margin-bottom: 32px; }
.login-box h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.form-group { margin-bottom: 18px; }
.form-label { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; color: var(--gray-600); margin-bottom: 7px; display: block; text-transform: uppercase; }
.form-input {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--gray-200); border-radius: 10px;
  font-family: var(--font); font-size: 14px; outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--blue); }
textarea.form-input { resize: vertical; min-height: 100px; }
select.form-input { background: white; cursor: pointer; }
.btn-login {
  width: 100%; padding: 14px;
  background: var(--blue-dark); color: white;
  border: none; border-radius: 10px;
  font-family: var(--font); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: background 0.2s;
}
.btn-login:hover { background: var(--blue); }
.login-error {
  background: #fee2e2; color: #991b1b;
  padding: 12px 16px; border-radius: 8px;
  font-size: 14px; margin-bottom: 20px;
}

/* ===== FLASH ===== */
.flash-msg {
  padding: 14px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 600; margin-bottom: 20px;
}

/* ===== FOOTER ===== */
footer {
  background: #1a1a2e; color: rgba(255,255,255,0.5);
  padding: 32px 40px; text-align: center; font-size: 13px;
  line-height: 2;
}
footer strong { color: white; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .permanence-section, .abo-grid, .poste-grid, .direction-grid, .tad-zones { grid-template-columns: 1fr; }
  .navbar { padding: 10px 16px; flex-wrap: wrap; }
  .nav-links { gap: 0; }
  .nav-btn { font-size: 12px; padding: 7px 8px; }
  .section { padding: 32px 16px; }
  .topbar { padding: 6px 16px; font-size: 11px; }
}