:root {
    /* Couleurs principales */
    --primary: #3a86ff;       /* Bleu vif pour les éléments principaux */
    --secondary: #8338ec;     /* Violet pour les accents secondaires */
    --accent: #ff006e;        /* Rose pour les éléments d'accentuation */
    --dark: #212529;          /* Noir pour le texte */
    --light: #f8f9fa;         /* Blanc cassé pour les arrière-plans clairs */
    --success: #06d6a0;       /* Vert pour les succès */
    --warning: #ffbe0b;       /* Jaune pour les avertissements */
    
    /* Effets */
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1); /* Ombre douce */
    --transition: all 0.3s ease; /* Transition fluide */
    --border-radius: 8px;     /* Bordures arrondies */
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f7fa;
    color: var(--dark);
    line-height: 1.6;
}

/* En-tête */
header {
    background: white;
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo i {
    color: var(--primary);
    font-size: 1.8rem;
    margin-right: 0.5rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Navigation principale */
nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
    position: relative;
}

nav ul li a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

nav ul li a i {
    margin-right: 0.5rem;
}

nav ul li a:hover {
    background: rgba(58, 134, 255, 0.1);
    color: var(--primary);
}

nav ul li.active a {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow);
}

/* Menu mobile */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Contenu principal */
main {
    margin-top: 80px;
    padding: 2rem;
    min-height: calc(100vh - 160px);
}

/* En-tête de page */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h2 {
    font-size: 2.2rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.page-header p {
    color: #6c757d;
    max-width: 700px;
    margin: 0 auto;
}

/* Conteneur mathématique */
.math-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Cartes mathématiques */
.math-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

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

.math-card-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
}

.math-card-header i {
    font-size: 1.5rem;
    margin-right: 0.8rem;
}

.math-card-body {
    padding: 1.5rem;
}

