/* RESET */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial, Helvetica, sans-serif;
}

/* BODY */
body{
    background:#f4f7fa;
    color:#333;
    line-height:1.6;
}

/* HEADER */
.header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:#186C9B;
    color:white;
    padding:5px 30px;
    position:sticky;
    top:0;
    z-index:1000;
}
.header a:hover{
    color:#ccc;
}

.logo{
    font-size:22px;
    font-weight:bold;
}
.logo img {
max-height:70px;
border:0px;
padding:0px;
}

.menu a{
    color:white;
    margin-left:20px;
    text-decoration:none;
}

.menu a:hover{
    text-decoration:underline;
}

/* BURGER */
.burger{
    font-size:26px;
    cursor:pointer;
    display:none;
}

/* SIDEBAR */
.sidebar{
    position:fixed;
    top:0;
    right:-250px;
    width:250px;
    height:100%;
    background:#0F4C6B;
    padding-top:80px;
    transition:0.3s;
    z-index:999;
}

.sidebar a{
    display:block;
    padding:15px 25px;
    color:white;
    text-decoration:none;
}

.sidebar a:hover{
    background:#186C9B;
}

/* SIDEBAR ACTIVE */
.sidebar.active{
    right:0;
}

/* TABLE DES MATIÈRES */
#toc-container {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 280px;
    max-height: 70vh;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    overflow: hidden;
    z-index: 9999;
    font-size: 14px;
}

#toc-header {
    cursor: move;
    background: linear-gradient(135deg, #186C9B 0%, #0F4C6B 100%);
    color: #fff;
    padding: 12px 16px;
    font-weight: 600;
    user-select: none;
}

#toc-list {
    list-style: none;
    max-height: calc(70vh - 48px);
    overflow-y: auto;
    padding: 12px;
}

#toc-list li {
    margin: 6px 0;
}

#toc-list li.level-1 { margin-left: 0px; font-weight: 600; }
#toc-list li.level-2 { margin-left: 12px; }
#toc-list li.level-3 { margin-left: 24px; }
#toc-list li.level-4 { margin-left: 36px; font-size: 13px; }

#toc-list a {
    text-decoration: none;
    color: #186C9B;
    display: block;
    padding: 4px 0;
    border-radius: 4px;
    transition: all 0.2s ease;
}

#toc-list a:hover {
    background: #f0f4ff;
    color: #0F4C6B;
    padding-left: 4px;
}

/* CONTENU */
.content{
    max-width:900px;
    margin:auto;
    padding:40px 20px;
}

/* TITRES */
h1{
    font-size:40px;
    margin-bottom:20px;
    color:#186C9B;
    scroll-margin-top: 100px;
}

h2{
    font-size:30px;
    margin-top:30px;
    margin-bottom:10px;
    color:#0F4C6B;
    scroll-margin-top: 100px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
}

h3{
    font-size:22px;
    margin-top:20px;
    scroll-margin-top: 100px;
    color: #186C9B;
}

/* TEXTE */
p{
    margin-bottom:15px;
}

/* IMAGE */
main img{
    width:100%;
    margin-top:20px;
    border-radius:8px;
}

/* LIENS */
a{
    color:#186C9B;
}

a:hover{
    color:#0F4C6B;
}

/* CONTACT */
.contact{
    background:white;
    padding:40px;
    text-align:center;
}

.contact form{
    max-width:500px;
    margin:auto;
    display:flex;
    flex-direction:column;
    gap:12px;
}

input, textarea{
    padding:10px;
    border:1px solid #ccc;
    border-radius:5px;
}

textarea{
    min-height:120px;
}

/* BOUTONS */
button{
    padding:12px;
    border:none;
    background:#186C9B;
    color:white;
    border-radius:5px;
    cursor:pointer;
}

button:hover{
    background:#0F4C6B;
}

/* FOOTER */
.footer{
    background:#186C9B;
    color:white;
    text-align:center;
    padding:20px;
    margin-top:40px;
}

.footer a{
    color:white;
    margin-left:10px;
}

/* MODAL */
.modal{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.6);
    justify-content:center;
    align-items:center;
}

.modal-content{
    background:white;
    padding:30px;
    border-radius:8px;
    max-width:400px;
    text-align:center;
}

.close{
    float:right;
    cursor:pointer;
    font-size:22px;
}

/* RESPONSIVE */
@media(max-width:768px){

    .menu{
        display:none;
    }

    .burger{
        display:block;
    }

    /* TABLE DES MATIERES MOBILE */
    #toc-container {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        bottom: auto;
        width: 100%;
        max-height: none;
        margin-bottom: 30px;
    }





/* TABLE DES MATIERES MOBILE PLIABLE */

#toc-container{
    position:relative;
    width:100%;
    margin-bottom:25px;
    max-height:none;
}

#toc-header{
    cursor:pointer;
}

#toc-list{
    display:none;
}

/* quand ouverte */
#toc-container.open #toc-list{
    display:block;
}

}
