/* ============================================================
   TECHNO PORTAIL — PAGE D'ACCUEIL
   W3.CSS gère principalement :
   - la grille responsive
   - les colonnes
   - les alignements
   - la visibilité PC/mobile
   - les couleurs
   ============================================================ */


/* ============================================================
   PAGE & BACKGROUND
   ============================================================ */

body.home-page {
    display: block;
    width: 100%;
    min-height: 100vh;
    height: auto;
    margin: 0;

    overflow-x: hidden;
    overflow-y: auto;

    font-family: "Poppins", sans-serif;

    background:
        linear-gradient(
            to bottom,
            rgba(var(--accent-rgb), 0.12) 0px,
            rgba(var(--accent-rgb), 0.08) 80px,
            #ecf0f3 220px
        ),
        var(--cover-image);

    background-size: auto, cover;
    background-position: top left, center top;
    background-repeat: no-repeat;
    background-attachment: scroll;
}


/* ============================================================
   CONTENEUR PRINCIPAL
   ============================================================ */

.home-page .home-content {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;
    padding: 50px 24px 40px;
}


/* ============================================================
   EN-TÊTE
   ============================================================ */

.home-page .home-header {
    max-width: 720px;
    margin: 0 auto 40px;
}


/* Logo + titre */

.home-page .home-brand {
    display: inline-table;
    width: auto;
}

.home-page .home-logo {
    display: block;

    width: 64px;
    height: 64px;

    margin-right: 16px;

    object-fit: contain;
}

.home-page .home-title {
    margin: 0;

    color: #333;

    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 600;
    line-height: 1.1;
}


/* Texte d'introduction */

.home-page .home-intro {
    margin: 18px 0 0;

    color: #555;

    font-size: 1rem;
    font-weight: 300;
    line-height: 1.7;
}


/* ============================================================
   NAVIGATION / RUBRIQUES
   ============================================================ */

.home-page .home-navigation {
    width: 100%;
}

.home-page .home-navigation > h2 {
    margin: 0 0 25px;

    color: #444;

    font-size: 1.15rem;
    font-weight: 500;
}


/* ============================================================
   GRILLE

   Les largeurs sont gérées dans le HTML par W3.CSS :
   l4 = 1/3 PC
   m4 = 1/3 tablette
   s12 = pleine largeur téléphone
   ============================================================ */

.home-page .home-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.home-page .home-column {
    display: flex;
    margin-bottom: 24px;
}


/* ============================================================
   CARTES
   ============================================================ */

.home-page .home-card {
    position: relative;

    display: flex;
    flex-direction: column;

    width: 100%;
    min-height: 390px;

    overflow: hidden;

    color: #444;
    text-decoration: none;

    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


/* Effet souris uniquement */

@media (hover: hover) {

    .home-page .home-card:hover {
        transform: translateY(-5px);

        box-shadow:
            0 10px 28px rgba(0, 0, 0, 0.13);
    }
}


/* ============================================================
   BARRE DE COULEUR
   ============================================================ */

.home-page .home-card-accent {
    flex-shrink: 0;

    width: 100%;
    height: 7px;
}


/* ============================================================
   CARTES — VERSION PC / TABLETTE
   ============================================================ */

.home-page .home-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
}


/* Illustration */

.home-page .home-card-image {
    display: block;

    width: 140px;
    height: 140px;

    margin: 0 auto 14px;

    object-fit: contain;
}


/* Titre */

.home-page .home-card h3 {
    margin: 4px 0 10px;

    color: #333;

    font-size: 1.45rem;
    font-weight: 600;
}


/* Description */

.home-page .home-card p {
    margin: 0;

    color: #666;

    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.6;
}


/* Le texte PC prend l'espace disponible afin
   d'aligner les liens des trois cartes */

.home-page .home-card-content > p {
    flex: 1;
}


/* Lien inférieur */

.home-page .home-card-link {
    display: block;

    margin-top: 24px;

    font-size: 0.9rem;
    font-weight: 600;
}

.home-page .home-card-link i {
    margin-left: 7px;

    transition: transform 0.2s ease;
}

@media (hover: hover) {

    .home-page .home-card:hover .home-card-link i {
        transform: translateX(5px);
    }
}


/* ============================================================
   CARTES — IMAGE MOBILE
   ============================================================ */

