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

/* ==========================================
   CHARTE GRAPHIQUE OFFICIELLE — ACADÉMIE DARWIN
   ========================================== */
:root {
  --navy: #1b365d;
  --navy-dark: #102a43;
  --gold: #d97706;
  --gold-light: #fef3c7;
  --gold-text: #b45309;
  --bg-light: #f4f6f9;
  --card-bg: #ffffff;
  --text-main: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --radius-card: 20px;
  --radius-input: 10px;
  --shadow: 0 20px 40px -15px rgba(27, 54, 93, 0.07);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-light);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, .brand-name, .btn, .card-title, .modal-title {
  font-family: 'Montserrat', sans-serif;
}

main {
  flex: 1;
  padding: 40px 0 80px 0;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 30px;
}

/* ==========================================
   HEADER PREMIUM
   ========================================== */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.site-logo {
  height: 52px;
  width: auto;
}

.brand-name {
  display: flex;
  flex-direction: column;
  font-weight: 800;
  color: var(--navy);
  font-size: 19px;
  letter-spacing: -0.5px;
}

.brand-name small {
  font-weight: 600;
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.site-nav a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 10px;
  transition: var(--transition);
}

.site-nav a:hover, .site-nav a.active {
  color: var(--navy);
  background-color: #e2e8f0;
}

/* ==========================================
   HERO PRESENTATION & MOTIFS D'ACCUEIL
   ========================================== */
.hero-presentation {
  position: relative;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: #ffffff;
  padding: 80px 50px;
  border-radius: var(--radius-card);
  margin-bottom: 50px;
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(27, 54, 93, 0.25);
  border-bottom: 4px solid var(--gold);
}

.hero-presentation::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-presentation::after {
  content: "";
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content-inner {
  position: relative;
  z-index: 2;
  max-width: 850px;
}

.hero-tagline {
  display: inline-block;
  background: rgba(217, 119, 6, 0.2);
  color: var(--gold);
  border: 1px solid rgba(217, 119, 6, 0.4);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 16px;
  border-radius: 30px;
  margin-bottom: 20px;
}

.hero-presentation h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero-presentation p {
  font-size: 18px;
  color: #cbd5e1;
  line-height: 1.8;
  margin-bottom: 30px;
}

/* BANNIÈRE DE PAGE STANDARD */
.page-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #ffffff;
  padding: 50px 40px;
  border-radius: var(--radius-card);
  margin-bottom: 40px;
  border-bottom: 4px solid var(--gold);
}

.page-banner h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 10px;
}

.page-banner p {
  color: #9fb3c8;
  font-size: 16px;
}

/* ==========================================
   PILIER ACCUEIL & CHIFFRES CLÉS
   ========================================== */
.about-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 50px;
}

.pillar-card {
  background: #ffffff;
  border-radius: var(--radius-card);
  padding: 30px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.pillar-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
}

.pillar-icon-box {
  width: 55px;
  height: 55px;
  background: #f1f5f9;
  color: var(--navy);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.pillar-card h3 {
  font-size: 20px;
  color: var(--navy);
  font-weight: 800;
  margin-bottom: 10px;
}

.pillar-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.stats-banner {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 50px;
}

.stat-item .number {
  font-size: 38px;
  font-weight: 800;
  color: var(--navy);
  font-family: 'Montserrat', sans-serif;
}

.stat-item .label {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 5px;
}

/* ==========================================
   GRILLES ET CARTES MULTI-PAGES & SERVICES
   ========================================== */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 25px;
}

.card-custom {
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  padding: 35px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  transition: var(--transition);
}

.card-custom:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px -12px rgba(27, 54, 93, 0.12);
  border-color: rgba(217, 119, 6, 0.3);
}

.card-custom img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.service-logo-img {
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--gold-light);
  color: var(--gold-text);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  align-self: flex-start;
  margin-bottom: 20px;
}

/* CARTE ÉQUIPE */
.card-team {
  text-align: center;
  align-items: center;
}

