/* Reset et base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a, button {
  all: unset;
  cursor: pointer;
  box-sizing: border-box;
}

:root {
  --primary-color: #000000;
  --secondary-color: #e2b23a;
  --primary-hover: var(--secondary-color);
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  --background-color: #3f3f3f;
  --text-color: #000000;
  --border-color: #e5e7eb;
  --white: #ffffff;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header et Navigation */
.header {
  background: var(--primary-color);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.nav-brand a {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  display: block;
  position: relative;
  padding: 0.2em 0;
}

/* Fade in */
.nav-menu a::after {
  content: "";
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: white;
  transition: transform 0.25s ease-out;
}

.nav-menu a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom center;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem 0;
}

/* Hero Section */
.hero {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-hover)
  );
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.welcome-message {
  font-size: 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  display: inline-block;
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-primary,
.btn-alert {
  background: var(--white);
  color: var(--primary-color);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--primary-color);
  transform: translateY(-1px);
}

.btn-alert:hover {
  background-color: rgb(128, 15, 15);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--primary-color);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--secondary-color);
  transform: translateY(-1px);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* Sections */
.features {
  padding: 4rem 0;
  background: var(--white);
}

.features h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
  color: var(--text-color);
}

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

.feature-card {
  text-align: center;
  padding: 2rem;
  border-radius: 0.75rem;
  background: var(--background-color);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-card i {
  font-size: 3rem;
  color: var(--success-color);
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* Getting Started */
.getting-started {
  padding: 4rem 0;
  background: var(--background-color);
}

.getting-started h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

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

.step {
  background: var(--white);
  padding: 2rem;
  border-radius: 0.75rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 auto 1rem;
}

/* Page Header */
.page-header {
  background: var(--white);
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  font-size: 2.5rem;
  color: var(--text-color);
}

/* Content Grid */
.content {
  padding: 2rem 0;
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.content-main {
  background: var(--white);
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-box {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}

.info-box h4 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* Formulaires */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Authentification */
.auth-container {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  background: var(--white);
  padding: 3rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.auth-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Messages Flash */
.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.alert-success {
  background-color: #d1fae5;
  border-color: var(--success-color);
  color: #065f46;
}

.alert-error {
  background-color: #fee2e2;
  border-color: var(--error-color);
  color: #991b1b;
}

.alert-warning {
  background-color: #fef3c7;
  border-color: var(--warning-color);
  color: #92400e;
}

/* Page d'erreur */
.error-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background-color);
}

.error-content {
  text-align: center;
  max-width: 500px;
}

.error-icon {
  font-size: 4rem;
  color: var(--error-color);
  margin-bottom: 1rem;
}

.error-content h1 {
  font-size: 6rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.error-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.error-content p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--secondary-color);
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  background: var(--primary-color);
  color: var(--white);
  text-align: center;
  padding: 2rem 0;
  margin-top: auto;
}

.footer-content p {
  margin-bottom: 0.5rem;
}

/* Code blocks */
pre {
  background: var(--background-color);
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
  color: white;
}

code {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    /* gap: 1rem; */
  }

  .nav-menu {
    flex-direction: row;
    text-align: center;
    gap: 1rem;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 2rem;
  }

  .features h2,
  .getting-started h2 {
    font-size: 2rem;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .error-actions {
    flex-direction: column;
  }
}
