/**
 * @version 3.0.0
 * @author Arnaud BERNARD <arnaud@pixelorigine.com>
 * @copyright 2020-2026 Arnaud BERNARD - Pixelorigine. Tous droits réservés.
 */

:root {
    --card-border-radius: 2px;
    --card-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}


html {
    scroll-behavior: smooth;
}

html.focus-lost {
    overflow: hidden;
    scrollbar-gutter: stable
}

main {
    padding-top: 120px;
    font-family: 'poppins', sans-serif;
    font-size: 1em;
    line-height: 1.7;
    color: #002043;
}

main *,
footer * {
    box-sizing: border-box;
}

h1 {
    margin: 0;
    font-family: 'Days One', sans-serif;
    font-weight: normal;
}



/**
 * =============================================================================
 * Page header title
 * =============================================================================
 */
.page-header__title {
    position: relative;
    margin: auto 20px;
    max-width: 1320px;
    color: #fff500
}

.page-header__title > div {
    margin-left: auto;
    max-width: 810px;
}

@media (min-width: 1200px) {
    .page-header__title {
        margin: auto;
    }

    .page-header__title > div {
        margin-right: 20px;
    }
}

.page-header__title h1 {
    margin-bottom: 30px;
    font-size: 9vw;
    text-shadow: 1px 1px 3px #222;
}

@media (min-width: 440px) {
    .page-header__title h1 {
        font-size: 2.4em;
    }
}

@media (min-width: 1200px) {
    .page-header__title h1 {
        font-size: 2.6em;
    }
}

.page-header__title p {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 3px 20px;
    color: #006eeb;
    background-color: #fff500;
}

@media (min-width: 600px) {
    .page-header__title p:after {
        content: url(/public/img/icon-devices.svg);
        display: block;
        margin: 0 40px 0 auto;
        opacity: 0.2;
    }
}

.page-header__title p span {
    text-transform: uppercase;
    font-size: 1.4em;
    line-height: 2;
}

.page-header__title i.fa-arrow-circle-down {
    order: 3;
    width: 33px;
    height: auto;
    font-size: 2.4em;
}



/**
 * =============================================================================
 * Déco circuits imprimés en background
 * =============================================================================
 */
.background-deco-circuit {
    position: relative;
    overflow-x: hidden;
}

.background-deco-circuit::before,
.background-deco-circuit::after {
    content: '';
    position: absolute;
    z-index: 0;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.05;
    background-repeat: repeat-y;
    background-position-y: top;
}

.background-deco-circuit::before {
    background-image: url(/public/img/circuit-elec-background-left.svg);
    background-position-x: right;
}

@media (min-width: 740px) {
    .background-deco-circuit::before {
        background-position-x: left;
    }
}

@media (min-width: 1280px) {
    .background-deco-circuit::after {
        background-image: url(/public/img/circuit-elec-background-right.svg);
        background-position-x: right;
    }

    .background-deco-circuit::before {
        margin-left: -100px;
    }

    .background-deco-circuit::after {
        margin-right: -100px;
    }
}

@media (min-width: 1550px) {

    .background-deco-circuit::before,
    .background-deco-circuit::after {
        margin: 0;
    }
}



/**
 * =============================================================================
 * Layout principal de toutes les pages
 * 
 * Bloc principal de layout des vues qui enveloppe un grille CSS .grid-cards
 * et/ou un composant .views-container selon que la vue soit une liste ou non.
 * =============================================================================
 */
.container {
    display: grid;
    position: relative;
    z-index: 1;
    margin: auto auto 120px;
    padding: 0 20px;
    max-width: 1320px;
}

@media (min-width: 390px) {
    .container {
        padding: 0 10%;
    }
}

@media (min-width: 960px) {
    .container {
        padding: 0 40px;
    }

    .container--with-aside-child {
        grid-template-columns: 2fr 1fr;
        gap: 40px;
    }
}

@media (min-width: 1200px) {
    .container {
        padding: 0 20px;
    }

    .container--with-aside-child {
        grid-template-columns: auto 260px;
    }

    .container--with-aside-child > aside {
        min-width: 260px;
    }
}

