/* =========================================================
   VARIABLES / THÈMES
   ========================================================= */

:root {
    --color-primary: #59c134;
    --color-primary-hover: #59c134;

    --bg-color: #f8f9fa;
    --text-color: #212529;

    --nav-bg: rgba(255, 255, 255, .95);

    --card-bg: #fff;
    --stats-bg: #e9ecef;
    --input-bg: #fff;

    --border-color: #dee2e6;
    --nav-link-color: #212529;
    --footer-text: #666;

    --shadow-sm: 0 4px 6px rgba(0, 0, 0, .05);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, .15);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, .1);

    --radius-sm: 5px;
    --radius-md: 8px;

    --transition: .3s ease;
}

.pagejoest {
    --color-primary: #da082d;
    --color-primary-hover: #fff;
}

.pagemecaroanne {
    --color-primary: #536731;
    --color-primary-hover: #fff;
}


/* =========================================================
   RESET
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    background: var(--bg-color);
    color: var(--text-color);

    font-family: Roboto, sans-serif;
}

img,
iframe {
    max-width: 100%;
}

a,
button,
.card,
input,
textarea,
.menu-burger span {
    transition:
        background-color var(--transition),
        color var(--transition),
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

p {
    text-align: center;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

nav {
    position: sticky;
    top: 0;
    z-index: 1000;

    display: flex;
    align-items: center;

    padding: 25px 10%;

    background: var(--nav-bg);

    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: block;
    flex-shrink: 0;

    color: var(--color-primary);

    font-size: 32px;
    font-weight: 700;
}

.logo img {
    display: block;

    width: 200px;
    height: auto;
}

nav > ul {
    display: flex;
    align-items: center;

    margin-left: auto;

    list-style: none;

    gap: 30px;
}

nav li {
    position: relative;

    padding: 10px 0;
}

nav a {
    color: var(--nav-link-color);

    text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
    color: var(--color-primary);
}


/* =========================================================
   MENU BURGER
   ========================================================= */

.menu-burger {
    display: none;

    flex-direction: column;
    justify-content: space-between;

    width: 30px;
    height: 21px;

    padding: 0;

    background: transparent;

    border: 0;

    z-index: 1010;
}

.menu-burger span {
    display: block;

    width: 100%;
    height: 3px;

    background: var(--nav-link-color);

    border-radius: 2px;
}


/* =========================================================
   BOUTON THÈME
   ========================================================= */

.theme-toggle-btn {
    width: 120px;

    padding: 6px 12px;

    background: transparent;

    border: 2px solid var(--color-primary);
    border-radius: 20px;

    color: var(--color-primary);

    font-size: 14px;
    font-weight: 700;

    white-space: nowrap;
}

.theme-toggle-btn:hover,
.theme-toggle-btn:focus-visible {
    background: var(--color-primary);

    color: #1d1d1d;
}


/* =========================================================
   SOUS-MENUS
   ========================================================= */

.dropdown-menu {
    position: absolute;

    top: 100%;
    left: 0;

    display: none;

    flex-direction: column;

    min-width: 200px;

    padding: 10px 0;

    background: var(--card-bg);

    border-top: 3px solid var(--color-primary);

    box-shadow: 0 8px 16px rgba(0, 0, 0, .2);

    list-style: none;

    gap: 0;
}

.dropdown-menu li {
    width: 100%;

    margin: 0;
    padding: 0;
}

.dropdown-menu a {
    display: block;

    padding: 10px 20px;

    color: var(--text-color);

    font-size: 15px;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
    padding-left: 25px;

    background: var(--border-color);

    color: var(--color-primary);
}

nav > ul > li:hover > .dropdown-menu,
nav > ul > li:focus-within > .dropdown-menu {
    display: flex;
}


/* =========================================================
   HEADER / CARROUSEL DE L'ACCUEIL
   ========================================================= */

header {
    position: relative;

    flex-shrink: 0;

    height: calc(100vh - 90px);

    overflow: hidden;
}


/* =========================================================
   IMAGES DU CARROUSEL D'ACCUEIL
   ========================================================= */

.hero-background {
    position: absolute;

    inset: -8%;

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    opacity: 0;

    transform: scale(1);

    transition:
        opacity 1.2s ease-in-out,
        transform 5s ease-in-out;

    pointer-events: none;
}


/* Première image */

