/*
Theme Name: RothFormation
Theme URI: https://rothformation.ch
Author: RothFormation
Description: Interface publique officielle de la plateforme RothFormation.
Version: 0.8.4
Text Domain: rothformation
*/


@font-face {
    font-family: "Exo 2";
    src: url("assets/fonts/exo2/Exo2-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}


@font-face {
    font-family: "Exo 2";
    src: url("assets/fonts/exo2/Exo2-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}


@font-face {
    font-family: "Exo 2";
    src: url("assets/fonts/exo2/Exo2-SemiBoldItalic.woff2") format("woff2");
    font-weight: 600;
    font-style: italic;
    font-display: swap;
}


:root {
    --rf-anthracite: #1E1E1E;
    --rf-red: #E10600;
    --rf-steel: #6B7280;

    --rf-white: #FFFFFF;
    --rf-background: #F5F6F7;
    --rf-border: #E1E4E8;

    --rf-radius: 12px;
    --rf-content-width: 1180px;
}


/*
 * Page publique de recherche.
 */

body.rothformation-search-page,
body.rothformation-document-page,
body.rothformation-profile-page {
    margin: 0;
    background: var(--rf-background);
    color: var(--rf-anthracite);
    font-family:
        "Exo 2",
        Arial,
        Helvetica,
        sans-serif;
}


.rf-search {
    width: min(
        calc(100% - 40px),
        var(--rf-content-width)
    );
    margin: 0 auto;
    padding: 96px 0;
}


.rf-search__brand {
    display: flex;
    justify-content: center;
    margin: 0 auto 56px;
}


.rf-search__brand img {
    display: block;
    width: min(100%, 420px);
    height: auto;
}


.rf-search__intro {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}


.rf-search__intro h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 600;
    font-style: italic;
    line-height: 1;
    letter-spacing: -0.035em;
}


.rf-search__intro h1::after {
    display: block;
    width: 72px;
    height: 5px;
    margin: 24px auto 0;
    background: var(--rf-red);
    content: "";
}


.rf-search__intro p {
    max-width: 650px;
    margin: 28px auto 0;
    color: var(--rf-steel);
    font-size: 1.125rem;
    line-height: 1.6;
}


.rf-search__form,
.rf-password-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-top: 48px;
}


.rf-search__form label,
.rf-password-form label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


.rf-search__form input,
.rf-password-form input {
    min-width: 0;
    min-height: 58px;
    box-sizing: border-box;
    padding: 0 20px;
    border: 1px solid var(--rf-border);
    border-radius: var(--rf-radius);
    outline: none;
    background: var(--rf-white);
    color: var(--rf-anthracite);
    font: inherit;
    font-size: 1rem;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease;
}


.rf-search__form input::placeholder {
    color: var(--rf-steel);
}


.rf-search__form input:focus,
.rf-password-form input:focus {
    border-color: var(--rf-red);
    box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.12);
}


.rf-search__form button,
.rf-password-form button {
    min-height: 58px;
    padding: 0 28px;
    border: 0;
    border-radius: var(--rf-radius);
    background: var(--rf-red);
    color: var(--rf-white);
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    transition:
        transform 160ms ease,
        background 160ms ease;
}


.rf-search__form button:hover,
.rf-password-form button:hover {
    background: #C90500;
}


.rf-search__form button:focus-visible,
.rf-password-form button:focus-visible {
    outline: 3px solid rgba(225, 6, 0, 0.25);
    outline-offset: 3px;
}


.rf-search__form button:active,
.rf-password-form button:active {
    transform: translateY(1px);
}


.rf-search__results {
    margin-top: 64px;
}


.rf-password-form {
    max-width: 650px;
    margin-right: auto;
    margin-left: auto;
}


@media (max-width: 640px) {
    .rf-search {
        width: min(
            calc(100% - 28px),
            var(--rf-content-width)
        );
        padding: 64px 0;
    }


    .rf-search__form,
    .rf-password-form {
        grid-template-columns: 1fr;
        margin-top: 36px;
    }


    .rf-search__form button,
    .rf-password-form button {
        width: 100%;
    }


    .rf-search__results {
        margin-top: 48px;
    }
}


/* Résultats de recherche. */

.rf-search__results-header {
    margin-bottom: 20px;
}


.rf-search__results-header p {
    margin: 0;
    color: var(--rf-steel);
    font-size: 0.95rem;
}


.rf-search__results-header strong {
    color: var(--rf-anthracite);
    font-weight: 600;
}


.rf-search__message {
    margin: 0;
    padding: 20px 22px;
    border: 1px solid var(--rf-border);
    border-radius: var(--rf-radius);
    background: var(--rf-white);
    color: var(--rf-steel);
    line-height: 1.5;
}


.rf-search__list {
    display: grid;
    gap: 12px;
}


.rf-search-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-sizing: border-box;
    min-height: 82px;
    padding: 20px 22px;
    border: 1px solid var(--rf-border);
    border-radius: var(--rf-radius);
    background: var(--rf-white);
}