@media (min-width: 960px) and (max-width: 1320px) {
    .container--support-zimbra > aside {
        display: none;
    }
}

@media (max-width: 1320px) {
    .container--support-zimbra {
        grid-template-columns: 1fr;
    }
}


/**
 * -----------------------------------------------------------------------------
 * Grille de layout responsive
 * -----------------------------------------------------------------------------
 */

/** Bloc principal d'une grille de cartes de navigation */
.container > nav {
    container-name: navGridCards;
    container-type: inline-size;
}

/** Bloc principal d'une grille de cartes de matériels */
.views-container:has(.grid-cards--material) {
    container-name: materialGridCards;
    container-type: inline-size;
}

/**
 * Grille de layout .grid-cards
 * pour styliser une vue de liste
 */
.grid-cards {
    display: grid;
    gap: 40px;
    margin: 0;
    padding: 0;
    list-style: none;
}


/** Grille de navigation .grid-cards width 540px */
@container navGridCards (min-width: 540px) {
    .grid-cards--nav {
        grid-template-columns: 1fr 1fr;
    }

    .grid-cards--nav li:has(.card-nav--compact) {
        grid-column: 1 / span 2;
    }
}

/** Grille de navigation .grid-cards width 840px */
@container navGridCards (min-width: 840px) {
    .grid-cards--nav {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .grid-cards--nav li:has(.card-nav--compact) {
        grid-column: 3;
    }
}

/** Grille de matériels .grid-cards width 840px */
@container materialGridCards (min-width: 840px) {
    .grid-cards--material {
        grid-template-columns: 1fr 1fr;
    }
}


/**
 * -----------------------------------------------------------------------------
 * Layout pour toutes les vues,
 * sauf celles qui servent à la navigation (liste de cartes de liens dans <nav>)
 * -----------------------------------------------------------------------------
 */
.views-container h2 {
    margin: 80px 0 0;
    font-family: 'Days One', sans-serif;
    color: #006eeb;
}

.views-container img {
    display: block;
}

.views-container figure {
    margin: 20px auto;
}

.views-container figure img {
    margin: auto;
}

.views-container figcaption {
    font-size: 0.9em;
    text-align: center;
    color: #656565;
}

.views-container > figure:first-child {
    margin-top: 0;
}

.views-container img:not([width]) {
    width: 100%;
    height: auto;
}

.views-container p {
    margin: 30px 0;
}

.views-container a,
.notification-contact-fai-free a {
    color: #006eeb;
    padding-bottom: 1px;
    font-weight: bold;
    text-decoration: none;
    border-bottom: 1px dashed #006eeb;
}

.views-container a:hover,
.notification-contact-fai-free a:hover {
    border-bottom-style: solid;
}

.views-container > p:first-child {
    margin-top: 0;
}

.views-container__intro {
    margin-bottom: 50px !important;
}

.views-container__split-wrapper {
    display: grid;
}

.views-container__split-wrapper > div > h2 {
    margin-top: 0;
}

.views-container__flexrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    gap: 40px;
    margin: 20px 0;
}

.views-container__NB {
    margin-top: 50px;
    padding: 10px 0;
    color: #444;
    background-color: #ddd;
}

.views-container__NB p {
    margin: 0;
    padding: 10px 20px;
    font-size: 0.9em;
}

.views-container__NB p:before {
    content: '(*) ';
    font-size: 1.1em;
}

@media (min-width: 600px) {
    .views-container figure {
        max-width: max-content;
    }

    .views-container__flexrow {
        flex-direction: row;
    }
}

@media (min-width: 1200px) {
    .views-container__split-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .views-container__split-wrapper figure {
        margin-left: 0;
        margin-right: 0;
    }

    .views-container__columns {
        padding: 20px;
        columns: 2;
        column-gap: 6%;
    }

    .views-container__columns p:first-child {
        margin-top: 0;
    }
}

.views-container--error404 {
    text-align: center;
}

.views-container--error404 h2 {
    margin-top: 0;
    font: bold 10vw 'Poppins', sans-serif !important;
}

.views-container--error404 p {
    font-size: 1.5em;
}

.views-container__figure-fluid {
    width: 100% !important;
}

.views-container__figure-fluid img {
    margin-left: auto;
    margin-right: auto;
}