.background-1 {
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.75),
            rgba(0, 0, 0, 0.75)
        ),
        url("image/index/1_Industrie_pulverulent.webp");

    opacity: 1;

    z-index: 0;
}


/* Deuxième image */

.background-2 {
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.75),
            rgba(0, 0, 0, 0.75)
        ),
        url("../../99_Archive/2_industrie_du_grain_.webp");

    opacity: 0;

    z-index: 0;
}


/* =========================================================
   CONTENU HERO
   ========================================================= */

.hero {
    position: relative;

    z-index: 2;

    min-height: 100%;

    display: flex;
    flex-direction: column;

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

    padding: 0 20px;

    text-align: center;
}

.hero h1 {
    color: #fff;

    font-size: 60px;

    line-height: 1.1;

    text-transform: uppercase;
}

.hero p {
    max-width: 700px;

    margin: 20px;

    color: #fff;

    font-size: 22px;
}

/* =========================================================
   AUTRES HEADERS
   ========================================================= */

.page-realisation {
    flex-shrink: 0;

    height: calc(100vh - 90px);

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.75),
            rgba(0, 0, 0, 0.75)
        ),
        url("image/index/1_Industrie_pulverulent.webp")
        center / cover no-repeat;
}


.page-joest {
    flex-shrink: 0;

    height: calc(100vh - 90px);

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.75),
            rgba(0, 0, 0, 0.75)
        ),
        url("image/Logo_representation/foerderrohr-trocknen-kuehlen-erhitzen-temperieren-3.webp")
        center / cover no-repeat;
}




.page-meca{
    flex-shrink: 0;
    height: calc(100vh - 90px);
    background:
        linear-gradient(
            rgba(0, 0, 0, 0.75),
            rgba(0, 0, 0, 0.75)
        ),
        url("image/Logo_representation/OIP.webp")
        center / cover no-repeat;
}





/* =========================================================
   CARROUSEL IMAGE — INSTALLATIONS
   ========================================================= */

.representation-image_teste {
    position: relative;
    width: 100%;
    height: 550px;
    overflow: hidden;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.representation-image_teste .installation-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: none;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
}

.representation-image_teste .installation-image-1 {
    opacity: 1;
}


