/* Styles pour les cours - Version proche mais distincte des TPs */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #111827;
    background-color: #F8FAFC;
    padding: 0;
}

/* En-tête principal - Bleu marine foncé au lieu de bleu clair */
/* On stylise le conteneur header maintenant qu'il est dans le document */
header {
    background-color: #0f172a; /* Couleur de vos blocs pre */
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 40px;
    border-left: 6px solid #3b82f6; /* Accentuation bleue */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

h1 {
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
    color: #38bdf8; /* Un bleu plus clair pour le contraste sur fond sombre */
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace; /* Esprit code */
    font-size: 1.8em;
    text-transform: none;
    letter-spacing: 0;
}

/* Ajout d'un aspect "Prompt" ou "Commentaire" */
h1::before {
    color: #c084fc; /* Mauve pour le mot-clé */
    font-weight: normal;
}

h1::after {
    color: #94a3b8; /* Gris pour les parenthèses */
}
/* Conteneur de page - Fond blanc avec ombre */
.page-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 50px;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-height: calc(100vh - 200px);
}

/* Titres de chapitres - Style différent des TPs avec bordure gauche épaisse */
h5 {
    color: #1e293b;
    background: linear-gradient(90deg, #f1f5f9 0%, #ffffff 100%);
    padding: 18px 25px;
    border-left: 8px solid #1e3a8a;
    margin-top: 50px;
    margin-bottom: 25px;
    font-size: 1.8em;
    font-weight: bold;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

h5 a {
    text-decoration: none;
    color: #1e293b;
}

h5 a:hover {
    color: #1e3a8a;
}

/* Sous-titres h2 */
h2 {
    color: #1e3a8a;
    font-size: 1.6em;
    margin-top: 35px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3b82f6;
}

/* Sous-titres h3 - Bordure en dessous */
h3 {
    color: #1e3a8a;
    font-size: 1.3em;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    text-transform: none;
}

/* Paragraphes */
p, .classe_p {
    margin-bottom: 15px;
    text-align: justify;
    line-height: 1.8;
}

/* Listes */
ul {
    margin: 20px 0;
    padding-left: 30px;
}

li {
    margin-bottom: 12px;
    line-height: 1.8;
}

/* Liens */
a {
    color: #3b82f6;
    text-decoration: none;
}

a:hover {
    color: #1e3a8a;
    text-decoration: underline;
}

/* Boîtes de définition - Style cours avec bordure gauche bleue */
.definition {
    border-left: 5px solid #1e3a8a;
    background-color: #f8fafc;
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.definition strong {
    color: #1e3a8a;
    font-size: 1.1em;
}

/* Boîtes de théorème - Gris ardoise */
.theoreme {
    border-left: 5px solid #475569;
    background-color: #f1f5f9;
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.theoreme strong {
    color: #475569;
    font-size: 1.1em;
}

/* Conteneur SVG */
.svg-container {
    text-align: center;
    margin: 30px auto;
    padding: 20px;
    background-color: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

/* Styles SVG pour les graphes */
.node {
    fill: white;
    stroke: #1e3a8a;
    stroke-width: 2px;
}

.node-text {
    fill: #1e3a8a;
    font-family: 'Segoe UI', sans-serif;
    font-weight: bold;
}

.edge {
    stroke: #1e3a8a;
    stroke-width: 2px;
}

.edge-weighted {
    stroke: #64748b;
    stroke-width: 2px;
}

/* Blocs de code - Fond sombre comme les TPs mais légèrement différent */
pre {
    background-color: #0f172a;
    color: #f8fafc;
    padding: 20px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 25px 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.95em;
    line-height: 1.5;
    border: 1px solid #1e293b;
}

code {
    background-color: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    color: #e74c3c;
}

pre code {
    background-color: transparent;
    padding: 0;
    color: #f8fafc;
}

/* Tableaux */
.table_cours {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Tableaux harmonisés avec le style "Développement" */
.table_cours th {
    background-color: #0f172a; /* Le bleu-nuit du header */
    color: #38bdf8;            /* Le bleu clair "électrique" du titre h1 */
    padding: 15px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #1e293b; /* Une bordure plus sombre pour rester discret */
    font-family: 'Consolas', monospace; /* Rappel du style code */
    text-transform: uppercase;
    font-size: 0.9em;
}

.table_cours td {
    padding: 12px;
    border: 1px solid #e2e8f0;
    text-align: center;
    background-color: white;
    color: #334155; /* Un gris ardoise pour le texte du tableau */
}

/* Optionnel : une ligne de surbrillance au survol plus douce */
.table_cours tbody tr:hover {
    background-color: #f1f5f9;
}

.table_cours tbody tr:hover {
    background-color: #f8fafc;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 5px;
}

/* Strong - Emphase */
strong, b {
    color: #1e293b;
    font-weight: 600;
}

/* Em - Italique */
em {
    color: #475569;
}

/* Classes utilitaires */
.text-center {
    text-align: center;
}

.img-center {
    margin-left: auto;
    margin-right: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .page-content {
        padding: 20px;
    }

    h1 {
        font-size: 1.5em;
        padding: 20px 10px;
    }

    h5 {
        font-size: 1.4em;
        padding: 12px 15px;
    }

    h2 {
        font-size: 1.3em;
    }

    h3 {
        font-size: 1.1em;
    }
}
