/* AEGP — palette inspirée du logo (montagnes, soleil, rivière, tons bronze/or) */
:root {
  --aegp-brown-900: #2b1b10;
  --aegp-brown-800: #3e2a1a;
  --aegp-brown-700: #4a2e1a;
  --aegp-gold-600: #b9832a;
  --aegp-gold-500: #c9971f;
  --aegp-gold-400: #e3b23c;
  --aegp-gold-100: #faf1dc;
  --aegp-cream: #fbf6ea;
  --aegp-white: #ffffff;
  --aegp-red: #a3312a;
  --aegp-green: #2f6b3a;
  --font-base: "Segoe UI", Arial, Helvetica, sans-serif;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(43, 27, 16, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-base);
  color: var(--aegp-brown-900);
  background: var(--aegp-white);
  line-height: 1.55;
}

a { color: var(--aegp-brown-700); }
a:hover { color: var(--aegp-gold-600); }

h1, h2, h3, h4 { font-family: var(--font-base); color: var(--aegp-brown-800); line-height: 1.25; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Navigation --- */
.site-header {
  background: var(--aegp-white);
  border-bottom: 1px solid #eee4cd;
  position: sticky;
  top: 0;
  z-index: 40;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem;
  max-width: 1120px;
  margin: 0 auto;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--aegp-brown-800);
  font-weight: 700;
  font-size: 1.05rem;
}

.navbar-brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.navbar-links a {
  text-decoration: none;
  color: var(--aegp-brown-800);
  font-weight: 500;
  font-size: 0.95rem;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  color: var(--aegp-brown-800);
  font-weight: 500;
  font-size: 0.95rem;
}
.link-btn:hover { color: var(--aegp-gold-600); }

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--aegp-brown-800);
}

/* --- Boutons --- */
.btn {
  display: inline-block;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--aegp-gold-500);
  color: var(--aegp-brown-900);
}
.btn-primary:hover { background: var(--aegp-gold-400); color: var(--aegp-brown-900); }

.btn-outline {
  background: transparent;
  border-color: var(--aegp-brown-700);
  color: var(--aegp-brown-700);
}
.btn-outline:hover { background: var(--aegp-brown-700); color: var(--aegp-white); }

.btn-danger { background: var(--aegp-red); color: var(--aegp-white); }
.btn-sm { padding: 0.35rem 0.9rem; font-size: 0.85rem; }

/* --- Hero / bandeau --- */
.hero {
  background: linear-gradient(135deg, var(--aegp-brown-800), var(--aegp-brown-700));
  color: var(--aegp-white);
  padding: 4rem 1.25rem;
  text-align: center;
}
.hero h1 { color: var(--aegp-white); font-size: 2.4rem; margin-bottom: 0.75rem; }
.hero p { font-size: 1.15rem; color: var(--aegp-gold-100); max-width: 640px; margin: 0 auto 1.5rem; }

/* --- Hero de marque (reprend le style de la page myaegp.com actuelle) --- */
.hero-brand {
  background: radial-gradient(circle at 50% 34%, #f3cf6c 0%, #ddab3f 24%, #bb842c 48%, #835820 74%, #4a3110 100%);
  padding: 3.5rem 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-brand::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 105%, rgba(0, 0, 0, 0.28), transparent 60%);
  pointer-events: none;
}
.hero-brand .container { max-width: 560px; position: relative; z-index: 2; }
.hero-brand h1 { color: #3a2410; font-size: 1.6rem; margin: 0 0 1.5rem; }
.hero-logo-card {
  background: #fffaf2;
  border: 1px solid rgba(58, 36, 16, 0.14);
  border-radius: 22px;
  padding: 1.5rem 1.5rem 1.3rem;
  box-shadow: 0 16px 38px rgba(35, 18, 6, 0.32);
  margin: 0 auto 1.5rem;
  max-width: 260px;
}
.hero-logo-card img { display: block; width: 100%; height: auto; }
.hero-divider {
  width: 110px; height: 1px;
  background: linear-gradient(90deg, transparent, #3a2410, transparent);
  margin: 0 auto 1.5rem;
  position: relative;
}
.hero-divider::after {
  content: "◆";
  position: absolute; top: -7px; left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #3a2410;
}
.hero-brand .mission {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #3a2410;
  max-width: 480px;
  margin: 0 auto 1.8rem;
}
.hero-brand .btn-primary { background: #3a2410; color: #fffaf2; }
.hero-brand .btn-primary:hover { background: #4a3110; color: #fffaf2; }

/* --- Sections --- */
.section { padding: 3rem 1.25rem; }
.section-alt { background: var(--aegp-gold-100); }
.section-title { text-align: center; margin-bottom: 2rem; }

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--aegp-white);
  border: 1px solid #eee4cd;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.stat {
  text-align: center;
}
.stat-value {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--aegp-gold-600);
  display: block;
}
.stat-label { color: var(--aegp-brown-700); font-size: 0.95rem; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--aegp-gold-100);
  color: var(--aegp-brown-700);
}
.badge-success { background: #e4f2e6; color: var(--aegp-green); }
.badge-danger { background: #f6e3e1; color: var(--aegp-red); }
.badge-info { background: #e6eef6; color: #29527a; }

/* --- Formulaires --- */
form p { margin: 0.9rem 0; }
label { display: block; font-weight: 600; margin-bottom: 0.3rem; color: var(--aegp-brown-800); }

input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="url"], input[type="date"], input[type="datetime-local"], input[type="number"],
textarea, select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d8c9a3;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--aegp-white);
  color: var(--aegp-brown-900);
}

