:root {
  --gold:       #C9A84C;
  --gold-light: #E8C97A;
  --dark:       #0F0F0F;
  --dark2:      #1A1A1A;
  --dark3:      #252525;
  --card-bg:    #1E1E1E;
  --text:       #F0EDE8;
  --text-muted: #9A9490;
  --accent:     #E8534A;
  --success:    #4CAF7D;
  --border:     rgba(201,168,76,0.2);
  --radius:     14px;
  --shadow:     0 8px 32px rgba(0,0,0,0.4);
}

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

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }


::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark2); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }


.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--dark);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border: none;
  border-radius: 50px;
  transition: all 0.25s ease;
  letter-spacing: 0.02em;
}
.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.35);
}
.btn-primary.full-width { width: 100%; justify-content: center; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--gold);
  font-weight: 500;
  font-size: 1rem;
  padding: 13px 27px;
  border: 1.5px solid var(--gold);
  border-radius: 50px;
  transition: all 0.25s ease;
}
.btn-secondary:hover {
  background: rgba(201,168,76,0.1);
  transform: translateY(-2px);
}

.btn-arrow { font-size: 1.1rem; transition: transform 0.2s; }
.btn-primary:hover .btn-arrow { transform: translateX(4px); }

.btn-link-admin {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50px;
  transition: all 0.2s;
}
.btn-link-admin:hover { color: var(--gold); border-color: var(--gold); }



.page-accueil { background: var(--dark); overflow-x: hidden; }

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 24px;
}


.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.cercle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
}
.c1 { width: 500px; height: 500px; background: var(--gold); top: -150px; right: -100px; }
.c2 { width: 300px; height: 300px; background: var(--accent); bottom: 0; left: -100px; }
.c3 { width: 200px; height: 200px; background: var(--gold-light); top: 50%; left: 30%; }

.hero-header {
  position: relative; z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.hero-content {
  position: relative; z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0;
  max-width: 600px;
}

.badge {
  display: inline-block;
  background: rgba(201,168,76,0.12);
  color: var(--gold);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text);
}

.hero-content h1 .accent { color: var(--gold); }

.hero-sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
}
.stat-item { text-align: center; }
.stat-num {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
}
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.stat-sep { width: 1px; height: 40px; background: var(--border); }


.hero-cards {
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 1;
}

.card-float {
  background: rgba(30,30,30,0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  animation: float 4s ease-in-out infinite;
}
.card-float .card-icon { font-size: 1.2rem; }
.card2 { animation-delay: 1.5s; }
.card3 { animation-delay: 3s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}


.section-pourquoi {
  padding: 80px 24px;
  max-width: 1000px;
  margin: 0 auto;
}
.section-pourquoi h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 40px;
  text-align: center;
}

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

.info-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s, border-color 0.2s;
}
.info-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.info-icon { font-size: 2rem; margin-bottom: 14px; }
.info-card h3 { font-size: 1.05rem; margin-bottom: 10px; color: var(--text); }
.info-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }


.footer {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}


.page-formulaire { background: var(--dark); padding-bottom: 60px; }

.form-wrapper {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 20px;
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo-sm {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--gold);
}

.back-btn {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.back-btn:hover { color: var(--gold); }


.progress-container {
  height: 4px;
  background: var(--dark3);
  border-radius: 2px;
  margin-bottom: 12px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 25%;
}

.steps-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.step-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.step-label.active { color: var(--gold); }

.step-indicator {
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.step-indicator span { color: var(--gold); font-weight: 600; }


.form-step { display: none; animation: fadeIn 0.3s ease; }
.form-step.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

.step-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.step-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}


.field-group { margin-bottom: 22px; }
.field-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}
.req { color: var(--accent); }
.opt { color: var(--text-muted); font-weight: 400; font-size: 0.8rem; }

input[type="text"],
input[type="number"],
input[type="password"],
select,
textarea {
  width: 100%;
  background: var(--dark3);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 13px 16px;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23C9A84C' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

select option { background: var(--dark3); }

textarea { resize: vertical; min-height: 100px; }

.input-with-unit {
  position: relative;
}
.input-with-unit input { padding-right: 70px; }
.unit {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  pointer-events: none;
}


.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.radio-group.vertical { flex-direction: column; }

.radio-card, .check-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--dark3);
  border: 1.5px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 11px 16px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  color: var(--text);
  flex: 1;
  min-width: 130px;
}