@media (max-width: 768px) {

    .representation-image_teste {
        height: 300px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .representation-image_teste {
        height: 300px;
    }

}








/* =========================================================
   BOUTONS
   ========================================================= */

.btn {
    display: block;

    width: fit-content;

    margin: 5px auto;

    padding: 15px 40px;

    background: var(--color-primary);

    border-radius: var(--radius-sm);

    color: #000;

    font-weight: 700;

    text-decoration: none;
}

.btn:hover,
.btn:focus-visible {
    background: #fff;

    color: #000;

    transform: translateY(-2px);
}


/* =========================================================
   SECTIONS
   ========================================================= */

main {
    width: 100%;
}

section {
    width: min(1400px, calc(100% - 40px));

    margin: 0 auto;

    padding: 70px 0;
}

.container {
    width: min(calc(100% - 40px), 1044px);

    margin: 0 auto;
}

h2 {
    margin-bottom: 30px;
    margin-top: 30px;
    color: var(--color-primary);

    font-size: 40px;

    text-align: center;
}

.page-meca,
.page-joest h2 {
    color: #fff
}


/* =========================================================
   CARTES
   ========================================================= */

.cards {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 30px;
}

.card {
    margin-top: 15px;

    padding: 15px;

    background: var(--card-bg);

    border-left: 6px solid var(--color-primary);

    box-shadow: var(--shadow-sm);
}

.card:hover {
    box-shadow: var(--shadow-lg);

    transform: translateY(-8px);
}

.card h3 {
    margin-bottom: 15px;
}

.card p {
    text-align: left;
}

.card-content p + p {
    margin-top: 20px;
}


/* =========================================================
   LIENS CARTES
   ========================================================= */

.card-phone {
    color: inherit;

    text-decoration: none;
}

.card-link {
    display: block;

    height: 100%;

    color: inherit;

    text-decoration: none;
}

.card-link .card {
    height: 100%;
}

.card-link:visited,
.card-link:hover,
.card-link:active {
    color: inherit;

    text-decoration: none;
}

.card-link:focus-visible {
    outline: 3px solid var(--color-primary);

    outline-offset: 4px;
}


/* =========================================================
   CARTES INDEX
   ========================================================= */

.cards_index {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 30px;

    margin-bottom: 20px;
}

.cards_index_p {
    display: grid;

    grid-template-columns: 1fr;

    gap: 30px;
}

.cards_centrage {
    max-width: 800px;

    margin: 0 auto;

    text-align: center;
}

.cards_index h3 {
    text-align: center;
}

.cards_index .card {
    padding: 28px;
}


/* =========================================================
   IMAGES CARTES
   ========================================================= */

.card-img {
    display: block;

    width: 100%;

    height: 220px;

    object-fit: cover;
}

.card-horizontal {
    display: flex;

    flex-direction: column;
}

.card-horizontal .card-img-side {
    display: block;

    width: 100%;

    height: 220px;

    object-fit: cover;
}

.card-horizontal .card-content {
    padding: 20px;
}


/* =========================================================
   CARTES REPRÉSENTATION
   ========================================================= */

.representation-cards {
    display: grid;

    grid-template-columns: 1fr;

    gap: 30px;

    width: 100%;
}

.representation-cards .card {
    width: 60%;

    margin: 15px auto;

    padding: 0;

    display: flex;

    align-items: center;

    gap: 30px;

    overflow: hidden;

    border-radius: var(--radius-md);
}

.representation-cards .card-content {
    flex: 1;

    padding: 30px;
}

.representation-cards .card h2 {
    margin-bottom: 15px;

    font-size: 28px;

    text-align: left;
}

.representation-cards .card p {
    margin: 0;

    line-height: 1.6;

    text-align: left;
}

.representation-cards .card-img {
    flex: 0 0 300px;

    width: 300px;
    height: 250px;

    object-fit: cover;
}


/* =========================================================
   IMAGES
   ========================================================= */

.representation-image,
.representation-image_teste {
    width: 100%;

    min-height: 550px;

    padding-top: 20px;

    display: flex;

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

    overflow: hidden;
}

.representation-image {
    background: var(--card-bg);

    border-radius: var(--radius-md);

    box-shadow: var(--shadow-md);
}

.representation-image img {
    display: block;

    width: 100%;
    height: 80%;

    object-fit: contain;
}


/* =========================================================
   STATISTIQUES
   ========================================================= */

.stats {
    display: flex;

    justify-content: space-around;

    flex-wrap: wrap;

    padding: 70px 20px;

    background: var(--stats-bg);
}

.stat {
    margin: 20px;

    text-align: center;
}

.stat h3 {
    color: var(--color-primary);

    font-size: 50px;
}


/* =========================================================
   FORMULAIRE
   ========================================================= */

input,
textarea {
    width: 100%;

    margin: 10px 0;

    padding: 15px;

    background: var(--input-bg);

    border: 1px solid var(--border-color);

    color: var(--text-color);
}

textarea {
    min-height: 150px;

    resize: vertical;
}

button:not(.menu-burger):not(.theme-toggle-btn) {
    padding: 15px 35px;

    background: var(--color-primary);

    border: 0;

    color: #000;

    font-size: 18px;

    font-weight: 700;
}


/* =========================================================
   MAP
   ========================================================= */

.map-container {
    width: 100%;

    margin-top: 40px;

    overflow: hidden;

    border: 3px solid var(--color-primary);

    border-radius: var(--radius-md);

    box-shadow: var(--shadow-md);
}

.map-container iframe {
    display: block;

    width: 100%;

    height: 400px;

    border: 0;
}


/* =========================================================
   CARROUSEL — RÉALISATIONS
   ========================================================= */

.carousel {
    position: relative;

    width: 100%;

    margin: 0 auto 40px;

    text-align: left;
}


/* =========================================================
   INPUTS RADIO
   ========================================================= */

.carousel > input[type="radio"] {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;

    pointer-events: none;
}


/* =========================================================
   ZONE DES SLIDES
   ========================================================= */

.carousel__slides {
    display: flex;

    width: 100%;

    margin: 0;
    padding: 0;

    overflow: hidden;

    list-style: none;

    border-radius: var(--radius-md);
}


/* =========================================================
   SLIDES
   ========================================================= */

.carousel__slide {
    position: relative;

    flex: 0 0 100%;

    width: 100%;
    min-width: 100%;

    margin: 0;

    overflow: hidden;

    transition: margin-left 0.6s ease-in-out;
}


/* =========================================================
   FIGURE
   ========================================================= */

.carousel__slide figure {
    position: relative;

    display: flex;
    flex-direction: column;

    width: 100%;

    margin: 0;

    overflow: hidden;

    background: var(--card-bg);

    border-radius: var(--radius-md);
}


/* =========================================================
   IMAGE PRINCIPALE
   ========================================================= */

.carousel__slide figure > div {
    width: 100%;
    height: 500px;

    overflow: hidden;

    background: #111;
}

.carousel__slide img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* =========================================================
   LÉGENDE
   ========================================================= */

.carousel__slide figcaption {
    min-height: 120px;

    padding: 25px 30px;

    background: var(--card-bg);

    color: var(--text-color);

    font-size: 17px;

    line-height: 1.6;

    text-align: center;
}

.carousel__slide .credit {
    display: block;

    margin-top: 12px;

    color: var(--color-primary);

    font-size: 15px;

    font-weight: 700;
}


/* =========================================================
   DÉPLACEMENT DES SLIDES
   ========================================================= */

/* CONCEPTION */

#slide-1:checked ~ .carousel__slides .carousel__slide:first-child {
    margin-left: 0;
}