/**
 * =============================================================================
 * Carte de navigation
 * =============================================================================
 */

.card-nav {
    display: flex;
    flex-direction: column;
    text-align: center;
    text-decoration: none;
    position: relative;
    color: #fff500;
    background-color: #fff;
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-box-shadow);
    overflow: hidden;
}

.card-nav:hover img {
    /** scale(1.08) → img width 270px */
    transform: scale(1.08);
}

.card-nav__img-wrapper {
    position: relative;
    display: block;
    padding: 20px;
    overflow: hidden;
}

.card-nav__img-wrapper img {
    display: block;
    margin: auto;
    width: 100%;

    /**
     * Avec une largeur de 250px les images terminent à 270px de largeur
     * lorsqu'elles sont survolées.
     */
    max-width: 250px;

    height: auto;
    transition: transform 400ms ease;
}

.card-nav i.fa-external-link {
    z-index: 1;
    display: block;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 2.2rem;
    transition: color 250ms;
}

.card-nav:hover i.fa-external-link {
    color: #006eeb;
}

/**
 * Titre <h2> (optionnel)
 */
.card-nav h2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 0 10px;
    height: 90px;

    font-size: 1.3em;
    font-weight: normal;
    line-height: 1.2;

    background-color: #006eeb;
    background-image: linear-gradient(to bottom, #006eeb 50%, #fff500 50%);
    background-size: 100% 200%;

    transition-property: background-position , color;
    transition-duration: 250ms, 200ms;
    transition-timing-function: cubic-bezier(.01, .78, .64, .84), linear;
}

.card-nav:hover h2 {
    color: #006eeb;
    background-position-y: 100%;
}


/**
 * -----------------------------------------------------------------------------
 * Modificateur en carte compacte
 * → 2 cartes demi-hauteur dans 1 item de liste
 * -----------------------------------------------------------------------------
 */
.grid-cards li:has(.card-nav--compact) {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.card-nav--compact {
    flex: 1;
}

.card-nav--compact .card-nav__img-wrapper {
    padding: 5px 0;
}

.card-nav--compact .card-nav__img-wrapper img {
    width: auto;
    height: 150px;
}

/** .grid-cards width 540px */
@container navGridCards (min-width: 540px) {
    .grid-cards li:has(.card-nav--compact) {
        flex-direction: row;
    }
}

/** .grid-cards width 840px */
@container navGridCards (min-width: 840px) {
    .grid-cards li:has(.card-nav--compact) {
        flex-direction: column;
    }

    .card-nav--compact .card-nav__img-wrapper {
        flex: 1;
        min-height: 120px;
    }

    .card-nav--compact .card-nav__img-wrapper img {
        position: absolute;
        inset: 0;
        height: 100%;
        object-fit: contain;
    }
}



/**
 * =============================================================================
 * Carte de matériel des 2 pages *-materiel.php
 * =============================================================================
 */
.card-material {
    padding: 30px;
    background-color: #fff;
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-box-shadow);
}

.card-material img {
    margin: auto;
    width: 100%;
    height: auto;
    max-width: 410px;
}

.card-material ul {
    padding-left: 0;
}

.card-material li {
    display: flex;
    align-items: baseline;
    margin: 6px 0;
    line-height: 1.4rem;
}

.card-material li::before {
    content: '';
    flex-shrink: 0;
    margin-right: 8px;
    margin-bottom: 4px;
    width: 8px;
    height: 8px;
    background-color: currentColor;
    border-radius: 2px;
}

@media (min-width: 600px) {
    .card-material ul {
        padding-left: 30px;
    }
}


/**
 * =============================================================================
 * Composant de notification "contacter FAI Free"
 * =============================================================================
 */
.notification-contact-fai-free {
    position: fixed;
    z-index: 999;
    left: 10px;
    right: 10px;
    max-width: 580px;
    margin: auto;
    padding-bottom: 10px;
    font-size: 0.9em;
    word-break: keep-all;
    color: #656565;
    background-color: white;
    box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.4);
}

.notification-contact-fai-free--open {
    animation: freeDialogSmallScreen 250ms ease-out forwards;
    animation-delay: 400ms;
}

