nav a[href] {
  text-decoration: none;
}

h1 {
  font-variant: small-caps;
}

h2, h3 {
  font-variant: normal;
}

nav #theme {
  margin: 0;
}

.figure {
  text-align: center;
  width: 80%;
  display: block;
  clear: both;
}

.sommaire-page ul {
   position: sticky;
   top: 50px;
   left: 0px;
}

.sommaire-general ul, .sommaire-page ul {
  margin: 0;
  padding: 0;
}

.sommaire-general li, .sommaire-page li {
  font-size: 0.85em;
  display: block;
  margin: 0;
  padding: .3rem 0;
}

.sommaire-general ul {
  width: 90%;
}

.sommaire-general li a {
  text-decoration: none;
}

.contenu article {
  padding: 0 4%;
}

.pagination {
  text-align: center;
  margin: 5rem auto;
}

.pagination a {
  padding: .4em 1em;
  font-size: 85%;
  letter-spacing: .1em;
  color: var(--clink);
  cursor: pointer; 
  font-weight: bold;
  margin: .5em;
  border: 1.5px solid var(--clink);
  color: var(--clink);
  text-decoration: none;
}

main td, main th {
  font-size: 76%;
  white-space: normal;
}

.sidenote, main .marge {
  position: absolute;
  width: 8rem;
  right: -8.6rem;
  font-size: .8em;
  line-height: 1.4em;
}

.sidenote-number {
    counter-increment: sidenote-counter;
}

.sidenote-number:after,
.sidenote:before {
    position: relative;
    vertical-align: baseline;
}

.sidenote-number:after {
    content: counter(sidenote-counter);
    font-size: 0.6rem;
    top: -0.5rem;
    left: 0.1rem;
    color: red;
}

.sidenote:before {
    content: counter(sidenote-counter) " ";
    font-size: 0.6rem;
    top: -0.5rem;
    color: red;
}

.sidenote-wrapper input {
    display: none;
}

.info {
  --cmed: #31708f ;
  --clight: #d9edf7;
  background-color: var(--clight);
}

.success {
  --cmed: #3c763d ;
  --clight: #dff0d8;
  background-color: var(--clight);
}

.danger {
  --cmed: #a94442;
  --clight: #f2dede ;
  background-color: var(--clight);
}

.warning {
  --cmed: #8a6d3b;
  --clight: #fcf8e3;;
  background-color: var(--clight);
}

.note {
  --cmed: var(--cemph);
  --clight: var(--cemphbg);
  background-color: var(--clight);
}

.alerte {
  --cmed: #c11;
  --clight: #e221;
  background-color: var(--clight);
}

.info, .success, .danger, .warning, .note, .alerte {
  display: block;
  margin: .5rem 0 1rem;
  border-radius: 4px;
  overflow: hidden;
  border-left: .4rem solid var(--cmed);
  padding: 0 1rem;
  width: 92%;
}


/* ===== CSS POUR IMAGES MODALES ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    position: relative;
    margin: 5% auto;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.modal-caption {
    color: white;
    font-size: 16px;
    margin-top: 15px;
    padding: 0 20px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