#slide-2:checked ~ .carousel__slides .carousel__slide:first-child {
    margin-left: -100%;
}

#slide-3:checked ~ .carousel__slides .carousel__slide:first-child {
    margin-left: -200%;
}

#slide-4:checked ~ .carousel__slides .carousel__slide:first-child {
    margin-left: -300%;
}


/* INSTALLATIONS */

#slide-7:checked ~ .carousel__slides .carousel__slide:first-child {
    margin-left: 0;
}

#slide-8:checked ~ .carousel__slides .carousel__slide:first-child {
    margin-left: -100%;
}

#slide-9:checked ~ .carousel__slides .carousel__slide:first-child {
    margin-left: -200%;
}

#slide-10:checked ~ .carousel__slides .carousel__slide:first-child {
    margin-left: -300%;
}


/* MAINTENANCE */

#slide-13:checked ~ .carousel__slides .carousel__slide:first-child {
    margin-left: 0;
}

#slide-14:checked ~ .carousel__slides .carousel__slide:first-child {
    margin-left: -100%;
}

#slide-15:checked ~ .carousel__slides .carousel__slide:first-child {
    margin-left: -200%;
}


/* =========================================================
   MINIATURES
   ========================================================= */

.carousel__thumbnails {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 15px;

    width: 100%;

    margin: 20px 0 0;
    padding: 0;

    list-style: none;
}

.carousel__thumbnails li {
    width: 100%;

    margin: 0;
}

.carousel__thumbnails label {
    display: block;

    width: 100%;

    overflow: hidden;

    cursor: pointer;

    border: 3px solid transparent;

    border-radius: var(--radius-sm);

    transition:
        border-color 0.3s ease,
        transform 0.3s ease,
        opacity 0.3s ease;
}

.carousel__thumbnails label:hover {
    transform: translateY(-3px);

    opacity: 0.85;
}

.carousel__thumbnails img {
    display: block;

    width: 100%;
    height: 100px;

    object-fit: cover;
}


/* =========================================================
   MINIATURE ACTIVE
   ========================================================= */

#slide-1:checked ~ .carousel__thumbnails label[for="slide-1"],
#slide-2:checked ~ .carousel__thumbnails label[for="slide-2"],
#slide-3:checked ~ .carousel__thumbnails label[for="slide-3"],
#slide-4:checked ~ .carousel__thumbnails label[for="slide-4"],

#slide-7:checked ~ .carousel__thumbnails label[for="slide-7"],
#slide-8:checked ~ .carousel__thumbnails label[for="slide-8"],
#slide-9:checked ~ .carousel__thumbnails label[for="slide-9"],
#slide-10:checked ~ .carousel__thumbnails label[for="slide-10"],

#slide-13:checked ~ .carousel__thumbnails label[for="slide-13"],
#slide-14:checked ~ .carousel__thumbnails label[for="slide-14"],
#slide-15:checked ~ .carousel__thumbnails label[for="slide-15"] {
    border-color: var(--color-primary);
}


/* =========================================================
   FOCUS CLAVIER
   ========================================================= */

.carousel__thumbnails label:focus-within {
    outline: 3px solid var(--color-primary);

    outline-offset: 3px;
}


/* =========================================================
   RETOUR
   ========================================================= */