.math-card-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.math-card-desc {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.math-card-footer {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn i {
    margin-right: 0.5rem;
}

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

.btn-primary:hover {
    background: #2a75e6;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: rgba(58, 134, 255, 0.1);
}

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

.btn-accent:hover {
    background: #e00063;
}

/* Formules mathématiques */
.math-formula {
    font-family: 'Source Code Pro', monospace;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    overflow-x: auto;
    position: relative;
}

.math-formula:before {
    content: "Formule";
    position: absolute;
    top: -10px;
    left: 15px;
    background: white;
    padding: 0 5px;
    font-size: 0.8rem;
    color: var(--primary);
    font-family: 'Roboto', sans-serif;
}

/* Pied de page */
footer {
    background: var(--dark);
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
}

footer p {
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    nav ul {
        position: fixed;
        top: 80px;
        left: -100%;
        background: white;
        width: 100%;
        height: calc(100vh - 80px);
        flex-direction: column;
        align-items: center;
        padding-top: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow);
    }

    nav ul.show {
        left: 0;
    }

    nav ul li {
        margin: 1rem 0;
    }

    .menu-toggle {
        display: block;
    }

    .page-header h2 {
        font-size: 1.8rem;
    }

    .math-container {
        grid-template-columns: 1fr;
    }
}

/* Styles spécifiques pour le contenu mathématique */
.math-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.math-content h3 {
    color: var(--primary);
    margin: 1.5rem 0 1rem;
    border-bottom: 2px solid var(--light);
    padding-bottom: 0.5rem;
}

.math-content p {
    margin-bottom: 1rem;
}

.theorem {
    background: rgba(58, 134, 255, 0.05);
    border-left: 4px solid var(--primary);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.theorem-title {
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.proof {
    font-style: italic;
    background: rgba(6, 214, 160, 0.05);
    padding: 1rem;
    margin: 1rem 0;
    border-left: 4px solid var(--success);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.example {
    background: rgba(255, 190, 11, 0.05);
    padding: 1rem;
    margin: 1rem 0;
    border-left: 4px solid var(--warning);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.example-title {
    font-weight: bold;
    color: var(--warning);
    margin-bottom: 0.5rem;
}

/* Styles pour les équations */
.equation {
    text-align: center;
    margin: 1.5rem 0;
    font-size: 1.1rem;
    font-family: 'Source Code Pro', monospace;
}

/* Style pour les listes d'exercices */
.exercise-list {
    list-style: none;
}

.exercise-item {
    padding: 1rem;
    margin-bottom: 1rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.exercise-item:hover {
    transform: translateX(5px);
}

.exercise-difficulty {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 0.5rem;
}

.difficulty-easy {
    background: rgba(6, 214, 160, 0.2);
    color: var(--success);
}

.difficulty-medium {
    background: rgba(255, 190, 11, 0.2);
    color: var(--warning);
}

.difficulty-hard {
    background: rgba(255, 0, 110, 0.2);
    color: var(--accent);
}
/* Footer amélioré */
footer {
  background: var(--dark);
  color: white;
  text-align: center;
  padding: 3rem 2rem;
  margin-top: 4rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: white;
  margin: 0 1rem;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}



/* Section Hero améliorée */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 8rem 2rem 6rem;
  text-align: center;
  clip-path: ellipse(100% 60% at 50% 35%);
  margin-bottom: 3rem;
}
.hero-content{padding:1cm;}
.hero-content h2 {
  font-size: 2.8rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}












/* Responsive */
@media (max-width: 768px) {
  .hero {
    clip-path: ellipse(120% 60% at 50% 35%);
    padding: 6rem 1rem 4rem;
  }
  
  .hero-content h2 {
    font-size: 2rem;
  }
  
  nav ul {
    position: fixed;
    top: 80px;
    left: -100%;
    background: white;
    width: 100%;
    height: calc(100vh - 80px);
    flex-direction: column;
    align-items: center;
    padding-top: 2rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
  }
  
  nav ul.show {
    left: 0;
  }
  
  nav ul li {
    margin: 1rem 0;
  }
  
  .menu-toggle {
    display: block;
    font-size: 1.5rem;
    color: var(--dark);
  }
}
.download-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #2ea44f;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}

.download-btn:hover {
  background-color: #22863a;
}
features{padding:1cm; margin:1cm}



/* Boutons modernes */
.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
}

.btn:active {
  transform: translateY(1px);
}

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

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

.btn-accent {
  background: var(--accent);
}

.btn-accent:hover {
  background: #3a7bc8;
}

.btn-warning {
  background: var(--warning);
}

.btn-warning:hover {
  background: #e5177a;
}

/* Effet de vague sur les boutons */
.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}


 .theorem-box {
            border-left: 4px solid #4a6baf;
            background-color: #f8f9fa;
            padding: 15px 20px;
            margin: 20px 0;
            border-radius: 0 5px 5px 0;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            font-family: 'Georgia', serif;
            position: relative;
        }

        .theorem-title {
            font-weight: bold;
            color: #4a6baf;
            margin-bottom: 10px;
            font-size: 1.1em;
        }

        .theorem-content {
            font-style: italic;
            line-height: 1.6;
        }

        .theorem-number {
            position: absolute;
            top: 10px;
            right: 15px;
            color: #6c757d;
            font-size: 0.9em;
        }
		
		
		
		
/* Styles pour la pagination - Version corrigée */
.pagination-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.pagination-info {
    margin-bottom: 10px;
    color: #6c757d;
    font-size: 0.9em;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: nowrap; /* Empêche le retour à la ligne */
    overflow-x: auto; /* Permet le défilement si trop d'éléments */
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

.page-item {
    margin: 0 3px;
    flex-shrink: 0; /* Empêche le rétrécissement des éléments */
}

.page-link {
    display: block;
    padding: 8px 12px;
    color: #007bff;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap; /* Empêche le retour à la ligne du texte */
}

/* Reste du CSS inchangé */
.page-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.page-item.active .page-link {
    z-index: 1;
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    cursor: default;
    background-color: #fff;
    border-color: #dee2e6;
}