.home-page .home-card-image-mobile {
    display: block;

    width: 90px;
    max-width: 90%;
    height: 90px;

    margin: 0 auto;

    object-fit: contain;
}

.home-page .home-card-link-mobile {
    font-size: 0.85rem;
    font-weight: 600;
}


/* ============================================================
   TÉLÉPHONE
   Breakpoint identique à W3.CSS small
   ============================================================ */

@media (max-width: 600px) {

    /* --------------------------------------------------------
       PAGE
       -------------------------------------------------------- */

    .home-page .home-content {
        /*
           95px en bas pour éviter que la dernière carte
           passe derrière la barre de navigation.
        */
        padding: 25px 8px 95px;
    }


    /* --------------------------------------------------------
       EN-TÊTE
       -------------------------------------------------------- */

    .home-page .home-header {
        margin-bottom: 28px;
    }

    .home-page .home-brand {
        width: auto;
    }

    .home-page .home-logo {
        width: 48px;
        height: 48px;

        margin-right: 10px;
    }

    .home-page .home-title {
        font-size: 2.35rem;
    }

    .home-page .home-intro {
        margin-top: 12px;

        font-size: 0.85rem;
        line-height: 1.5;
    }


    /* --------------------------------------------------------
       RUBRIQUES
       -------------------------------------------------------- */

    .home-page .home-navigation > h2 {
        margin-bottom: 15px;

        font-size: 1rem;
    }

    .home-page .home-column {
        margin-bottom: 12px;
    }


    /* --------------------------------------------------------
       VIGNETTES
       -------------------------------------------------------- */

    .home-page .home-card {
        min-height: 0;

        border-radius: 13px;
    }

    .home-page .home-card-accent {
        height: 5px;
    }


    /* Image */

    .home-page .home-card-image-mobile {
        width: 82px;
        height: 82px;
    }


    /* Titre */

    .home-page .home-card h3 {
        margin: 2px 0 5px;

        font-size: 1.15rem;
        line-height: 1.2;
    }


    /* Description */

    .home-page .home-card p {
        font-size: 0.8rem;
        line-height: 1.4;
    }


    /* Lien inférieur */

    .home-page .home-card-link-mobile {
        font-size: 0.8rem;
    }
	
	/* ============================================================
   NAVIGATION MOBILE
   ============================================================ */

.home-page .home-bottom-nav {
    z-index: 1000;

    display: flex;

    width: 100%;
    height: calc(72px + env(safe-area-inset-bottom));

    padding-bottom: env(safe-area-inset-bottom);

    border-top: 1px solid #d8dadd;
    box-shadow: 0 -3px 14px rgba(0, 0, 0, 0.06);
}


/* ------------------------------------------------------------
   4 ZONES IDENTIQUES
   ------------------------------------------------------------ */

.home-page .home-nav-item {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 25%;
    height: 72px;

    padding: 8px 2px !important;

    color: #777;
    text-decoration: none;
}


/* Séparateurs verticaux */

.home-page .home-nav-item:not(:last-child) {
    border-right: 1px solid #e2e3e5;
}


/* ------------------------------------------------------------
   ICÔNES
   ------------------------------------------------------------ */

.home-page .home-nav-item i {
    display: block;

    margin-bottom: 6px;

    font-size: 1.3rem;
    line-height: 1;
}


/* ------------------------------------------------------------
   TEXTE
   ------------------------------------------------------------ */

.home-page .home-nav-item span {
    display: block;

    font-size: 0.7rem;
    font-weight: 400;
    line-height: 1;
}


/* ------------------------------------------------------------
   ÉLÉMENT ACTIF
   ------------------------------------------------------------ */

.home-page .home-nav-active {
    color: #333 !important;
    font-weight: 600;
}


/* Trait supérieur de l'élément actif */

.home-page .home-nav-active::before {
    content: "";

    position: absolute;
    top: 0;
    left: 25%;

    width: 50%;
    height: 3px;

    background: #444;

    border-radius: 0 0 3px 3px;
}

}


/* ============================================================
   TRÈS PETITS ÉCRANS
   ============================================================ */

@media (max-width: 380px) {

    .home-page .home-title {
        font-size: 2rem;
    }

    .home-page .home-logo {
        width: 42px;
        height: 42px;
    }

    .home-page .home-card-image-mobile {
        width: 70px;
        height: 70px;
    }

    .home-page .home-card p {
        font-size: 0.76rem;
    }

}

