
  /* ================================
   STYLE GLOBAL
   ================================ */
html {
  scroll-behavior: smooth;
}

.lien{
color:#1f4e79; 
        font-weight:600; 
        text-decoration:none; 
        padding-bottom:2px; 
        transition: all 0.2s ease;
        display: inline-block;color:'#1f4e79';
}

.lien:hover {
    color: #2c7be5;
}

#scrollPrevAnchor{
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  right: calc(20px + env(safe-area-inset-right));

  width: 52px;
  height: 52px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 26px;
  text-decoration: none;
  color: white;

  background: linear-gradient(145deg,#4a90e2,#1f4e79);
  border-radius: 50%;

  box-shadow: 
    0 8px 18px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.25);

  border: 2px solid rgba(255,255,255,0.25);

  cursor: pointer;
  z-index: 999;

  opacity: 0;
  transform: translateY(20px) scale(0.9);

  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

/* Hover desktop */
#scrollPrevAnchor:hover{
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 10px 22px rgba(0,0,0,0.35);
}

/* Click / touch */
#scrollPrevAnchor:active{
  transform: scale(0.92);
}

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

  #scrollPrevAnchor{
    width: 56px;
    height: 56px;
    font-size: 24px;

    bottom: calc(16px + env(safe-area-inset-bottom));
    right: calc(16px + env(safe-area-inset-right));

    box-shadow:
      0 6px 14px rgba(0,0,0,0.28);
  }

}

        body {
            font-family: "Segoe UI", Arial, sans-serif;
            margin: 0;
            background: #f5f7fb;
              /* Chemin de l'image */
  background-image: url('https://www.fredpeuriere.com/anims/fond.png');
  
  /* L'image couvre tout l'écran sans se déformer */
  background-size: cover;
  
  /* L'image ne se répète pas */
  background-repeat: no-repeat;
  
  /* Centre l'image */
  background-position: center;
  
  /* L'image reste fixe au défilement */
  background-attachment: fixed;
            line-height: 1.7;
            color: #333;
        }

header {
    background:
        radial-gradient(circle at 20% 20%, rgba(60, 130, 200, 0.25), transparent 40%),
        linear-gradient(135deg, #071525, #0d2942);

    color: white;
    padding: 45px 30px;
    text-align: center;

    border-bottom: 3px solid #f4c542;
}

        header h1 {
            margin: 0;
            font-size: 2.6em;
        }

        .container {
            max-width: 1100px;
            margin: auto;
            padding: 30px;
        }

        ul {
            list-style-position: inside;
            padding-left: 40px;
            margin-left: 0;
        }

        ul li {
            padding-left: 20px;
        }

       img {
    max-width: 90%;
    max-height: 200px;
    height: auto;
    margin: 1em 0;

    position: relative;
    z-index: 1;

    transition: transform 0.3s ease;
}

img:hover {
    transform: scale(2.08);
    z-index: 10;
}

        img.float-left {
            float: left;
            margin: 0 1em 1em 0;
        }

        img.float-right {
            float: right;
            margin: 0 0 1em 1em;
        }

        .chapitre {
            background: rgba(240,244,255,0.6);
            padding: 20px 25px;
            margin-bottom: 35px;
            border-radius: 12px;
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);

        }

        .chapitre h1 {
            color: #1f4e79;
            margin-top: 0;
            font-size: 1.8rem;
        }

        .section {
            background: rgba(255,255,255,0.8);
            padding: 30px;
            margin-bottom: 30px;
            border-radius: 10px;
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
        }

h2 {
    margin: 1.2rem 0 0.8rem auto;
    padding: 0.35rem 0.8rem;

    font-size: 1.25rem;
    font-weight: 600;

    color: #123b63;

    border-right: 5px solid #f4c542;
    border-left: 5px solid #f4c542;

    background: #eff4f8;

    border-radius: 0 6px 6px 0;
}

        

        .application {
            background: #fff6df;
            border-left: 6px solid #f0ad4e;
            padding: 15px;
            margin: 20px 0;
        }

        .exercice {
            background: #f5f7ff;
            border-left: 6px solid #4a6fdc;
            padding: 22px 26px;
            margin: 30px 0;
            border-radius: 8px;
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
            position: relative;
        }

        .question {
            margin-top: 15px;
            padding: 10px;
            background: #fafafa;
            border-radius: 5px;
            background-image:
                repeating-linear-gradient(0deg, transparent, transparent 23px, rgba(0, 0, 0, 0.04) 24px),
                repeating-linear-gradient(90deg, transparent, transparent 23px, rgba(0, 0, 0, 0.04) 24px);
        }

        ul {
            padding-left: 20px;
        }

