/* ========================================
   BASE GÉNÉRALE
   ======================================== */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--theme-text);
    background-color: var(--bs-body-bg);
}


/* ========================================
   LIENS
   ======================================== */

a {
    color: inherit;
    text-decoration: underline dotted;
}

a:hover {
    color: darkgrey;
    text-decoration: underline dotted;
}


/* ========================================
   IMAGES
   ======================================== */

.entry-content img {
    max-width: 500px !important;
    max-height: 500px !important;
    object-fit: cover !important;
}


/* ========================================
   TYPOGRAPHIE - TITRES
   ======================================== */

/* H1 - Titre principal de la page */
.entry-title {
    color: var(--theme-primary);
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 25px;
    line-height: 1.2;
}

/* H2 - Sections principales dans le contenu */
.entry-content h2 {
    color: var(--theme-primary);
    font-size: 28px;
    font-weight: 500;
    margin-top: 40px;
    margin-bottom: 20px;
    line-height: 1.3;
    padding-bottom: 10px;
}

/* H3 - Sous-sections */
.entry-content h3 {
    color: var(--theme-primary);
    font-size: 22px;
    font-weight: 500;
    margin-top: 30px;
    margin-bottom: 15px;
    line-height: 1.3;
}

/* H4 - Sous-sous-sections */
.entry-content h4 {
    color: var(--theme-primary);
    font-size: 18px;
    font-weight: 400;
    margin-top: 25px;
    margin-bottom: 12px;
}


/* ========================================
   PREVELEC - PAGE D'ACCUEIL
   ======================================== */

/* Accroche principale */
.entry-content .prevelec-intro-title {
    color: var(--bs-primary);
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.3;
}

/* Titres des trois cartes */
.entry-content .prevelec-card-title {
    color: var(--bs-primary);
    font-weight: 500;
}


/* ========================================
   PREVELEC - SECTIONS DE CONTENU
   ======================================== */

.prevelec-content-section {
    margin: 0 !important;
    padding: 1.5rem 0 0 0 !important;
}

.prevelec-content-section
> .wp-block-group__inner-container {
    margin: 0 !important;
    padding: 0 !important;
    row-gap: 0 !important;
}

.prevelec-content-section
> .wp-block-group__inner-container
> * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.prevelec-content-section
> .wp-block-group__inner-container
> .h5 {
    color: var(--bs-primary);
    font-weight: 500;
}

.prevelec-content-section
> .wp-block-group__inner-container
> .h5 + * {
    margin-top: 0.75rem !important;
}


/* ========================================
   PREVELEC - LISTES DE LIENS
   ======================================== */

ul.prevelec-link-list {
    list-style: none;
    margin: 0.75rem 0 0 !important;
    padding-left: 0 !important;
}

ul.prevelec-link-list li {
    margin: 0;
    padding: 0;
}

ul.prevelec-link-list li::before {
    content: "–";
    display: inline-block;
    margin-right: 0.4rem;
}

ul.prevelec-link-list .prevelec-arrow-link {
    margin-top: 0;
}


/* ========================================
   PREVELEC - LIEN DU NOM DU SITE
   ======================================== */

/* PrevElec' dans le Hero : lien discret vers l'accueil */
.site-name-link,
.site-name-link:visited,
.site-name-link:hover,
.site-name-link:focus,
.site-name-link:active {
    color: inherit;
    text-decoration: none;
}

.site-name-link {
    cursor: pointer;
}


/* ========================================
   PREVELEC - LIENS AVEC FLÈCHE
   ======================================== */

 .prevelec-arrow-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;

    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;

    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.prevelec-arrow-link::after {
    content: "";
    display: inline-block;

    width: 1em;
    height: 1em;
    flex: 0 0 1em;

    background-color: currentColor;

    -webkit-mask:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M15 2a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1zM0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2zm5.854 8.803a.5.5 0 1 1-.708-.707L9.243 6H6.475a.5.5 0 1 1 0-1h3.975a.5.5 0 0 1 .5.5v3.975a.5.5 0 1 1-1 0V6.707z'/%3E%3C/svg%3E")
        center / contain no-repeat;

    mask:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M15 2a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1zM0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2zm5.854 8.803a.5.5 0 1 1-.708-.707L9.243 6H6.475a.5.5 0 1 1 0-1h3.975a.5.5 0 0 1 .5.5v3.975a.5.5 0 1 1-1 0V6.707z'/%3E%3C/svg%3E")
        center / contain no-repeat;

 
}



ul.prevelec-link-list .prevelec-arrow-link {
    margin-top: 0;
}



/* ========================================
   PREVELEC - SCHÉMAS DE PROCESSUS
   ======================================== */

.prevelec-process {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    margin: 2rem 0;
}


/* ========================================
   CARTES DES SCHÉMAS
   ======================================== */

.prevelec-process-step {
    flex: 1 1 0;
    box-sizing: border-box;
    padding: 1rem;
    border: 1px solid var(--bs-primary);
    background-color: var(--prevelec-blue-light);
    color: var(--bs-primary);
}

/* Titre des cartes */
.entry-content .prevelec-process .prevelec-process-step h3 {
    margin: 0 0 0.5rem !important;
    padding: 0 !important;
    color: var(--bs-primary) !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
}

/* Texte des cartes */
.entry-content .prevelec-process .prevelec-process-step p {
    margin: 0 !important;
    padding: 0;
    color: var(--bs-primary);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.4;
}


/* ========================================
   DERNIÈRE ÉTAPE DU SCHÉMA
   ======================================== */

.prevelec-process .prevelec-process-step-final {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: var(--bs-secondary);
}

/* Titre jaune de la dernière carte */
.entry-content
.prevelec-process
.prevelec-process-step-final
h3 {
    color: var(--bs-secondary) !important;
    font-weight: 500 !important;
}

/* Texte jaune de la dernière carte */
.entry-content
.prevelec-process
.prevelec-process-step-final
p {
    color: var(--bs-secondary) !important;
}


/* ========================================
   FLÈCHES DES SCHÉMAS
   ======================================== */

.prevelec-process-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--bs-primary);
    font-size: 1.4rem;
    font-weight: 500;
}


/* ========================================
   PREVELEC - SITUATIONS PROFESSIONNELLES
   ======================================== */

.prevelec-situation-section {
    margin: 0;
}

.prevelec-situation-title {
    display: block;
    margin: 0 0 0.5rem;
}

.prevelec-situation-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
    gap: 2rem;
    align-items: start;
}

.prevelec-situation-visual {
    height: 360px;
    overflow: hidden;
}

.entry-content .prevelec-situation-visual img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
}

.prevelec-situation-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.prevelec-situation-content p {
    margin-top: 0;
    margin-bottom: 1rem;
}

.prevelec-situation-content p:last-child {
    margin-bottom: 0;
}

.prevelec-situation-key {
    padding-left: 1rem;
    border-left: 3px solid var(--bs-secondary);
    font-weight: 500;
}


/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {

    /* Schémas de processus */

    .prevelec-process {
        flex-direction: column;
        gap: 0.5rem;
        margin: 1.5rem 0;
    }

    .prevelec-process-arrow {
        height: 1rem;
        transform: rotate(90deg);
    }

    .prevelec-process-step {
        width: 100%;
    }


    /* Situation professionnelle */

    .prevelec-situation-layout {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .prevelec-situation-visual {
        height: 200px;
        min-height: 0;
    }
}