.rf-search-result__title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: var(--rf-anthracite);
    font-size: 1.05rem;
    font-weight: 600;
    font-style: italic;
    line-height: 1.4;
    overflow-wrap: anywhere;
}


.rf-search-result__title a {
    color: inherit;
    text-decoration: none;
}


.rf-search-result__title a:hover {
    color: var(--rf-red);
}


.rf-search-result__title a:focus-visible {
    outline: 3px solid rgba(225, 6, 0, 0.18);
    outline-offset: 3px;
}


.rf-search-result__language {
    flex: 0 0 auto;
    min-width: 38px;
    box-sizing: border-box;
    padding: 6px 9px;
    border: 1px solid var(--rf-red);
    border-radius: 999px;
    color: var(--rf-red);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
}



.rf-search-result__consult {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--rf-anthracite);
    color: var(--rf-white);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}


.rf-search-result__consult:hover {
    background: var(--rf-red);
}


.rf-search-result__consult:focus-visible {
    outline: 3px solid rgba(225, 6, 0, 0.18);
    outline-offset: 3px;
}


.rf-search__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 36px;
    color: var(--rf-steel);
    font-size: 0.9rem;
}


.rf-search__pagination a {
    padding: 10px 14px;
    border: 1px solid var(--rf-border);
    border-radius: 8px;
    background: var(--rf-white);
    color: var(--rf-anthracite);
    font-weight: 600;
    text-decoration: none;
}


.rf-search__pagination a:hover {
    border-color: var(--rf-red);
    color: var(--rf-red);
}


.rf-search__pagination a:focus-visible {
    outline: 3px solid rgba(225, 6, 0, 0.18);
    outline-offset: 2px;
}


@media (max-width: 640px) {
    .rf-search-result {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 14px;
        padding: 18px;
    }


    .rf-search-result__title {
        flex: 1 1 calc(100% - 60px);
    }


    .rf-search-result__consult {
        flex: 1 0 100%;
        box-sizing: border-box;
        text-align: center;
    }


    .rf-search__pagination {
        flex-wrap: wrap;
        gap: 12px;
    }
}



/*
 * Consultation documentaire publique.
 */

.rf-document {
    width: min(
        calc(100% - 40px),
        var(--rf-content-width)
    );
    margin: 0 auto;
    padding: 56px 0 72px;
}


.rf-document__brand {
    display: flex;
    justify-content: center;
    margin: 0 auto 40px;
}


.rf-document__brand img {
    display: block;
    width: min(100%, 320px);
    height: auto;
}


.rf-document__header {
    box-sizing: border-box;
    margin-bottom: 24px;
    padding: 24px 26px;
    border: 1px solid var(--rf-border);
    border-radius: var(--rf-radius);
    background: var(--rf-white);
}


.rf-document__header h1 {
    margin: 14px 0 8px;
    color: var(--rf-anthracite);
    font-size: clamp(1.6rem, 4vw, 2.25rem);
    font-weight: 600;
    font-style: italic;
    line-height: 1.15;
}


.rf-document__header p {
    margin: 0;
    color: var(--rf-steel);
    line-height: 1.5;
}


.rf-document__header strong {
    color: var(--rf-red);
    font-weight: 600;
}


.rf-document__back {
    color: var(--rf-steel);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}


.rf-document__back:hover {
    color: var(--rf-red);
}


.rf-document__back:focus-visible {
    outline: 3px solid rgba(225, 6, 0, 0.18);
    outline-offset: 3px;
}


.rf-document__message {
    padding: 22px 24px;
    border: 1px solid var(--rf-border);
    border-radius: var(--rf-radius);
    background: var(--rf-white);
    color: var(--rf-steel);
}


.rf-document__message p {
    margin: 0;
}