.radio-card:hover, .check-card:hover {
  border-color: var(--gold);
  background: rgba(201,168,76,0.05);
}
.radio-card input, .check-card input { display: none; }
.radio-card.selected, .check-card.selected {
  border-color: var(--gold);
  background: rgba(201,168,76,0.12);
  color: var(--gold);
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}


.star-rating {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}
.star {
  font-size: 2rem;
  color: var(--dark3);
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
  line-height: 1;
}
.star:hover, .star.active { color: var(--gold); transform: scale(1.15); }


.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  gap: 12px;
}

.btn-next, .btn-prev {
  background: var(--card-bg);
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 13px 24px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
}
.btn-next:hover { border-color: var(--gold); color: var(--gold); }
.btn-prev:hover { border-color: var(--gold); color: var(--gold); }
.btn-next { margin-left: auto; }

.hidden { display: none !important; }


.form-error {
  background: rgba(232,83,74,0.12);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: #FF7B74;
  font-size: 0.875rem;
  margin-top: 16px;
}


.page-merci {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 24px;
}

.merci-wrapper {
  max-width: 500px;
  text-align: center;
}

.merci-icon {
  font-size: 4rem;
  margin-bottom: 24px;
  animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
  0%   { transform: scale(0); opacity: 0; }
  70%  { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.merci-wrapper h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 16px;
}

.merci-sub {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.merci-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}

.badge-item {
  background: rgba(201,168,76,0.1);
  border: 1px solid var(--border);
  color: var(--gold);
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 50px;
}

.merci-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}


.page-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 24px;
  background: radial-gradient(ellipse at top, rgba(201,168,76,0.06) 0%, var(--dark) 60%);
}

.login-wrapper {
  width: 100%;
  max-width: 380px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
}

.login-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 10px;
}

.login-wrapper h2 {
  font-size: 1.2rem;
  margin-bottom: 6px;
  color: var(--text);
}

.login-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 28px;
}

.login-form { text-align: left; }
.login-form .field-group { margin-bottom: 20px; }

.alert-error {
  background: rgba(232,83,74,0.12);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 12px 16px;
  color: #FF7B74;
  font-size: 0.85rem;
  margin-bottom: 20px;
  text-align: left;
}

.back-link {
  display: block;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--gold); }


.page-dashboard { background: var(--dark); min-height: 100vh; }

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  background: var(--dark2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.dash-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--gold);
}

.dash-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-badge {
  background: rgba(201,168,76,0.1);
  color: var(--gold);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
}

.btn-export {
  background: var(--gold);
  color: var(--dark);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-export:hover { background: var(--gold-light); }

.btn-logout {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50px;
  transition: all 0.2s;
}
.btn-logout:hover { border-color: var(--accent); color: var(--accent); }

.dash-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

.dash-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.dash-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 4px;
}

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

.btn-refresh {
  background: var(--dark3);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 9px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.btn-refresh:hover { color: var(--gold); border-color: var(--gold); }


.loader-overlay {
  text-align: center;
  padding: 60px;
  color: var(--text-muted);
}
.loader-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--dark3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }


.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.kpi-card:hover { border-color: var(--gold); transform: translateY(-3px); }

.kpi-icon { font-size: 1.8rem; margin-bottom: 10px; }

.kpi-value {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}

.kpi-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}


.charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}
.chart-card:hover { border-color: rgba(201,168,76,0.35); }
.chart-card.full-width { margin-bottom: 20px; }

.chart-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}

.chart-card canvas { max-height: 280px; }

@media (max-width: 768px) {
  .hero-cards { display: none; }
  .hero-content h1 { font-size: 2.8rem; }
  .dash-header { padding: 14px 16px; }
  .dash-header-right { gap: 8px; }
  .dash-badge { display: none; }
  .btn-logout { display: none; }
  .dash-main { padding: 20px 16px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }
  .dash-title { font-size: 1.5rem; }
  .form-wrapper { padding: 0 16px; }
  .radio-group { flex-direction: column; }
  .radio-card, .check-card { min-width: unset; }
  .login-wrapper { padding: 32px 24px; }
}

@media (max-width: 400px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 12px; }
  .stat-sep { display: none; }
}
