/* Toits etc — Reset, focus, polices, espacements, règles générales, masques, liens.
   Feuille issue de user.scss (sortie du SCSS, 2026-11-30).
   CSS natif, hors @layer : il doit l'emporter sur Cassiopeia à spécificité égale, comme user.css.
   Ordre de chargement significatif : voir templates/index.php. */

/************************************************RESET**********************************************/

/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

*,
*:before,
*:after {
    box-sizing: border-box;
}

html,
body,
div,
span,
object,
iframe,
figure,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
code,
em,
img,
small,
strike,
strong,
sub,
sup,
tt,
b,
u,
i,
.site ol,
.site ul,
.site li,
fieldset,
form,
label,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
main,
canvas,
embed,
footer,
header,
nav,
section,
video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    text-size-adjust: none;
}



footer,
header,
nav,
section,
main {
    display: block;
}

body {
    line-height: 1;
}



.site ol,
.site ul {
    list-style: none;
    padding-left: 0;
}



blockquote,
q {
    quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
    content: "";
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

input {
    -webkit-appearance: none;
    border-radius: 0;
}

/* tailles polices */
html {
    font-size: 62.5%;
}

/********************************************* FIN RESET *************************************************/









/********************************************** FOCUS ***************************/
.site,
.front {

    /* annule le focus par defaut */
    *:focus {
        /* border-color: unset !important; */
        box-shadow: unset !important;
        color: var(--couleur-blanc) !important;
    }

    .form-control:focus {
        border-color: var(--couleur-violet);
    }

    & input:focus,
    & select:focus {
        outline: var(--border-focus) !important;
    }

    /* applique le nouveau focus */
    *:focus-visible {
        outline: var(--border-focus) !important;
        outline-offset: 4px;
    }

    .btn-secondary:focus,
    .btn-secondary:focus-visible,
    .container-header .coordonnees-container>.module-coordonnees>.btn-telephone:focus,
    .container-header .coordonnees-container>.module-coordonnees>.btn-telephone:focus-visible {
        color: var(--couleur-violet) !important;
    }

    .btn:focus-visible {
        background-color: var(--couleur-violet);
        color: var(--couleur-blanc);

        &.btn-bleu {
            background-color: var(--couleur-bleu);
        }

        &.btn-rouge, .footer .reseaux & {
            background-color: var(--couleur-rouge);
        }
    }

    .header {

        *:focus,
        *:focus-visible {
            color: var(--couleur-violet) !important;
            outline-color: var(--couleur-violet) !important;
        }

        .navbar-toggler:focus {
            color: var(--couleur-violet) !important;
        }
    }

    .site-grid .grid-child:first-child {

        *:focus,
        *:focus-visible {
            color: var(--couleur-noir) !important;
            outline-color: var(--couleur-violet) !important;
        }

        .btn:focus {
            color: var(--couleur-blanc) !important;
        }

        .navbar-toggler:focus {
            color: var(--couleur-violet) !important;
        }
    }
}

/********************************************** FIN FOCUS ***************************/










/********************************************** POLICES ***************************/
@font-face {
    font-family: "Liberation Sans";
    font-optical-sizing: auto;
    src: url("../fonts/Liberation Sans.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "titres";
    font-optical-sizing: auto;
    src: url("../fonts/alpha_echo-webfont.woff") format("woff");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

h1,
h1>a:not([class]),
h2,
h2>a:not([class]),
h3,
h3>a:not([class]) {
    text-decoration: none;
    font-family: "titres";
    /* color: $couleur-violet; */
}

h1,
h2,
h3,
h4 {
    text-wrap: balance;
}

h1 {
    font-size: var(--fontsize-xlarge);
    line-height: var(--lineheight-xlarge);
    text-wrap: balance;
    text-align: center;
    color: var(--couleur-violet);

    @media screen and (min-width: 992px) {
        font-size: var(--fontsize-xxlarge);
        line-height: var(--lineheight-xxlarge);
        text-align: left;
    }
}

/* Bloc scindé en 2 (mêmes règles) : en CSS natif, & vaut :is(liste) et prendrait la spécificité la plus forte de la liste. */
h2 {
    font-size: var(--fontsize-large);
    line-height: var(--lineheight-large);
    text-align: left;
    color: var(--couleur-rouge);
    background-position-y: 25px;

    &:hover {
        background-position-y: 22px;
        color: var(--couleur-rouge);
    }

    @media screen and (min-width: 992px) {
        font-size: var(--fontsize-xlarge);
        line-height: var(--lineheight-xlarge);
        text-align: left;
    }
}

h2>a {
    font-size: var(--fontsize-large);
    line-height: var(--lineheight-large);
    text-align: left;
    color: var(--couleur-rouge);
    background-position-y: 25px;

    &:hover {
        background-position-y: 22px;
        color: var(--couleur-rouge);
    }

    @media screen and (min-width: 992px) {
        font-size: var(--fontsize-xlarge);
        line-height: var(--lineheight-xlarge);
        text-align: left;
    }
}

/* Bloc scindé en 2 (mêmes règles) : en CSS natif, & vaut :is(liste) et prendrait la spécificité la plus forte de la liste. */
h3,
h4 {
    font-size: var(--fontsize-normal);
    line-height: var(--lineheight-normal);
    background-position-y: 18px;


    &:hover {
        color: var(--couleur-noir);
        background-position-y: 16px;
    }

    @media screen and (min-width: 992px) {
        font-size: var(--fontsize-large);
        line-height: var(--lineheight-large);
        background-position-y: 24px;

        &:hover {
            color: var(--couleur-noir);
            background-position-y: 22px;
        }
    }
}

h3>a,
h4>a {
    font-size: var(--fontsize-normal);
    line-height: var(--lineheight-normal);
    background-position-y: 18px;


    &:hover {
        color: var(--couleur-noir);
        background-position-y: 16px;
    }

    @media screen and (min-width: 992px) {
        font-size: var(--fontsize-large);
        line-height: var(--lineheight-large);
        background-position-y: 24px;

        &:hover {
            color: var(--couleur-noir);
            background-position-y: 22px;
        }
    }
}

h4,
h4>a {
    font-size: var(--fontsize-normal);
    line-height: var(--lineheight-normal);
    font-weight: bold;

    @media screen and (min-width: 992px) {
        font-size: var(--fontsize-normal-desktop);
        line-height: var(--lineheight-normal-desktop);
    }
}

p,
ul,
li,
span,
a,
div,
input,
select,
option,
.form-control,
figcaption {
    font-size: var(--fontsize-normal);
    line-height: var(--lineheight-normal);

    @media screen and (min-width: 992px) {
        font-size: var(--fontsize-normal-desktop);
        line-height: var(--lineheight-normal-desktop);
    }
}

/********************************************** FIN POLICES ***************************/










/********************************************** ESPACEMENTS ***************************/
.site,
.front {
    & main {
        margin-left: 4vw;
        margin-right: 4vw;

        & p:not(:last-child),
        & ul:not(:last-child) {
            margin-bottom: var(--spacing-normal);
        }
    }

    /* Bloc scindé en 2 (mêmes règles) : en CSS natif, & vaut :is(liste) et prendrait la spécificité la plus forte de la liste. */
    & main {

        & li {
            margin-bottom: var(--spacing-xpetit);
        }
    }

    .footer {

        & li {
            margin-bottom: var(--spacing-xpetit);
        }
    }

    & h1 {
        margin-bottom: var(--spacing-normal);
        margin-left: auto;
        margin-right: auto;
    }

    & h2 {
        margin-top: var(--spacing-large);
        margin-bottom: var(--spacing-petit);
        scroll-padding-top : 2rem ;
    }


    & h3 {
        margin-top: var(--spacing-normal);
        margin-bottom: var(--spacing-xpetit);

    }



    & h4 {
        margin-top: var(--spacing-petit);
        margin-bottom: var(--spacing-xxpetit);
    }


    /* Bloc scindé en 2 (mêmes règles) : en CSS natif, & vaut :is(liste) et prendrait la spécificité la plus forte de la liste. */
    & a:has(img) {

        & h1,
        & h2,
        & h3 {
            margin: 0;
        }
    }

    .btn {

        & h1,
        & h2,
        & h3 {
            margin: 0;
        }
    }
}

/********************************************** FIN ESPACEMENTS ***************************/










/* règles générales body */
.site {
    font-family: "Liberation Sans", sans-serif;
    overflow-x: hidden;
    background-image: url("../images/fond.webp");
    background-size: 100rem;

    /* menu ouvert */
    &:has(.navbar-collapse.show) {
        overflow: hidden;
    }
}


p,
h1,
h2,
h3,
h4 {
    max-width: 100rem;
}

.cache {
    display: none;
}

/* Classes en 6 variations (4 formes, 1 puzzle,  le logo entier) pour ajouter un masque sur les images dans l'éditeur */
.masqueImage {
    mask-image: url("../images/maskImage1.svg");
    mask-position: center;
    mask-size: contain;
    mask-repeat: no-repeat;
}

.masqueImage2 {
    mask-image: url("../images/maskImage2.svg");
    mask-position: center;
    mask-size: contain;
    mask-repeat: no-repeat;
}

.masqueImage3 {
    mask-image: url("../images/maskImage3.svg");
    mask-position: center;
    mask-size: contain;
    mask-repeat: no-repeat;
}

.masqueImage4 {
    mask-image: url("../images/maskImage4.svg");
    mask-position: center;
    mask-size: contain;
    mask-repeat: no-repeat;
}

.masqueImagePuzzle {
    mask-image: url("../images/maskImage2.svg");
    mask-position: center;
    mask-size: unset;
    mask-repeat: repeat;
}

.masqueImageLogo {
    mask-image: url("../images/logo-mask.svg");
    mask-position: center;
    mask-size: cover;
    mask-repeat: no-repeat;
}



/* soulignement liens */
a {
    text-decoration: none !important;
    background-image: url(../images/soulignement-liens.svg);
    background-repeat: no-repeat;
    background-size: 100% 25%;
    background-position-y: 17px;
    background-position-x: left;
    padding-bottom: 0.4em;
    transition: all 150ms;
    color: var(--couleur-noir);

    &:hover {
        /* background-size: 20% 25%; */
        background-size: 100% 40%;
        background-position-y: 15px;
        color: var(--couleur-noir);
    }
}


/* surlignage */
.com-content-article strong,
b,
.convertforms .cf-control-input-desc  {
    margin: 0 -0.4em;
    padding: 0.1em 0.4em;
    border-radius: 0.8em 0.3em;
    background: transparent;
    background-image:
        linear-gradient(to right,
            rgba(255, 225, 0, 0.1),
            rgba(184, 206, 33, 0.83) 4%,
            rgba(184, 206, 33, 0.37));
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.btn,
.tuile,
a:has(img) {
    text-decoration: none;
    background-image: unset;
}

a:has(img) {
    padding-bottom: 0;
}
