/* ==========================================================
   lienspedagogiques.css
   Version robuste : priorité absolue sur tous les styles
========================================================== */

/* ==========================================================
   CONTEXTE ÉCOLOGIQUE
========================================================== */
section.contexte-ecologique{
    margin: 32px 0 !important;
    padding: 28px !important;
    background: linear-gradient(180deg, rgba(231,243,242,0.90), #ffffff) !important;
    border: 1px solid rgba(79,127,134,0.12) !important;
    border-radius: 22px !important;
    box-shadow: 0 20px 50px rgba(31,72,79,0.12) !important;
}

section.contexte-ecologique h3{
    margin: 0 0 10px !important;
    font-size: 1.35rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: #1f4850 !important;
}

section.contexte-ecologique > p{
    margin: 0 0 22px !important;
    font-size: 1rem !important;
    line-height: 1.7 !important;
    color: #4b5563 !important;
}

/* ==========================================================
   BOUTONS
========================================================== */
.eco-links{
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
}

button.eco-btn{
    appearance: none !important;
    -webkit-appearance: none !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 12px 18px !important;
    margin: 0 !important;

    border: none !important;
    border-radius: 999px !important;

    cursor: pointer !important;

    font-family: inherit !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;

    color: #ffffff !important;
    background: linear-gradient(135deg, #1f4850, #6fa5ad) !important;

    box-shadow:
        0 8px 20px rgba(79,127,134,0.18),
        0 2px 6px rgba(79,127,134,0.12) !important;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease !important;
}

button.eco-btn:hover{
    color: #ffffff !important;
    background: linear-gradient(135deg, #1f4850, #6fa5ad) !important;
    transform: translateY(-2px) !important;
    filter: brightness(1.05) !important;
}

button.eco-btn:focus,
button.eco-btn:focus-visible{
    outline: 3px solid rgba(79,127,134,0.25) !important;
    outline-offset: 3px !important;
}

/* ==========================================================
   OVERLAY : INVISIBLE TANT QUE .open N'EST PAS AJOUTÉ
========================================================== */
div#ecoOverlay.eco-overlay{
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important;

    display: none !important;          /* totalement masqué */
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;

    align-items: center !important;
    justify-content: center !important;

    padding: 20px !important;

    background: rgba(0,0,0,0.55) !important;
    backdrop-filter: blur(6px) !important;
}

/* Visible uniquement lorsqu'on ajoute .open */
div#ecoOverlay.eco-overlay.open{
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* ==========================================================
   FENÊTRE
========================================================== */
div#ecoOverlay .eco-frame-wrap{
    position: relative !important;

    width: min(1200px, 100%) !important;
    height: min(90vh, 900px) !important;

    background: #ffffff !important;
    border-radius: 20px !important;
    overflow: hidden !important;

    box-shadow: 0 30px 80px rgba(0,0,0,0.35) !important;
}

/* Iframe */
iframe#ecoFrame.eco-frame{
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    background: #ffffff !important;
}

/* ==========================================================
   BOUTON FERMER
========================================================== */
button#ecoClose.eco-close{
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    z-index: 100 !important;

    width: 44px !important;
    height: 44px !important;

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

    border: none !important;
    border-radius: 50% !important;

    cursor: pointer !important;

    font-family: Arial, sans-serif !important;
    font-size: 30px !important;
    font-weight: 400 !important;
    line-height: 1 !important;

    color: #111827 !important;
    background: rgba(255,255,255,0.96) !important;

    box-shadow: 0 8px 20px rgba(0,0,0,0.20) !important;
}

button#ecoClose.eco-close:hover{
    background: #ffffff !important;
}

/* Empêche le scroll lorsque l’overlay est ouvert */
body.eco-open{
    overflow: hidden !important;
}

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

    section.contexte-ecologique{
        margin: 24px 0 !important;
        padding: 22px !important;
    }

    section.contexte-ecologique h3{
        font-size: 1.2rem !important;
    }

    section.contexte-ecologique > p{
        margin-bottom: 18px !important;
        font-size: 0.95rem !important;
    }

    .eco-links{
        gap: 10px !important;
    }

    button.eco-btn{
        padding: 10px 15px !important;
        font-size: 0.9rem !important;
        white-space: normal !important;
    }

    div#ecoOverlay.eco-overlay{
        padding: 10px !important;
    }

    div#ecoOverlay .eco-frame-wrap{
        width: 100% !important;
        height: 92vh !important;
        border-radius: 16px !important;
    }

    button#ecoClose.eco-close{
        top: 10px !important;
        right: 10px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 28px !important;
    }
}
/* ==========================================================
   NUMÉROTATION DANS DES CERCLES
   À ajouter à la fin de lienspedagogiques.css
========================================================== */

/* Structure interne des boutons numérotés */
button.eco-btn{
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Cercle numéroté */
.eco-num{
    flex: 0 0 28px !important;
    width: 28px !important;
    height: 28px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-radius: 50% !important;

    background: rgba(255,255,255,0.22) !important;
    border: 2px solid rgba(255,255,255,0.35) !important;

    color: #ffffff !important;
    font-size: 0.90rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;

    box-shadow:
        inset 0 1px 2px rgba(255,255,255,0.20),
        0 2px 6px rgba(0,0,0,0.15) !important;
}

/* Texte du bouton */
.eco-label{
    display: inline-block !important;
}

/* Variante mobile */
@media (max-width: 768px){
    .eco-num{
        width: 26px !important;
        height: 26px !important;
        flex-basis: 26px !important;
        font-size: 0.85rem !important;
    }
}/* ==========================================================
   NUMÉROTATION DANS LE TEXTE
   À ajouter à la fin de lienspedagogiques.css
========================================================== */

.eco-text-step{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 14px;
    margin-bottom: 8px;
}

.contexte-ecologique > p .eco-num{
    flex: 0 0 28px !important;
    width: 28px !important;
    height: 28px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-radius: 50% !important;

    background: linear-gradient(135deg, #1f4850, #6fa5ad) !important;
    color: #ffffff !important;

    font-size: 0.90rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;

    box-shadow:
        0 4px 10px rgba(79,127,134,0.20) !important;
}

@media (max-width: 768px){
    .eco-text-step{
        display: flex;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .contexte-ecologique > p .eco-num{
        width: 26px !important;
        height: 26px !important;
        flex-basis: 26px !important;
        font-size: 0.85rem !important;
    }
}