.retour-produits {
    display: flex;

    justify-content: center;

    margin: 40px 0;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
    width: 100%;

    margin-top: auto;

    padding: 30px;

    background: #000;

    color: var(--footer-text);

    text-align: center;
}

footer p {
    margin: 0;
}


/* =========================================================
   TABLETTE
   ========================================================= */

@media (max-width: 992px) {

    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .representation-cards .card {
        width: 100%;
    }

    .carousel__slide figure > div {
        height: 420px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    /* NAVIGATION */

    nav {
        padding: 20px 5%;
    }

    .logo img {
        width: 150px;
    }

    .menu-burger {
        display: flex;

        margin-left: auto;
    }

    nav > ul {
        position: absolute;

        top: 100%;
        left: 0;

        display: none;

        flex-direction: column;

        width: 100%;

        margin-left: 0;

        padding: 20px 0;

        background: var(--nav-bg);

        border-bottom: 1px solid var(--border-color);

        box-shadow: 0 10px 15px rgba(0, 0, 0, .3);

        gap: 0;
    }

    nav > ul.active {
        display: flex;
    }

    nav > ul > li {
        width: 100%;

        margin: 15px 0;

        padding: 0;

        text-align: center;
    }

    nav > ul > li > a {
        display: block;

        width: 100%;

        padding: 8px 20px;
    }

    .theme-toggle-btn {
        width: 120px;

        margin: 10px auto 0;
    }


    /* SOUS-MENUS */

    .dropdown-menu {
        position: relative;

        top: auto;
        left: auto;

        display: none;

        flex-direction: column;

        width: 100%;

        min-width: 0;

        margin-top: 10px;

        padding: 5px 0;

        background: rgba(0, 0, 0, .08);

        border-top: 0;

        border-left: 3px solid var(--color-primary);

        box-shadow: none;
    }

    nav > ul > li:hover > .dropdown-menu,
    nav > ul > li:focus-within > .dropdown-menu {
        display: none;
    }

    nav > ul > li > .dropdown-menu.mobile-open {
        display: flex !important;
    }

    .dropdown-menu a {
        display: block;

        width: 100%;

        padding: 14px 20px;

        text-align: center;
    }


    /* HERO */

    header {
        height: calc(100svh - 90px);
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero p {
        margin: 20px 0;

        font-size: 16px;

        line-height: 1.5;
    }


    /* SECTIONS */

    section {
        width: 100%;
        padding: 55px 5%;
    }

    h2 {
        margin-bottom: 15px;
        margin-top: 15px;
        font-size: 28px;
    }


    /* CARTES */

    .cards,
    .cards_index {
        grid-template-columns: 1fr;
    }

    .card-img {
        height: 210px;
    }


    /* REPRESENTATION */

    .representation-cards .card {
        flex-direction: column;

        align-items: stretch;

        width: 100%;

        gap: 0;
    }

    .representation-cards .card-content {
        padding: 25px;
    }

    .representation-cards .card-img {
        width: 100%;

        height: 220px;

        flex: none;

        order: 2;
    }

    .representation-image,
    .representation-image_teste {
        min-height: 250px;
    }

    .representation-image img {
        width: 85%;

        height: 200px;
    }


    /* STATISTIQUES */

    .stats {
        flex-direction: column;

        padding: 40px 20px;
    }

    .stat {
        margin: 15px 0;
    }

    .stat h3 {
        font-size: 42px;
    }


    /* =====================================================
       CARROUSEL MOBILE
       ===================================================== */

    .carousel {
        width: 100%;

        margin-bottom: 30px;
    }

    .carousel__slide figure > div {
        height: 300px;
    }

    .carousel__slide figcaption {
        min-height: auto;

        padding: 20px;

        font-size: 15px;

        line-height: 1.5;
    }

    .carousel__slide .credit {
        margin-top: 10px;

        font-size: 14px;
    }

    .carousel__thumbnails {
        grid-template-columns: repeat(2, 1fr);

        gap: 10px;

        margin-top: 15px;
    }

    .carousel__thumbnails img {
        height: 90px;
    }


    /* BURGER */

    .menu-burger.open span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .menu-burger.open span:nth-child(2) {
        opacity: 0;
    }

    .menu-burger.open span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}


/* =========================================================
   RÉDUCTION DES ANIMATIONS
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;

        animation-duration: .01ms !important;

        animation-iteration-count: 1 !important;
    }
}