.notification-contact-fai-free--close {
    animation: freeDialogSmallScreen 250ms ease-out forwards reverse;
}

.notification-contact-fai-free::before,
.notification-contact-fai-free::after {
    display: block;
    position: absolute;
    left: 0;
    width: 30px;
}

.notification-contact-fai-free::before {
    content: '';
    top: 0;
    bottom: 0;
    background-color: #a2a5aa;
}

.notification-contact-fai-free::after {
    content: '\f129';
    font-family: 'FontAwesome';
    font-size: 2em;
    text-align: center;
    top: 50%;
    transform: translate(0, -50%);
    color: white;
}

.notification-contact-fai-free button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    font-family: serif;
    font-size: 3.5em;
    line-height: 0;
    color: #656565;
    cursor: pointer;
    border: none;
    background-color: transparent;
}

.notification-contact-fai-free button::before {
    content: '\d7';
}

.notification-contact-fai-free figure {
    margin: 10px 20px 10px 50px;
}

@media (min-width: 1330px) {
    .notification-contact-fai-free {
        top: 385px;
        left: -420px;
        bottom: auto;
        max-width: 405px;
        margin: 0;
    }

    .notification-contact-fai-free::before,
    .notification-contact-fai-free::after {
        width: 40px;
    }

    .notification-contact-fai-free--open,
    .notification-contact-fai-free--close {
        animation-name: freeDialogLargeScreen;
    }
}

@keyframes freeDialogSmallScreen {
    0% {
        opacity: 0;
        bottom: -220px;
        /* Closed state */
    }

    33% {
        opacity: 1;
    }

    100% {
        opacity: 1;
        bottom: 0;
        /* Open state */
    }
}

@keyframes freeDialogLargeScreen {
    0% {
        opacity: 0;
        left: -420px;
        /* Closed state */
    }

    33% {
        opacity: 1;
    }

    100% {
        opacity: 1;
        left: 20px;
        /* Open state */
    }
}


/**
 * Carousel des logos partenaires (avec Splide)
 */
#carousel-partners {
    border-top: 15px solid #fff500;
}

#carousel-partners img {
    display: block;
    width: auto;
    margin: 0;
    padding: 0;
}

#carousel-partners .splide__slide {
    display: flex;
    align-items: center;
    padding: 30px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.55;
    transition: filter 200ms ease, opacity 200ms ease;
}

#carousel-partners .splide__slide.is-active {
    filter: none;
    opacity: 1;
    transition-delay: 400ms;
}

.no-js #carousel-partners .splide__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 600px) {
    #carousel-partners .splide__slide {
        padding-left: 60px;
        padding-right: 60px;
    }
}



/**
 * Icon rotation on hover
 */
a:hover i.rotate360 {
    animation: ease rotate360deg 0.4s;
}

@keyframes rotate360deg {
    from {
        transform: rotate(0deg)
    }

    to {
        transform: rotate(360deg)
    }
}


/**
 * Bouton pour scroller vers le haut
 */
.btn-back-to-top {
    visibility: hidden;
    position: fixed;
    z-index: 3;
    right: 32px;
    bottom: 62px;
    padding: 0;
    /* si un élément <button> est utilisé à la place de <a> */
    width: 60px;
    height: 60px;
    line-height: 0;
    background-color: #006eeb;
    border: none;
    border-radius: 50%;
    box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition-property: visibility, opacity, background-color;
    transition-duration: 250ms;
    transition-delay: 0s, 10ms, 10ms;
}

.btn-back-to-top > svg {
    width: 44%;
    fill: #fff500;
}

.btn-back-to-top:hover {
    background-color: #fff500
}

.btn-back-to-top:hover > svg {
    fill: #006eeb;
}

.btn-back-to-top--visible {
    visibility: visible;
    opacity: 1;
    cursor: pointer;
    pointer-events: all;
}

@media(min-width: 1550px) {
    .btn-back-to-top {
        right: 20px;
    }
}



/**
 * =============================================================================
 * Classes utilitaires
 * =============================================================================
 */

.u-push-left {
    margin-right: auto;
}

.u-fs-sm {
    font-size: 0.8rem;
}

.u-fw-bold {
    font-weight: bold;
}