* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
html, body {
    margin: 0;
    overflow-x: hidden;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    min-height: 100vh;
    display: grid;
    grid-template-rows: min-content auto min-content;
    -webkit-tap-highlight-color: transparent;
}
a {
    color: #00346C;
    transition: color 0.3s ease;
    text-decoration: none;
}
a:hover, a:focus {
    color: #111;
    text-decoration: underline;
}
header {
    background-color: #466494;
    padding: 5px 0;
}
h1 {
    font-size: 2em;
    margin-bottom: 15px;
}
h2 {
    font-size: 1.6em; /* Légèrement plus petit que h1 */
    margin-top: 20px;
}
h3 {
    font-size: 1.4em;
    margin-top: 10px;
}
main {
    margin: 0 auto;
    max-width: 900px;
    width: 100%;
    font-size: 1.2em;
}
article {
    line-height: 1.8;
    text-align: justify;
    margin-bottom: 25px; /* Plus d'espace entre les articles */
}
article header {
    background-color: #fff;
    text-align: left;
    box-shadow: none;
    border-bottom: 1px solid #ccc;
}
address {
    display: inline;
}
h2 {
    font-size: 1.6em;
}
h3 a {
    text-decoration: none;
}
h3 a:hover {
    text-decoration: underline;
}
pre {
    background-color: #f4f4f4; /* Gris clair pour le fond */
    border-left: 4px solid #466494; /* Bordure plus épaisse et colorée */
    padding: 1em;
    margin-top: 20px;
    font-size: 1em; /* Un peu plus grand pour la lisibilité */
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: justify;
    display: inline-block;
    overflow: auto;
    border-radius: 0 1em 1em;
}
figure {
    text-align: center;
}
caption {
    caption-side: bottom;
    font-size: 0.8em;
}
table {
    border-collapse: collapse;
    margin: 1em 0;
    border: 1px solid #888;
}
pre, table {
    max-width: 100%;
    overflow-x: auto; /* permet un scroll horizontal local si besoin */
}
th {
    background-color: #eee;
    padding: 0 10px;
    text-align: center;
    font-size: 0.9em;
    border: 1px solid #aaa;
}
td {
    text-align: center;
    padding: 0 10px;
    font-size: 0.9em;
    border: 1px solid #aaa;
}
body > footer {
    background-color: #ddd;
    color: #333;
    padding: 15px 0;
    text-align: center;
}
body > footer a {
    color: #555;
    text-decoration: none;
}
body > footer li {
    list-style: none;
    display: inline-block;
    margin: 0 20px;
}
.tag {
    font-size: 0.6em;
    margin: 0px 10px 10px 0;
    background-color: #bf4b4b;
    color: #fff;
    padding: 5px;
    display: inline-block;
    border-radius: 3px;
    text-transform: uppercase;
    text-decoration: none;
}
.function {
    color: #466494;
}
.subtitle {
    font-size: 1.1em;
    font-weight: 500;
    font-style: italic;
    color: #555;
    margin-top: -5px;
    margin-bottom: 15px;
}
a[target="_blank"] {
	position: relative;
	color: #0066cc;
	text-decoration: none;
}
a[target="_blank"]::after {
	content: "";
	position: absolute;
	top: 0.2em;
	right: -1.2em;
	width: 1em;
	height: 1em;
	background-image: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%230066cc" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M18 13v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/></svg>');
	background-repeat: no-repeat;
	background-size: contain;
	pointer-events: none;
}
@media screen and (max-width: 900px) {
    body {
        font-size: 1em; /* Augmenter légèrement la taille de la police */
    }
    main {
        width: 100%;
        padding: 0 10px; /* Ajoute de la marge pour éviter l'effet bord à bord */
    }
    h1 {
        font-size: 1.8em; /* Ajuste la taille des titres pour mieux s'adapter */
    }
    h2 {
        font-size: 1.4em;
    }
    h3 {
        font-size: 1.2em;
    }
    img {
        max-width: 100%;
        height: auto;
    }
    pre {
        overflow: auto;
        white-space: pre-wrap;
        word-wrap: break-word;
        text-align: justify;
    }
    video {
        width: 100%;
    }
    body > footer li {
        display:block;
        margin: 10px 0;
    }
}