input:focus, textarea:focus, select:focus {
  outline: 3px solid var(--aegp-gold-400);
  outline-offset: 1px;
}

.help-text { font-size: 0.82rem; color: #6b5a44; }
.errorlist { color: var(--aegp-red); list-style: none; padding: 0; margin: 0.2rem 0; font-size: 0.85rem; }

/* --- Tables --- */
table { width: 100%; border-collapse: collapse; background: var(--aegp-white); }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid #eee4cd; font-size: 0.92rem; }
th { background: var(--aegp-gold-100); color: var(--aegp-brown-800); }

/* --- Messages --- */
.messages { list-style: none; padding: 0; margin: 1rem auto; max-width: 1120px; }
.messages li {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.messages .success { background: #e4f2e6; color: var(--aegp-green); }
.messages .error { background: #f6e3e1; color: var(--aegp-red); }
.messages .info, .messages .warning { background: var(--aegp-gold-100); color: var(--aegp-brown-800); }

/* --- Footer --- */
.site-footer {
  background: var(--aegp-brown-900);
  color: var(--aegp-gold-100);
  padding: 2.5rem 1.25rem 1.5rem;
  margin-top: 3rem;
}
.site-footer a { color: var(--aegp-gold-400); }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 1120px;
  margin: 0 auto 1.5rem;
}
.footer-bottom {
  text-align: center;
  font-size: 0.82rem;
  color: #cbb686;
  border-top: 1px solid #4a2e1a;
  padding-top: 1rem;
  max-width: 1120px;
  margin: 0 auto;
}

/* --- Bandeau cookies RGPD --- */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--aegp-brown-900);
  color: var(--aegp-white);
  padding: 1rem 1.25rem;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}
#cookie-banner p { margin: 0; font-size: 0.9rem; max-width: 720px; }
#cookie-banner .actions { display: flex; gap: 0.6rem; }

/* --- Dashboard layout --- */
.app-layout { display: flex; min-height: 70vh; }
.app-sidebar {
  width: 230px;
  flex-shrink: 0;
  background: var(--aegp-gold-100);
  padding: 1.5rem 1rem;
  border-right: 1px solid #eee4cd;
}
.app-sidebar a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--aegp-brown-800);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
}
.app-sidebar a:hover, .app-sidebar a.active { background: var(--aegp-gold-400); color: var(--aegp-brown-900); }
.app-sidebar .sidebar-group-title {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: #8a6f45;
  margin: 1.2rem 0 0.4rem;
  font-weight: 700;
}
.app-content { flex: 1; padding: 2rem; }

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--aegp-gold-500);
  color: var(--aegp-brown-900);
  padding: 0.6rem 1rem;
  z-index: 999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

@media (max-width: 860px) {
  .app-layout { flex-direction: column; }
  .app-sidebar { width: 100%; border-right: none; border-bottom: 1px solid #eee4cd; }
}

@media (max-width: 720px) {
  .navbar-toggle { display: block; }
  .navbar-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 1rem 0;
  }
  .navbar-links.open { display: flex; }
  .hero h1 { font-size: 1.8rem; }
}
