/*
Theme Name: Centre de Formation
Description: Thème WordPress moderne et professionnel pour centre de formation avec système multilingue intégré
Version: 1.0
Author: Training Center Theme
*/

:root {
  --primary-color: #1e88e5;
  --secondary-color: #0d47a1;
  --accent-color: #42a5f5;
  --text-dark: #2c2c2c;
  --text-light: #666;
  --background-light: #f8f9fa;
  --white: #ffffff;
  --border-light: #e0e0e0;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --error-color: #f44336;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
}

/* Support RTL */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .container {
  direction: rtl;
}

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

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col {
  padding: 0 15px;
}

.col-12 { flex: 0 0 100%; }
.col-8 { flex: 0 0 66.666667%; }
.col-4 { flex: 0 0 33.333333%; }
.col-6 { flex: 0 0 50%; }
.col-3 { flex: 0 0 25%; }

/* Header */
.site-header {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.header-top {
  background: var(--primary-color);
  color: var(--white);
  padding: 10px 0;
  font-size: 14px;
}

.header-main {
  padding: 15px 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-dark);
  text-decoration: none;
}

.custom-logo {
  max-height: 50px;
  width: auto;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation li {
  margin: 0 20px;
}

.main-navigation a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
  color: var(--primary-color);
}

.language-switcher {
  display: flex;
  gap: 10px;
}

.language-switcher a {
  padding: 5px 10px;
  background: var(--background-light);
  color: var(--text-dark);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.language-switcher a.active,
.language-switcher a:hover {
  background: var(--primary-color);
  color: var(--white);
}

/* Slider */
.news-slider {
  margin-bottom: 60px;
}

.slider-container {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.slides-wrapper {
  display: flex;
  transition: transform 0.5s ease;
}

.slide {
  min-width: 100%;
  height: 500px;
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-content {
  text-align: center;
  color: white;
  max-width: 800px;
  padding: 0 20px;
}

.slider-prev,
.slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.3s ease;
}

.slider-prev {
  left: 20px;
}

.slider-next {
  right: 20px;
}

.slider-prev:hover,
.slider-next:hover {
  background: rgba(255,255,255,0.8);
  color: var(--primary-color);
}

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-dot.active {
  background: white;
}

/* Sections */
.section {
  padding: 60px 0;
}

.section-title {
  font-size: 32px;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 15px;
  text-align: center;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 50px;
}

/* Boutons */
.btn {
  display: inline-block;
  padding: 12px 20px;
  background: var(--primary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(30, 136, 229, 0.3);
}

.btn-secondary {
  background: var(--white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

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

/* Avantages */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.advantage-card {
  background: var(--white);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  text-align: center;
  transition: all 0.3s ease;
}

.advantage-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Cartes de formation */
.formation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.formation-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.formation-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.formation-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.formation-content {
  padding: 25px;
}

.formation-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.formation-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  font-size: 14px;
  color: var(--text-light);
}

.formation-instructor {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.instructor-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.instructor-info h4 {
  font-size: 14px;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.instructor-info span {
  font-size: 12px;
  color: var(--text-light);
}

/* Événements */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.event-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.event-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.event-content {
  padding: 20px;
}

.event-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.event-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 14px;
  color: var(--text-light);
}

/* Équipe pédagogique */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.team-member {
  background: var(--white);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.team-member:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.member-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 15px;
}

.member-name {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.member-role {
  font-size: 14px;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.member-specialty {
  font-size: 13px;
  color: var(--text-light);
}

/* Statistiques */
.stats-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding: 60px 0;
  border-radius: 12px;
  margin-bottom: 80px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  text-align: center;
}

.stat-item {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }

.stat-number {
  font-size: 48px;
  font-weight: bold;
  color: white;
  margin-bottom: 10px;
}

.stat-label {
  color: rgba(255,255,255,0.9);
  font-size: 16px;
  font-weight: 500;
}

/* Sidebar */
.sidebar {
  background: var(--background-light);
  padding: 30px;
  border-radius: 12px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  margin-bottom: 40px;
}

.sidebar-widget:last-child {
  margin-bottom: 0;
}

.widget-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.courses-list {
  list-style: none;
}

.courses-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.courses-list li:last-child {
  border-bottom: none;
}

.course-icon {
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
}

.course-title {
  color: var(--text-dark);
  font-size: 14px;
  text-decoration: none;
}

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

/* Certificat */
.certificate-widget {
  background: var(--white);
  border: 2px dashed var(--primary-color);
  padding: 20px;
  text-align: center;
  border-radius: 12px;
}

.certificate-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.certificate-subtitle {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 15px;
}

/* Footer */
.site-footer {
  background: var(--text-dark);
  color: var(--white);
  padding: 60px 0 20px;
  margin-top: 80px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--white);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 10px;
}

.footer-section a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  border-top: 1px solid #444;
  padding-top: 20px;
  text-align: center;
  color: #ccc;
  font-size: 14px;
}

/* Menu mobile */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-dark);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up,
.animate-in {
  animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  .header-content {
    flex-direction: column;
    gap: 20px;
  }
  
  .main-navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .main-navigation.mobile-menu-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .main-navigation ul {
    flex-direction: column;
    padding: 20px;
  }
  
  .main-navigation li {
    margin: 10px 0;
    text-align: center;
  }
  
  .slide {
    height: 300px !important;
  }
  
  .slide-content h2 {
    font-size: 32px !important;
  }
  
  .slide-content p {
    font-size: 16px !important;
  }
  
  .row {
    flex-direction: column;
  }
  
  .col-8, .col-4 {
    flex: 0 0 100%;
  }
  
  .formation-grid,
  .events-grid,
  .team-grid,
  .advantages-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .sidebar {
    margin-top: 40px;
    position: static;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .slider-prev,
  .slider-next {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .slider-prev {
    left: 10px;
  }
  
  .slider-next {
    right: 10px;
  }
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
  .dark-mode {
    --text-dark: #ffffff;
    --text-light: #cccccc;
    --background-light: #2c2c2c;
    --white: #1a1a1a;
    --border-light: #444444;
  }
}