.rf-document__viewer {
    overflow: hidden;
    border: 1px solid var(--rf-border);
    border-radius: var(--rf-radius);
    background: var(--rf-white);
}


.rf-document__frame {
    display: block;
    width: 100%;
    height: clamp(600px, 75vh, 920px);
    border: 0;
    background: var(--rf-white);
}


.rf-document__external {
    margin: 18px 0 0;
    text-align: right;
}


.rf-document__external a {
    display: inline-block;
    padding: 10px 14px;
    border: 1px solid var(--rf-border);
    border-radius: 8px;
    background: var(--rf-white);
    color: var(--rf-anthracite);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}


.rf-document__external a:hover {
    border-color: var(--rf-red);
    color: var(--rf-red);
}


.rf-document__external a:focus-visible {
    outline: 3px solid rgba(225, 6, 0, 0.18);
    outline-offset: 3px;
}


@media (max-width: 640px) {
    .rf-document {
        width: min(
            calc(100% - 28px),
            var(--rf-content-width)
        );
        padding: 40px 0 56px;
    }


    .rf-document__brand {
        margin-bottom: 32px;
    }


    .rf-document__header {
        padding: 20px;
    }


    .rf-document__frame {
        height: 70vh;
        min-height: 480px;
    }


    .rf-document__external a {
        display: block;
        text-align: center;
    }
}


/*
 * Profil et authentification RothFormation.
 */

.rf-profile {
    width: min(
        calc(100% - 40px),
        760px
    );
    margin: 0 auto;
    padding: 72px 0;
}


.rf-profile__brand {
    display: flex;
    justify-content: center;
    margin: 0 auto 40px;
}


.rf-profile__brand img {
    display: block;
    width: min(100%, 360px);
    height: auto;
}


.rf-profile__panel,
.rf-profile__fallback {
    box-sizing: border-box;
    padding: 32px;
    border: 1px solid var(--rf-border);
    border-radius: var(--rf-radius);
    background: var(--rf-white);
}


.rf-profile__fallback {
    margin-top: 20px;
}


.rf-profile__panel h1,
.rf-profile__fallback h2 {
    color: var(--rf-anthracite);
    font-weight: 600;
    font-style: italic;
    line-height: 1.15;
}


.rf-profile__panel h1 {
    margin: 0 0 20px;
    font-size: clamp(2rem, 5vw, 3rem);
}


.rf-profile__fallback h2 {
    margin: 0 0 12px;
    font-size: 1.35rem;
}


.rf-profile__panel p,
.rf-profile__fallback p {
    margin: 0;
    color: var(--rf-steel);
    line-height: 1.6;
}


.rf-profile__panel p + p,
.rf-profile__fallback p + p {
    margin-top: 14px;
}


.rf-profile__form {
    display: grid;
    gap: 10px;
    margin-top: 28px;
}


.rf-profile__form label {
    color: var(--rf-anthracite);
    font-size: 0.9rem;
    font-weight: 600;
}


.rf-profile__form input {
    width: 100%;
    min-height: 54px;
    box-sizing: border-box;
    margin-bottom: 8px;
    padding: 0 16px;
    border: 1px solid var(--rf-border);
    border-radius: var(--rf-radius);
    outline: none;
    background: var(--rf-white);
    color: var(--rf-anthracite);
    font: inherit;
    font-size: 1rem;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease;
}


.rf-profile__form input:focus {
    border-color: var(--rf-red);
    box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.12);
}


.rf-profile__form button {
    min-height: 54px;
    margin-top: 8px;
    padding: 0 24px;
    border: 0;
    border-radius: var(--rf-radius);
    background: var(--rf-red);
    color: var(--rf-white);
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    transition:
        transform 160ms ease,
        background 160ms ease;
}


.rf-profile__form button:hover {
    background: #C90500;
}


.rf-profile__form button:focus-visible {
    outline: 3px solid rgba(225, 6, 0, 0.25);
    outline-offset: 3px;
}


.rf-profile__form button:active {
    transform: translateY(1px);
}


.rf-profile__message {
    margin-top: 20px !important;
    padding: 14px 16px;
    border-radius: 8px;
}


.rf-profile__message--error {
    border: 1px solid rgba(225, 6, 0, 0.28);
    background: rgba(225, 6, 0, 0.06);
    color: var(--rf-anthracite) !important;
}


.rf-profile__secondary-action {
    margin-top: 20px !important;
}


