/* ============================================
   PAYE ENSEIGNANT - Styles globaux 2026
   ============================================ */

:root {
  /* Couleurs principales */
  --primary: #1e3a5f;
  --primary-light: #2d5a8a;
  --primary-dark: #0f1f33;
  --accent: #e67e22;
  --accent-light: #f39c12;
  --success: #27ae60;
  --success-light: #2ecc71;
  --danger: #e74c3c;
  
  /* Couleurs neutres */
  --bg: #f8fafc;
  --bg-alt: #eef2f7;
  --card: #ffffff;
  --text: #1a202c;
  --text-light: #4a5568;
  --text-muted: #718096;
  --border: #e2e8f0;
  --border-light: #edf2f7;
  
  /* Ombres */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 15px rgba(30,58,95,0.08);
  --shadow-lg: 0 10px 40px rgba(30,58,95,0.12);
  --shadow-xl: 0 20px 60px rgba(30,58,95,0.15);
  
  /* Espacements */
  --section-padding: 80px;
  --container-max: 1200px;
  
  /* Transitions */
  --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
   
header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-img {
  height: 42px;
  width: auto;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

nav {
  display: flex;
  gap: 8px;
}

nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
}

nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

nav a.active {
  color: #fff;
  background: rgba(255,255,255,0.15);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

/* ============================================
   HERO SECTIONS
   ============================================ */

.hero {
  background: linear-gradient(135deg, rgba(30,58,95,0.95) 0%, rgba(45,90,138,0.92) 100%), url('images/hero-accueil.png') center/cover;
  color: #fff;
  padding: 60px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="80" cy="20" r="40" fill="rgba(255,255,255,0.03)"/><circle cx="90" cy="80" r="30" fill="rgba(255,255,255,0.02)"/></svg>');
  background-size: cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.875rem;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  color: #fff;
}

.hero p,
.hero-text {
  font-size: 1.2rem;
  color: #fff;
  opacity: 1;
  margin-bottom: 28px;
  max-width: 650px;
}

/* Bloc prochaine paye */
.next-pay-banner {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 24px 32px;
  margin-bottom: 32px;
  text-align: center;
  max-width: 500px;
}

.next-pay-label {
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 8px;
  font-weight: 500;
}

.next-pay-date {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.next-pay-countdown {
  font-size: 1.1rem;
  color: #f59e0b;
  font-weight: 600;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Hero compact pour pages internes */
.hero-compact {
  padding: 40px 0 60px;
}

.hero-compact h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 12px;
}

.hero-compact p {
  font-size: 1.1rem;
  margin-bottom: 0;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--success);
  color: #fff;
}

.btn-primary:hover {
  background: var(--success-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

.btn-secondary {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.25);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--accent-light);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

main {
  margin-top: -50px;
  position: relative;
  z-index: 10;
  padding-bottom: 60px;
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.card-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
}

.card-icon.accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
}

.card-icon.success {
  background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%);
}

.card h2, .card h3 {
  color: var(--text);
}

/* ============================================
   GRIDS
   ============================================ */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ============================================
   TABLES
   ============================================ */

.table-wrapper {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

thead {
  background: var(--primary);
  color: #fff;
}

th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
}

tbody tr:hover {
  background: var(--bg-alt);
}

tbody tr:last-child td {
  border-bottom: none;
}

.table-highlight {
  background: rgba(39, 174, 96, 0.08);
  font-weight: 600;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 16px;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

p {
  margin-bottom: 16px;
  color: var(--text-light);
}

.lead {
  font-size: 1.15rem;
  color: var(--text);
}

.text-muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.text-center {
  text-align: center;
}

/* ============================================
   LISTS
   ============================================ */

ul, ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

li {
  margin-bottom: 8px;
  color: var(--text-light);
}

.check-list {
  list-style: none;
  padding-left: 0;
}

.check-list li {
  position: relative;
  padding-left: 32px;
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: bold;
}

/* ============================================
   LINKS
   ============================================ */

.link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
}

.link-card:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateX(4px);
}

.link-card-icon {
  font-size: 1.25rem;
}

.link-grid {
  display: grid;
  gap: 12px;
}

/* ============================================
   SIMULATEUR
   ============================================ */

.simulator {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  border-radius: 24px;
  padding: 40px;
  color: #fff;
}

.simulator h2 {
  color: #fff;
  margin-bottom: 8px;
}

.simulator p {
  color: rgba(255,255,255,0.8);
}

.simulator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.9);
}

.form-group select,
.form-group input {
  padding: 14px 18px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group select:focus,
.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.15);
}

.form-group select option {
  background: var(--primary);
  color: #fff;
}

.simulator-result {
  background: rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  margin-top: 20px;
}

.result-label {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
}

.result-value {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent-light);
}

.result-detail {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  margin-top: 8px;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
  margin-bottom: 32px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.section-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-alt);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* ============================================
   FAQ / ACCORDIONS
   ============================================ */

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.faq-question::before {
  content: '?';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.faq-answer {
  color: var(--text-light);
  padding-left: 40px;
}

/* ============================================
   STATS / HIGHLIGHTS
   ============================================ */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Highlight box */
.highlight-box {
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.08) 0%, rgba(46, 204, 113, 0.05) 100%);
  border: 1px solid rgba(39, 174, 96, 0.2);
  border-left: 4px solid var(--success);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 20px 0;
}

.highlight-box.warning {
  background: linear-gradient(135deg, rgba(230, 126, 34, 0.08) 0%, rgba(243, 156, 18, 0.05) 100%);
  border-color: rgba(230, 126, 34, 0.2);
  border-left-color: var(--accent);
}

.highlight-box.info {
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.08) 0%, rgba(45, 90, 138, 0.05) 100%);
  border-color: rgba(30, 58, 95, 0.2);
  border-left-color: var(--primary);
}

/* ============================================
   BREADCRUMB
   ============================================ */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  margin-bottom: 16px;
  color: rgba(255,255,255,0.7);
}

.breadcrumb a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb span {
  color: rgba(255,255,255,0.5);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 30px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.7);
}

.footer-title {
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
}

.footer-legal a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  margin-left: 24px;
}

.footer-legal a:hover {
  color: #fff;
}

/* ============================================
   IMAGE PLACEHOLDERS
   ============================================ */

.img-placeholder {
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--border) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  min-height: 200px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 50px;
  }
  
  .header-inner {
    height: 60px;
  }
  
  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
  }
  
  nav.active {
    display: flex;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .hero {
    padding: 40px 0 80px;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .btn {
    justify-content: center;
    width: 100%;
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .card {
    padding: 24px;
  }
  
  .simulator {
    padding: 28px;
  }
  
  .result-value {
    font-size: 2.25rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
  
  .footer-legal a {
    margin: 0;
  }
  
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  table {
    font-size: 0.85rem;
  }
  
  th, td {
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .stat-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-badge {
    font-size: 0.8rem;
  }
}

/* ============================================
   UTILITIES
   ============================================ */

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

.hidden { display: none; }
