/* Reset et styles généraux */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

/* Header moderne */
header {
  background: rgba(255, 255, 255, 0.95);
  padding: 15px 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Bouton de traduction avec animation */
.lang-switcher {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: absolute;
  top: 15px;
}

/* Position pour le français (droite) */
[dir="ltr"] .lang-switcher {
  right: 30px;
  left: auto;
}

/* Position pour l'arabe (gauche) */
[dir="rtl"] .lang-switcher {
  left: 30px;
  right: auto;
}

.lang-switcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Navigation */
header nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

header nav a {
  color: #333;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
  font-size: 16px;
}

header nav a:hover {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  transform: translateY(-2px);
}

/* Layout principal */
.container {
  display: flex;
  max-width: 1400px;
  margin: 30px auto;
  padding: 0 20px;
  gap: 30px;
}

/* Sidebar moderne */
aside {
  width: 280px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

aside h3 {
  color: #667eea;
  margin-bottom: 20px;
  font-size: 22px;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 2px solid #667eea;
}

/* Boutons de section */
aside button {
  width: 100%;
  padding: 14px;
  margin-top: 12px;
  border: none;
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  text-align: center;
}

aside button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Sous-sections */
.sub {
  display: none;
  margin-top: 8px;
  padding: 15px;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 12px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.sub a {
  display: block;
  text-decoration: none;
  color: #555;
  padding: 10px 15px;
  margin: 5px 0;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 15px;
}

.sub a:hover {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  padding-left: 20px;
  padding-right: 20px;
}

/* Main content */
main {
  flex: 1;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

/* Sections */
section {
  animation: slideUp 0.5s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.centered {
  text-align: center;
  padding: 40px 20px;
}

.hidden {
  display: none;
}

/* Titres */
h1 {
  color: #667eea;
  margin-bottom: 25px;
  font-size: 32px;
  background: linear-gradient(45deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

/* Cartes d'actualités */
.news-item {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  margin: 15px 0;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.news-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff7e5f, #feb47b);
}

.news-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-item strong {
  font-size: 18px;
  display: block;
  margin-bottom: 10px;
}

.news-item small {
  opacity: 0.9;
  font-size: 14px;
}

.news-item button {
  background: #ff7e5f;
  color: white;
  border: none;
  padding: 8px 20px;
  margin-top: 12px;
  cursor: pointer;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.news-item button:hover {
  background: #ff6b4a;
  transform: scale(1.05);
}

/* Responsive design */
@media (max-width: 1024px) {
  .container {
    flex-direction: column;
  }
  
  aside {
    width: 100%;
  }
  
  header nav {
    justify-content: center;
    margin-top: 50px;
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }
  
  .lang-switcher {
    position: static;
    margin-bottom: 15px;
  }
  
  header nav {
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
  }
  
  .container {
    padding: 10px;
  }
}

/* Styles spécifiques pour RTL (arabe) */
[dir="rtl"] .sub a:hover {
  padding-left: 0;
  padding-right: 20px;
}

[dir="rtl"] aside {
  text-align: right;
}

[dir="rtl"] .news-item {
  text-align: right;
}