.site-footer {
    margin-top: 4rem;
    padding: 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    border-top: 1px solid #eee;

    background: linear-gradient(to bottom, #fafafa, #f3f4f6);
}

.site-footer a {
    color: inherit;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

         /* EXEMPLE */
.exemple {
  background-color: #f5f7fa;
color: #334155;
border-left: 4px solid #94a3b8;

    padding: 12px 16px;
    margin: 1rem 0 1.5rem 0;

    border-radius: 0 6px 6px 0;

  

    font-size: 0.95rem;
    line-height: 1.6;

    clear: both;
}

.exemple::before {
   content: "Exemple";
    display: block;

    font-weight: 600;
    color: #1f3e7a;

    margin-bottom: 0.4rem;;
}

  /* CONCLUSION */

.conclusion {
background-color: #eef8f0;
color: #2d5a3d;
border-left: 4px solid #7ab97a;

    padding: 12px 16px;
    margin: 1rem 0 1.5rem 0;

    border-radius: 0 6px 6px 0;

  

    font-size: 0.95rem;
    line-height: 1.6;

    clear: both;
}

.conclusion::before {
    content: "Conclusion";
    display: block;

    font-weight: 600;
    color: #1f3e7a;

    margin-bottom: 0.4rem;
}

 /* DEFINITION< */

.definition {
 background-color: #f8fafc;
    color: #334155;
    border-left: 4px solid #64748b;

    padding: 12px 16px;
    margin: 1rem 0 1.5rem 0;

    border-radius: 0 6px 6px 0;

    font-size: 0.95rem;
    line-height: 1.6;

    clear: both;
}

.definition::before {
    content: "📘 Définition";
    display: block;

    font-weight: 600;
    color: #193172;

    margin-bottom: 0.4rem;
}


.formule {
    display: table;
    margin: 0.8rem auto;

    border: 1px solid #dbe4ee;
    border-radius: 3px;

    padding: 0.2rem 0.6rem;
}

        .consigne {
            background-color: #f6f1df;
            padding: 12px 16px;
            margin-bottom: 16px;
            border-radius: 6px;
            color: #1f3e7a;
            font-size: 0.95rem;
            line-height: 1.5;
            position: relative;
            clear: both;
        }

        .indice {
            background-color: #ebeef1;
            padding: 12px 16px;
            margin-bottom: 16px;
            border-radius: 6px;
            color: #1f3e7a;
            font-size: 0.95rem;
            line-height: 1.5;
            position: relative;
            clear: both;
        }

        .btn-container {
            text-align: center;
            margin: 30px 0;
        }

        .btn-container button {
            background-color: #4a6fdc;
            color: white;
            border: none;
            padding: 6px 18px;
            font-size: 1rem;
            font-weight: 600;
            border-radius: 6px;
            cursor: pointer;
            box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
            transition: all 0.2s ease-in-out;
        }

        .btn-container button:hover {
            background-color: #3b5acb;
            transform: translateY(-2px);
            box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
        }

        .btn-container button:active {
            transform: translateY(0);
            box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
        }








        /* TEXTE A TROUS */
        .choix {
            display: inline;
            padding: 1px 1px;
            margin: 1px 1px;
            font-weight: 700;
            cursor: pointer;
            user-select: none;
            transition: all 0.15s ease;
        }

        .choix:hover {
            background: #96d3c4;
            border-radius: 3px;
        }

        .choix::after {
            content: " -";
        }

        .choix::before {
            content: "";
        }

        .no-separator::before,
        .no-separator::after {
            content: none;
        }

        .selection {
            background: #abddeb;
            border-radius: 3px;
        }

        .correct {
            background: #9be79b;
        }

        .faux {
            background: #ffc98b;
        }

        .fade {
            opacity: 0;
            animation: fadeIn 1.6s forwards;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        /* QCM */
        .question-qcm .qcm-liste li {
            cursor: pointer;
            padding: 6px 10px;
            margin: 4px 0;
            border-radius: 4px;
            border: 1px solid #ccc;
            list-style: none;
            transition: all 0.2s ease;
            position: relative;
        }

        .question-qcm .qcm-liste li.selection {
            background: #abddeb;
        }

        .question-qcm .qcm-liste li.correct {
            background: #d4f2d4;
            border-color: green;
            color: #0a3d0a;
        }

        .question-qcm .qcm-liste li.faux {
            background: #ffd8c2;
            border-color: red;
            color: #6b1f00;
        }

        .question-qcm .qcm-liste li:hover {
            background: #96d3c4;
        }

        /* QCM VRAI/FAUX */
        .question-vf {
            margin: 14px 0;
            line-height: 1.7;
        }

        .choix-vf {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            margin-left: 12px;
            padding: 5px 12px;
            border: 1px solid #bbb;
            border-radius: 6px;
            background: #f8f8f8;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 0.95em;
        }

        .choix-vf::before {
            content: "☐";
            font-size: 0.95em;
        }

        .choix-vf:hover {
            background: #eef4ff;
            border-color: #6a9bd8;
        }

        .choix-vf.selection {
            background: #dcecff;
            border-color: #4a86c5;
            font-weight: 600;
        }

        .choix-vf.correct {
            background: #d4edda;
            border-color: #28a745;
        }

        .choix-vf.correct::before {
            content: "✔";
        }

        .choix-vf.faux {
            background: #ffe5e5;
            border-color: #d9534f;
        }

        .choix-vf.faux::before {
            content: "✖";
        }

        /* TOOLTIP FLOAT */
        .tooltip {
            position: relative;
            cursor: pointer;
            color: #4a6fdc;
            font-weight: 600;
            text-decoration: underline dotted;
            transition: color 0.2s ease, text-decoration 0.2s ease;
            z-index: 0;
        }

        .tooltip:hover,
        .tooltip:focus {
            color: #2f4fb3;
            text-decoration: underline;
        }

        .tooltip-float {
            position: fixed;
            top: 0;
            left: 0;
            background-color: #f5f7ff;
            color: #1f3e7a;
            border-radius: 10px;
            padding: 10px;
            max-width: 320px;
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
            pointer-events: none;
            opacity: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            z-index: 9999;
            transition: opacity 0.3s ease, transform 0.3s ease;
            transform: translate(0, 0);
        }

        .tooltip-float.show {
            opacity: 1;
        }

        .tooltip-float img {
            max-width: 280px;
            border-radius: 6px;
        }

        .tooltip-float p {
            margin: 0;
            font-size: 0.62rem;
            line-height: 1.4;
            text-align: center;
        }

        /* TOOLTIP TEXTE */
        .def {
            position: relative;
            cursor: help;
            border-bottom: 1px dotted #555;
            font-weight: 600;
        }

        .def::after {
            content: "📘";
            font-size: 0.8em;
            margin-left: 4px;
            opacity: 0.7;
        }

        .def::before {
            content: attr(data-def);
            position: absolute;
            left: 0;
            bottom: 130%;
            width: max-content;
            max-width: 260px;
            background: #fffff8;
            border: 1px solid #ccc;
            border-radius: 6px;
            padding: 8px 10px;
            font-size: 0.9em;
            line-height: 1.4;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
            opacity: 0;
            transform: translateY(5px);
            transition: 0.2s;
            pointer-events: none;
        }

        .def:hover::before,
        .def:active::before {
            opacity: 1;
            transform: translateY(0);
        }

        /* FAQ */
        .faq {
            border: 1px solid #ccc;
            border-radius: 8px;
            margin: 12px 0;
            padding: 8px 12px;
            background: #f5f7ff;
        }

        .faq-question {
            cursor: pointer;
            display: flex;
            align-items: flex-start;
            gap: 8px;
            font-weight: 500;
            transition: background 0.8s;
        }

        .faq-text {
            flex: 1;
        }

        .faq-question:hover {
            background: #e0ebff;
        }

        .faq-icon {
            font-size: 1.2em;
        }

        .faq-answer {
            max-height: 0;
            overflow: hidden;
            opacity: 0;
            transition: max-height 0.4s ease, opacity 0.4s ease;
            padding-left: 24px;
            line-height: 1.5;
            color: #1f3e7a;
            font-size: 0.95rem;
        }

        .faq-answer.show {
            max-height: 500px;
            opacity: 1;
        }

        /* HR */
        hr {
            border: none;
            border-top: 1px solid rgba(0, 0, 0, 0.15);
            margin: 25px 0;
        }

        /* ================================
   MOBILE RESPONSIVE
   ================================ */
        @media (max-width: 600px) {

            body {
                font-size: 1.05rem;
                line-height: 1.75;
            }

            header {
                padding: 25px 15px;
            }

            header h1 {
                font-size: 1.8em;
            }

            .container {
                padding: 15px;
            }

            .chapitre {
                padding: 15px;
                margin-bottom: 25px;
            }

            .section {
                padding: 10px 5px;
                margin-bottom: 20px;
                background: transparent;
                box-shadow: none;
            }

            img {
                max-width: 100%;
                height: auto;
            }

            img.float-left,
            img.float-right {
                float: none;
                display: block;
                margin: 1em auto;
            }

            /* TOOLTIP IMAGE */
            .tooltip-float.show {
                left: 50% !important;
                top: 50% !important;
                transform: translate(-50%, -50%);
                max-width: 90%;
                width: 300px;
            }

            /* TOOLTIP TEXTE MOBILE */
            .def::before {
                position: fixed;
                /* clé du correctif */

                left: 50%;
                bottom: auto;
                top: 65%;

                transform: translate(-50%, -50%);

                width: 260px;
                max-width: 90vw;

                white-space: normal;
                word-break: break-word;
                text-align: center;
            }

            .def.def-mobile-show::before {
                display: block;
                position: fixed;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                max-width: 85%;
                width: 280px;

                z-index: 9999;
                opacity: 1 !important;

                font-size: 0.95em;
                line-height: 1.4;

                background: #fffff8;
                border: 1px solid #ccc;
                border-radius: 6px;

                padding: 12px 15px;
                box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);

                box-sizing: border-box;
                white-space: normal;
                overflow-wrap: break-word;

                text-align: center;
            }
        }

        /* =====================================
   MENU RESPONSIVE
   ===================================== */

.main-nav{
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #1f4e79;
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
}

/* =========================
   NAVIGATION PRINCIPALE
   ========================= */

.main-nav {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: #0b2239;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
}

/* Menu principal */

.menu {
    margin: 0;
    padding: 0;

    list-style: none;
    display: flex;
    justify-content: center;
}

.menu > li {
    position: relative;
}

.menu > li > a {
    display: block;

    padding: 13px 20px;

    color: #ffffff;
    text-decoration: none;

    font-weight: 600;
    letter-spacing: 0.2px;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

/* Survol */

.menu > li:hover {
    background: #143b5c;
}

.menu > li:hover > a {
    color: #f4c542;
}


/* =========================
   SOUS-MENU
   ========================= */

.submenu {
    position: absolute;
    left: 0;
    top: 100%;

    min-width: 220px;

    background: #ffffff;

    list-style: none;
    padding: 6px 0;
    margin: 0;

    display: none;

    border-top: 3px solid #f4c542;
    border-radius: 0 0 6px 6px;

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.submenu li a {
    display: block;

    padding: 11px 16px;

    text-decoration: none;
    color: #18324a;

    font-weight: 500;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        padding-left 0.2s ease;
}

.submenu li a:hover {
    background: #eef6ff;
    color: #145da0;
    padding-left: 21px;
}


/* Affichage du sous-menu */

.menu > li:hover .submenu {
    display: block;
}


/* =========================
   BOUTON MOBILE
   ========================= */

.menu-toggle {
    display: none;

    width: 100%;

    border: none;

    background: #0b2239;
    color: white;

    padding: 15px;

    font-size: 1.1rem;
    font-weight: 600;

    cursor: pointer;
}
@media (max-width:768px){

    .menu-toggle{
        display:block;
    }

    .menu{
        display:none;
        flex-direction:column;
    }

    .menu.open{
        display:flex;
    }

    .menu > li{
        width:100%;
    }

    .submenu{
        position:static;
        display:block;
        box-shadow:none;
        background:#285d90;
    }

    .submenu li a{
        color:white;
        padding-left:35px;
    }
}