.rf-profile__secondary-action a,
.rf-profile__secondary-link {
    color: var(--rf-steel);
    font-weight: 600;
    text-decoration: none;
}


.rf-profile__secondary-action a:hover,
.rf-profile__secondary-link:hover {
    color: var(--rf-red);
}


.rf-profile__secondary-action a:focus-visible,
.rf-profile__secondary-link:focus-visible {
    outline: 3px solid rgba(225, 6, 0, 0.18);
    outline-offset: 3px;
}


.rf-profile__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 28px;
}


.rf-profile__primary-link {
    display: inline-block;
    padding: 14px 20px;
    border-radius: var(--rf-radius);
    background: var(--rf-red);
    color: var(--rf-white);
    font-weight: 600;
    text-decoration: none;
}


.rf-profile__primary-link:hover {
    background: #C90500;
}


.rf-profile__primary-link:focus-visible {
    outline: 3px solid rgba(225, 6, 0, 0.25);
    outline-offset: 3px;
}


.rf-profile__fallback .rf-password-form {
    margin-top: 24px;
}


@media (max-width: 640px) {
    .rf-profile {
        width: min(
            calc(100% - 28px),
            760px
        );
        padding: 48px 0;
    }


    .rf-profile__brand {
        margin-bottom: 32px;
    }


    .rf-profile__panel,
    .rf-profile__fallback {
        padding: 22px;
    }


    .rf-profile__actions {
        align-items: stretch;
        flex-direction: column;
    }


    .rf-profile__primary-link,
    .rf-profile__secondary-link {
        box-sizing: border-box;
        width: 100%;
        text-align: center;
    }
}


/*
 * Écrans natifs WordPress de connexion et récupération.
 *
 * La mécanique d'authentification reste entièrement WordPress ;
 * seule la présentation reprend l'identité RothFormation.
 */

body.login {
    background: var(--rf-background);
    color: var(--rf-anthracite);
    font-family:
        "Exo 2",
        Arial,
        Helvetica,
        sans-serif;
}


body.login #login {
    width: min(
        calc(100% - 40px),
        420px
    );
    box-sizing: border-box;
    padding: 64px 0;
}


body.login h1 a {
    width: 100%;
    height: 110px;
    margin: 0 auto 32px;
    background-image:
        url("assets/images/logo-rothformation-horizontal.png");
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}


body.login form {
    padding: 28px;
    border: 1px solid var(--rf-border);
    border-radius: var(--rf-radius);
    background: var(--rf-white);
    box-shadow: none;
}


body.login form .input,
body.login input[type="text"],
body.login input[type="password"],
body.login input[type="email"] {
    min-height: 50px;
    box-sizing: border-box;
    border: 1px solid var(--rf-border);
    border-radius: var(--rf-radius);
    background: var(--rf-white);
    color: var(--rf-anthracite);
    font-family: inherit;
    font-size: 1rem;
}


body.login form .input:focus,
body.login input[type="text"]:focus,
body.login input[type="password"]:focus,
body.login input[type="email"]:focus {
    border-color: var(--rf-red);
    box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.12);
}


body.login label {
    color: var(--rf-anthracite);
    font-family: inherit;
}


body.login .button-primary {
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    background: var(--rf-red);
    color: var(--rf-white);
    font-family: inherit;
    font-weight: 600;
    text-shadow: none;
    box-shadow: none;
}


body.login .button-primary:hover,
body.login .button-primary:focus {
    background: #C90500;
    color: var(--rf-white);
}


body.login .button-primary:focus {
    box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.22);
}


body.login #nav,
body.login #backtoblog,
body.login .privacy-policy-page-link {
    color: var(--rf-steel);
    font-family: inherit;
}


body.login #nav a,
body.login #backtoblog a,
body.login .privacy-policy-page-link a {
    color: var(--rf-steel);
}


body.login #nav a:hover,
body.login #backtoblog a:hover,
body.login .privacy-policy-page-link a:hover {
    color: var(--rf-red);
}


body.login .message,
body.login .notice,
body.login #login_error {
    border-left-color: var(--rf-red);
    border-radius: 6px;
    font-family: inherit;
}


@media (max-width: 640px) {
    body.login #login {
        width: min(
            calc(100% - 28px),
            420px
        );
        padding: 40px 0;
    }


    body.login h1 a {
        height: 92px;
        margin-bottom: 24px;
    }


    body.login form {
        padding: 22px;
    }
}