.team-avatar {
  width: 95px;
  height: 95px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 18px;
  border: 3px solid var(--gold);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.team-role {
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-text);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  background: var(--gold-light);
  padding: 4px 14px;
  border-radius: 20px;
  display: inline-block;
}

.team-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 12px;
}

/* ÉLÉMENT VIDE (AUCUNE DONNÉE) */
.empty-state {
  background: #ffffff;
  border: 2px dashed var(--line);
  border-radius: var(--radius-card);
  padding: 50px;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
  grid-column: 1 / -1;
}

/* ==========================================
   BOUTONS & FORMULAIRES (ADHÉSION, CONTACT, ETC.)
   ========================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: var(--navy);
  color: #ffffff;
  padding: 14px 24px;
  border-radius: var(--radius-input);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  box-shadow: 0 4px 12px rgba(27, 54, 93, 0.2);
}

.btn-primary:hover {
  background-color: var(--navy-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(27, 54, 93, 0.3);
}

.btn-secondary {
  background-color: #e2e8f0;
  color: var(--navy);
  padding: 10px 20px;
  border-radius: var(--radius-input);
  font-weight: 700;
  border: none;
  cursor: pointer;
}

.btn-danger {
  background-color: #dc2626;
  color: #ffffff;
}

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

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  background: #fff;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(27, 54, 93, 0.1);
}

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

/* ==========================================
   CONSOLE D'ADMINISTRATION (PANNEAU & SIDEBAR)
   ========================================== */
.admin-layout {
  display: flex;
  gap: 30px;
  margin-top: 25px;
}

.admin-sidebar {
  width: 280px;
  background: var(--navy);
  border-radius: var(--radius-card);
  padding: 30px 18px;
  flex-shrink: 0;
}

.admin-sidebar-title {
  color: #ffffff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 800;
  margin-bottom: 22px;
  padding-left: 10px;
}

.admin-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}

.admin-menu-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.admin-menu-item.active {
  background: #25477b;
  color: #ffffff;
  border-left: 4px solid var(--gold);
}

.admin-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.admin-panel {
  background: #ffffff;
  border-radius: var(--radius-card);
  padding: 35px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.admin-panel h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 22px;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 15px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.admin-table th {
  background: var(--bg-light);
  padding: 14px 16px;
  font-weight: 700;
  color: var(--navy);
  border-bottom: 2px solid var(--line);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.admin-table tr:hover {
  background: #f1f5f9;
}

/* ==========================================
   SÉLECTEUR VISUEL DE COULEURS & CERCLES (NOUVEAU)
   ========================================== */
.color-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.color-option {
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.color-option input[type="radio"] {
  display: none;
}

.color-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid transparent;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  display: inline-block;
}

.color-option:hover .color-circle {
  transform: scale(1.15);
}

.color-option input[type="radio"]:checked + .color-circle {
  border-color: #ffffff;
  outline: 3px solid var(--navy);
  transform: scale(1.1);
}

.color-option small {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 600;
}

/* ==========================================
   SÉLECTEUR VISUEL D'ICÔNES GOOGLE FONTS (ADMIN)
   ========================================== */
.icon-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.icon-option {
  cursor: pointer;
  text-align: center;
}

.icon-option input[type="radio"] {
  display: none;
}

.icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  transition: var(--transition);
}

.icon-option:hover .icon-box {
  border-color: var(--gold);
  background: #fff;
}

.icon-option input[type="radio"]:checked + .icon-box {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(27, 54, 93, 0.25);
}

.icon-option small {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 600;
}

/* ==========================================
   MODALES (RECRUTEMENT & DOSSIERS)
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-card);
  padding: 45px;
  max-width: 750px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
}

/* ==========================================
   FOOTER INSTITUTIONNEL
   ========================================== */
.site-footer {
  background-color: var(--navy);
  color: #ffffff;
  padding: 50px 0 25px 0;
  margin-top: auto;
  border-top: 4px solid var(--gold);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #94a3b8;
}

@media (max-width: 900px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; }
  .hero-presentation h1 { font-size: 32px; }
}