/* Design System Variables */
:root {
  /* Colors */
  --color-primary: #d9534f;
  --color-primary-dark: #c9302c;
  --color-secondary: #2c3e50;
  --color-accent: #e67e22;
  --color-text: #2c3e50;
  --color-text-light: #7f8c8d;
  --color-background: #ffffff;
  --color-background-alt: #f8f9fa;
  --color-border: #e1e8ed;
  --color-hover: #ecf0f1;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Georgia", "Times New Roman", serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* Layout */
  --max-width: 1280px;
  --header-height: 70px;
  --border-radius: 8px;
  --border-radius-sm: 4px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  color: var(--color-secondary);
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.5rem;
}
h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: var(--space-sm);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-dark);
}

/* Header */
header {
  background-color: var(--color-secondary);
  color: white;
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

header .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header .logo {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: white;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

header .logo:hover {
  color: var(--color-primary);
}

header nav {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

header nav a {
  color: white;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius-sm);
  transition: all 0.2s ease;
}

header nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-primary);
}

/* Main Container */
main {
  min-height: calc(100vh - var(--header-height) - 120px);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Fix pour le header sticky - ajouter un padding en haut de tout le contenu */
main {
  padding-top: calc(var(--header-height) + 0px);
}

/* Annuler le padding pour le hero qui est pleine largeur */
main > .hero:first-child {
  margin-top: calc(-1 * var(--header-height));
  padding-top: var(--header-height);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--color-secondary) 0%, #34495e 100%);
  color: white;
  padding: var(--space-2xl) 0;
  margin-bottom: var(--space-xl);
}

.hero h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.hero p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
}

.hero .cta {
  display: inline-block;
  margin-top: var(--space-lg);
  padding: var(--space-sm) var(--space-lg);
  background-color: var(--color-primary);
  color: white;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md);
}

.hero .cta:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Section Styles */
.section {
  margin-bottom: var(--space-2xl);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 3px solid var(--color-primary);
}

.section-title {
  font-size: 1.75rem;
  margin: 0;
  color: var(--color-secondary);
}

.section-link {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.section-link:hover {
  gap: var(--space-sm);
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: var(--space-lg);
}

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

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Card Styles */
.card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
}

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

.card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: var(--color-background-alt);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-category {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
  color: var(--color-secondary);
  line-height: 1.3;
}

.card-title a {
  color: var(--color-secondary);
}

.card-title a:hover {
  color: var(--color-primary);
}

.card-excerpt {
  color: var(--color-text-light);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: var(--space-sm);
  flex: 1;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--color-text-light);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

.card-date {
  font-weight: 500;
}

.card-tag {
  background-color: var(--color-background-alt);
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Featured Article */
.featured-article {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.featured-article .featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 400px;
}

.featured-article .featured-content {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-article .card-category {
  font-size: 0.875rem;
}

.featured-article .card-title {
  font-size: 2rem;
  margin-bottom: var(--space-md);
}

.featured-article .card-excerpt {
  font-size: 1.125rem;
  margin-bottom: var(--space-lg);
}

.featured-article .read-more {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  background-color: var(--color-primary);
  color: white;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: all 0.2s ease;
  align-self: flex-start;
}

.featured-article .read-more:hover {
  background-color: var(--color-primary-dark);
  transform: translateX(4px);
}

/* Categories Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.category-card {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-accent) 100%
  );
  color: white;
  padding: var(--space-lg);
  border-radius: var(--border-radius);
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

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

.category-card h3 {
  color: white;
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
}

.category-card p {
  font-size: 0.875rem;
  opacity: 0.9;
  margin: 0;
}

/* Footer */
footer {
  background-color: var(--color-secondary);
  color: white;
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: var(--space-2xl);
}

footer .container {
  text-align: center;
}

footer p {
  opacity: 0.8;
  margin: 0;
}

footer a {
  color: var(--color-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --space-xl: 2rem;
    --space-2xl: 3rem;
  }

  header nav {
    gap: var(--space-sm);
  }

  header nav a {
    font-size: 0.75rem;
    padding: var(--space-xs);
  }

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

  .hero p {
    font-size: 1rem;
  }

  .featured-article {
    grid-template-columns: 1fr;
  }

  .featured-article .featured-content {
    padding: var(--space-lg);
  }

  .featured-article .card-title {
    font-size: 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.5rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}
