/* ==========================================================================
   LitAppro - Couche de finition du site public
   --------------------------------------------------------------------------
   Chargee APRES main.css (le theme d'origine, 120 ko que l'on ne modifie
   pas pour rester capable de le remplacer). Ce fichier :
     - harmonise les couleurs, rayons et ombres autour de quelques jetons ;
     - repare l'accessibilite (focus visible, cible tactile, mouvement
       reduit, lien d'evitement) ;
     - stabilise la mise en page (ratios d'image, debordements mobiles) ;
     - porte les composants qui etaient definis en <style> dans les pages.
   ========================================================================== */

/* --------------------------------------------------------------
   1. Jetons
   -------------------------------------------------------------- */
:root {
    /* Hauteur de l'en-tete fixe.
       Valeur de repli calculee sur son contenu : 10 px de marge haute,
       44 px pour le logo (ou les boutons carres du menu), 10 px de marge
       basse, 1 px de filet = 65 px, arrondi a 66.

       assets/js/main.js remplace cette valeur par la hauteur reellement
       mesuree des le chargement, puis a chaque redimensionnement : si
       l'en-tete change un jour de contenu, rien d'autre n'est a retoucher.
       Elle sert de reference a tout ce qui doit passer sous l'en-tete. */
    --h-entete: 66px;

    --brand-500: #1f5fe0;
    --brand-600: #164bb8;
    --brand-700: #0d3b8c;
    --brand-050: rgba(31, 95, 224, 0.08);
    --brand-100: rgba(31, 95, 224, 0.16);

    --ink-900: #0b1220;
    --ink-700: #223049;
    --ink-500: #55637a;
    --ink-300: #8a94a6;

    --line: rgba(11, 18, 32, 0.10);
    --line-strong: rgba(11, 18, 32, 0.18);

    --paper: #ffffff;
    --paper-soft: #f5f7fb;

    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 22px;
    --r-pill: 999px;

    --sh-1: 0 1px 2px rgba(11, 18, 32, .06), 0 2px 8px rgba(11, 18, 32, .05);
    --sh-2: 0 2px 6px rgba(11, 18, 32, .07), 0 12px 28px rgba(11, 18, 32, .08);
    --sh-3: 0 8px 20px rgba(11, 18, 32, .10), 0 24px 56px rgba(11, 18, 32, .12);

    --ease: cubic-bezier(.4, 0, .2, 1);

    /* Le theme d'origine reclamait Raleway en plus de Poppins et Roboto.
       Trois familles pour deux usages : on aligne les titres sur Poppins,
       deja chargee pour la navigation. */
    --heading-font: "Poppins", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --accent-color: var(--brand-500);
    --color-primary: var(--brand-500);
    --color-secondary: var(--brand-700);
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    /* Le header est fixed : sans cela une ancre (#team, #contact) place la
       cible sous la barre. Meme reference que le reste : la hauteur de
       l'en-tete, plus 30 px pour que la cible ne colle pas dessous. */
    scroll-padding-top: calc(var(--h-entete, 66px) + 30px);
    overflow-x: hidden;
}

/* --------------------------------------------------------------
   2. Accessibilite
   -------------------------------------------------------------- */
.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 10000;
    padding: 12px 20px;
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    background: var(--brand-700);
    color: #fff;
    font-weight: 600;
    transition: top .2s var(--ease);
}

.skip-link:focus {
    top: 0;
    color: #fff;
}

/* Le theme ne dessinait aucun anneau de focus : la navigation au clavier
   etait invisible. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--brand-500);
    outline-offset: 2px;
    border-radius: 4px;
}

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

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }

    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* --------------------------------------------------------------
   3. Preloader : filet de securite
   Il etait retire par JavaScript uniquement. Une erreur de script, un
   bloqueur ou un reseau coupe laissaient un voile opaque definitif.
   -------------------------------------------------------------- */
html:not(.js) #preloader {
    display: none !important;
}

#preloader {
    animation: preloader-abandon 0s linear 6s forwards;
}

@keyframes preloader-abandon {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* --------------------------------------------------------------
   4. En-tete
   -------------------------------------------------------------- */
.header {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 var(--line), 0 6px 24px rgba(11, 18, 32, .04);
}

.scrolled .header {
    box-shadow: var(--sh-2);
}

.header .container {
    gap: 12px;
}

.header .logo img {
    max-height: 44px;
    width: auto;
}

.header-actions {
    gap: 8px;
    flex-shrink: 0;
    min-width: 0;
}

/* main.css reordonne les enfants du header sous 1200 px :
   .logo prend order:1 et .navmenu order:3, mais le bloc d'actions n'existait
   pas a l'epoque et restait donc a order:0 -- il passait AVANT le logo.
   On lui donne sa place explicite : logo, actions, bouton du menu. */
@media (max-width: 1200px) {
    .header .header-actions {
        order: 2;
        margin-left: auto;
    }

    .header .header-actions .btn-getstarted {
        order: 0;
        margin: 0;
    }

    .header .navmenu {
        order: 3;
    }
}

.navmenu ul li a {
    font-size: 14px;
    padding: 10px 14px;
}

.navmenu ul li a.active {
    background: var(--brand-050);
    border-color: var(--brand-100);
}

/* Boutons d'appel */
.btn-getstarted,
.btn-getstarted:focus {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 10px 18px;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-700) 100%);
    box-shadow: 0 4px 14px rgba(31, 95, 224, .28);
}

.btn-getstarted i {
    font-size: 15px;
    line-height: 1;
}

.btn-getstarted--ghost,
.btn-getstarted--ghost:focus {
    background: var(--paper);
    color: var(--brand-700);
    border: 1px solid var(--line-strong);
    box-shadow: none;
}

.btn-getstarted--ghost:hover {
    background: var(--brand-050);
    color: var(--brand-700);
    border-color: var(--brand-500);
}

/* Sous 576 px la barre n'a plus la place d'afficher trois libelles :
   les boutons de l'EN-TETE se replient sur leur icone.
   La regle visait .btn-getstarted sans restriction : elle amputait aussi
   les boutons places dans le contenu, comme "Un projet similaire ?
   Demandez un devis" sur la fiche projet, qui n'affichait plus qu'une
   icone sans texte. */
@media (max-width: 575.98px) {
    .header .btn-getstarted .btn-label {
        display: none;
    }

    .header .btn-getstarted {
        padding: 10px 12px;
    }

    .header .btn-getstarted i {
        font-size: 17px;
    }
}

/* --- Menu utilisateur --- */
.user-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 5px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    background: var(--paper);
    color: var(--ink-900);
    transition: all .25s var(--ease);
}

.user-profile-btn:hover {
    border-color: var(--brand-500);
    background: var(--brand-050);
    transform: translateY(-1px);
}

.user-avatar-wrap {
    position: relative;
    display: block;
    flex-shrink: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--paper-soft);
    display: block;
}

.online-indicator {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #12b76a;
    border: 2px solid var(--paper);
}

.user-identity {
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
    text-align: left;
}

.user-identity .user-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--ink-900);
}

.user-identity .user-role {
    font-size: 11px;
    color: var(--ink-500);
}

.user-dropdown-menu {
    min-width: 300px;
    max-width: calc(100vw - 24px);
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--sh-3);
}

.user-card {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    margin-bottom: 6px;
    border-radius: var(--r-sm);
    background: var(--paper-soft);
}

.user-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.user-card__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.user-card__text strong {
    font-size: 14px;
    color: var(--ink-900);
}

.user-card__text small {
    font-size: 12px;
    color: var(--ink-500);
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card__badge {
    margin-top: 4px;
    align-self: flex-start;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    background: var(--brand-100);
    color: var(--brand-700);
    font-size: 11px;
    font-weight: 600;
}

.menu-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: var(--r-sm);
}

.menu-row__icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
    font-size: 16px;
}

.menu-row__icon--brand {
    background: var(--brand-100);
    color: var(--brand-700);
}

.menu-row__icon--ok {
    background: rgba(5, 150, 82, .14);
    color: #05713f;
}

.menu-row__icon--danger {
    background: rgba(223, 21, 41, .12);
    color: #b3121f;
}

.menu-row__text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.menu-row__text strong {
    font-size: 14px;
    font-weight: 600;
}

.menu-row__text small {
    font-size: 12px;
    color: var(--ink-500);
}

.menu-row:hover {
    background: var(--brand-050);
}

.menu-row--danger:hover {
    background: rgba(223, 21, 41, .08);
}

.menu-row--danger .menu-row__text strong {
    color: #b3121f;
}

/* --- Navigation mobile --- */
@media (max-width: 1199.98px) {
    .mobile-nav-toggle {
        display: inline-grid;
        place-items: center;
        width: 42px;
        height: 42px;
        padding: 0;
        margin: 0;
        border: 1px solid var(--line-strong);
        border-radius: 12px;
        background: var(--paper);
        color: var(--ink-900);
        font-size: 22px;
        line-height: 1;
    }

    .mobile-nav-active .mobile-nav-toggle {
        top: 14px;
        right: 14px;
        width: 44px;
        height: 44px;
        border-color: rgba(255, 255, 255, .4);
        background: rgba(255, 255, 255, .12);
        color: #fff;
    }

    .navmenu ul {
        inset: 74px 16px auto 16px;
        max-height: calc(100dvh - 96px);
        padding: 10px;
        border-radius: var(--r-md);
        box-shadow: var(--sh-3);
    }

    .navmenu ul li a {
        padding: 13px 16px;
        border-radius: var(--r-sm);
        font-size: 16px;
    }

    .mobile-nav-active .navmenu {
        background: rgba(11, 18, 32, .55);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
}

/* --------------------------------------------------------------
   5. Bouton d'action flottant
   --------------------------------------------------------------
   Remplace la colonne de trois pastilles fixees sur le bord droit.
   Deployees en permanence, elles recouvraient le bouton "Commander"
   des fiches produit, les prix et les titres de section ; avec le
   bouton de remontee, cela faisait quatre elements flottants empiles
   dans le meme coin.
   -------------------------------------------------------------- */
.fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.fab__toggle {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(31, 95, 224, .40);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.fab__toggle:hover {
    transform: scale(1.06);
    box-shadow: 0 10px 28px rgba(31, 95, 224, .5);
}

.fab__toggle i {
    transition: transform .3s var(--ease);
}

.fab.is-open .fab__toggle i {
    transform: rotate(90deg) scale(.9);
}

/* Un leger battement attire l'oeil sans etre envahissant, et s'arrete
   des que le panneau est ouvert. */
.fab:not(.is-open) .fab__toggle::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(31, 95, 224, .45);
    animation: fab-pulse 2.6s ease-out infinite;
}

.fab__toggle {
    position: relative;
    overflow: visible;
}

@keyframes fab-pulse {
    70% {
        box-shadow: 0 0 0 16px rgba(31, 95, 224, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(31, 95, 224, 0);
    }
}

.fab__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.fab__action {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-900);
    animation: fab-entree .28s var(--ease) both;
}

.fab__action:nth-child(1) {
    animation-delay: .12s;
}

.fab__action:nth-child(2) {
    animation-delay: .06s;
}

.fab__action:nth-child(3) {
    animation-delay: 0s;
}

@keyframes fab-entree {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.9);
    }
}

.fab__label {
    padding: 7px 13px;
    border-radius: var(--r-pill);
    background: var(--paper);
    box-shadow: var(--sh-2);
    font-size: .84rem;
    font-weight: 600;
    white-space: nowrap;
}

.fab__puce {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: #fff;
    font-size: 1.15rem;
    box-shadow: var(--sh-2);
    transition: transform .2s var(--ease);
}

.fab__action:hover .fab__puce {
    transform: scale(1.08);
}

.fab__action--wa .fab__puce {
    background: linear-gradient(135deg, #25d366, #0d8b4c);
}

/* Le bouton de remontee passe a gauche : a droite il se superposait au
   bouton d'action et a ses libelles. */
.scroll-top {
    right: auto !important;
    left: 18px;
    bottom: 18px;
}

/* --------------------------------------------------------------
   6. Titre de page et fil d'Ariane
   -------------------------------------------------------------- */
.page-title {
    position: relative;
    padding: 150px 0 62px;
    background-size: cover;
    background-position: center;
}

.page-title:before {
    background: linear-gradient(180deg, rgba(11, 18, 32, .82) 0%, rgba(13, 59, 140, .72) 100%);
}

.page-title h1 {
    font-size: clamp(1.9rem, 4.2vw, 2.9rem);
    font-weight: 700;
    letter-spacing: -.02em;
}

.page-title p {
    /* max-width sans marge auto laissait le paragraphe cale a gauche
       sous un titre centre. */
    max-width: 62ch;
    margin-inline: auto;
    color: rgba(255, 255, 255, .88);
    line-height: 1.7;
}

.page-title .breadcrumbs ol {
    margin-top: 14px;
    font-size: .9rem;
}

.page-title .breadcrumbs ol li,
.page-title .breadcrumbs ol li a {
    color: rgba(255, 255, 255, .82);
}

.page-title .breadcrumbs ol li a:hover {
    color: #fff;
    text-decoration: underline;
}

/* --------------------------------------------------------------
   7. Titres de section
   -------------------------------------------------------------- */
.section-title h2 {
    font-size: clamp(1.6rem, 3.4vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -.02em;
}

.section-title p {
    max-width: 68ch;
    margin-inline: auto;
    color: var(--ink-500);
    line-height: 1.75;
}

/* --------------------------------------------------------------
   8. Cartes : projets, produits, equipe, temoignages
   Un ratio fixe est impose a toutes les vignettes : sans lui, la hauteur
   des cartes changeait au chargement des images (saut de mise en page).
   -------------------------------------------------------------- */
.project-card,
.product-card,
.team-member,
.testimonial-item {
    border-radius: var(--r-md);
    background: var(--paper);
    box-shadow: var(--sh-1);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
    height: 100%;
    overflow: hidden;
}

.project-card:hover,
.product-card:hover,
.team-member:hover {
    transform: translateY(-6px);
    box-shadow: var(--sh-3);
}

.projects .project-card {
    display: flex;
    flex-direction: column;
}

.projects .project-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.projects .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease);
}

.projects .project-card:hover .project-image img {
    transform: scale(1.06);
}

.projects .project-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    flex: 1;
}

.projects .project-category {
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--brand-500);
}

.projects .project-title {
    font-size: 1.12rem;
    font-weight: 600;
    margin: 0;
    color: var(--ink-900);
}

.projects .project-description {
    color: var(--ink-500);
    font-size: .93rem;
    line-height: 1.65;
    margin: 0;
}

.projects .project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: .84rem;
    color: var(--ink-500);
}

.projects .project-status {
    display: inline-block;
    padding: 5px 13px;
    border-radius: var(--r-pill);
    font-size: .74rem;
    font-weight: 700;
    background: rgba(255, 255, 255, .92);
    color: var(--ink-900);
}

.projects .project-status.completed {
    background: #d7f5e6;
    color: #05713f;
}

.projects .project-status.in-progress {
    background: #dbeafe;
    color: #14539e;
}

.projects .project-status.planning {
    background: #fff0cf;
    color: #92610a;
}

/* Le voile d'action n'apparaissait qu'au survol : inatteignable au doigt
   comme au clavier. Il reste visible sur ecran tactile. */
.projects .project-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px;
    background: linear-gradient(180deg, rgba(11, 18, 32, .05) 0%, rgba(11, 18, 32, .68) 100%);
    opacity: 0;
    transition: opacity .3s var(--ease);
}

.projects .project-card:hover .project-overlay,
.projects .project-card:focus-within .project-overlay {
    opacity: 1;
}

@media (hover: none) {
    .projects .project-overlay {
        opacity: 1;
    }
}

.projects .btn-project {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--r-pill);
    background: #fff;
    color: var(--brand-700);
    font-weight: 600;
    font-size: .88rem;
}

.projects .btn-project:hover {
    background: var(--brand-500);
    color: #fff;
}

/* --- Produits --- */
.products .product-card {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    margin-bottom: 0 !important;
    border: 1px solid var(--line);
}

.products .product-image {
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--paper-soft);
    font-size: 3rem;
}

.products .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease);
}

.products .product-card:hover .product-image img {
    transform: scale(1.05);
}

.products .product-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    flex: 1;
}

.products .product-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    color: var(--ink-900);
}

.products .product-description {
    margin: 0;
    color: var(--ink-500);
    font-size: .9rem;
    line-height: 1.6;
    /* Trois lignes au maximum : les descriptions longues faisaient des
       cartes de hauteurs tres inegales. */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.products .product-availability {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--r-pill);
    font-size: .75rem;
    font-weight: 700;
}

.products .product-availability.available {
    background: #d7f5e6;
    color: #05713f;
}

.products .product-availability.unavailable {
    background: #fde3e5;
    color: #b3121f;
}

.products .price {
    font-weight: 700;
    color: var(--brand-700);
    white-space: nowrap;
}

.products .product-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 4px;
}

.products .view-btn,
.products .order-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s var(--ease);
}

.products .view-btn {
    background: var(--paper);
    border-color: var(--line-strong);
    color: var(--ink-700);
}

.products .view-btn:hover {
    border-color: var(--brand-500);
    color: var(--brand-700);
    background: var(--brand-050);
}

.products .order-btn {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: #fff;
}

.products .order-btn:hover:not(:disabled) {
    filter: brightness(1.08);
}

.products .order-btn:disabled {
    background: #e6e9ef;
    color: var(--ink-300);
    cursor: not-allowed;
}

.products .search-container {
    position: relative;
}

.products .search-container .search-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--ink-300);
    pointer-events: none;
}

.products .search-container .form-control {
    padding-left: 44px;
}

.products .form-control,
.products .form-select {
    height: 48px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line-strong);
}

.products .form-control:focus,
.products .form-select:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px var(--brand-050);
}

.modal-product-image {
    max-width: 100%;
    max-height: 320px;
    border-radius: var(--r-md);
    object-fit: contain;
}

.products-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.products-toolbar>* {
    flex: 1 1 240px;
    /* Sans min-width:0 un enfant flex ne descend jamais sous la largeur
       intrinseque de son contenu : deux champs de 240 px cote a cote
       debordaient de l'ecran sur mobile. */
    min-width: 0;
}

.products-count {
    color: var(--ink-500);
    font-size: .9rem;
    margin-bottom: 18px;
}

/* --- Equipe --- */
.team .member-img {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.team .member-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team .member-info {
    padding: 20px;
}

.team .member-info h4 {
    font-size: 1.05rem;
    margin-bottom: 2px;
}

.team .member-info span {
    display: block;
    margin-bottom: 10px;
    font-size: .84rem;
    font-weight: 600;
    color: var(--brand-500);
}

.team .member-info p {
    color: var(--ink-500);
    font-size: .92rem;
    line-height: 1.65;
}

.team .social {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.team .social a {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand-050);
    color: var(--brand-700);
    transition: all .25s var(--ease);
}

.team .social a:hover {
    background: var(--brand-500);
    color: #fff;
}

/* --- Temoignages --- */
.testimonials .testimonial-item {
    padding: 26px;
    border: 1px solid var(--line);
}

.testimonials .testimonial-item p {
    color: var(--ink-700);
    line-height: 1.8;
}

.testimonials .client-image img {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
}

/* --------------------------------------------------------------
   9. Formulaires publics
   -------------------------------------------------------------- */
.php-email-form .form-control,
.quote-form input,
.quote-form select,
.quote-form textarea {
    border-radius: var(--r-sm);
    border: 1px solid var(--line-strong);
    padding: 13px 16px;
    font-size: .95rem;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.php-email-form .form-control:focus,
.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px var(--brand-050);
    outline: none;
}

.php-email-form button[type=submit],
.quote-form .submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 30px;
    border: 0;
    border-radius: var(--r-pill);
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.php-email-form button[type=submit]:hover,
.quote-form .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(31, 95, 224, .32);
}

/* Champ piege anti-robot : invisible a l'oeil, ignore par les lecteurs
   d'ecran, mais rempli par les robots qui remplissent tout. */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --------------------------------------------------------------
   10. Pied de page
   -------------------------------------------------------------- */
.footer {
    padding: 66px 0 0;
}

.footer .tagline {
    color: rgba(255, 255, 255, .72);
    line-height: 1.75;
    font-size: .94rem;
}

.footer .footer-contact {
    margin: 18px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: .92rem;
    color: rgba(255, 255, 255, .78);
}

.footer .footer-contact i {
    width: 20px;
    color: var(--brand-500);
}

.footer .footer-contact a {
    color: rgba(255, 255, 255, .78);
}

.footer .footer-contact a:hover {
    color: #fff;
}

.footer h5 {
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
    margin-bottom: 16px;
}

.footer .footer-links-grid ul li {
    margin-bottom: 10px;
}

.footer .footer-links-grid a {
    color: rgba(255, 255, 255, .8);
    font-size: .94rem;
}

.footer .footer-links-grid a:hover {
    color: #fff;
    padding-left: 4px;
}

.footer .footer-cta p {
    color: rgba(255, 255, 255, .7);
    font-size: .92rem;
    margin-bottom: 16px;
}

.footer .footer-cta .btn-outline {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    margin: 0 0 10px;
    padding: 11px 16px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: var(--r-sm);
    color: #fff;
    font-size: .9rem;
    font-weight: 500;
    text-align: left;
    transition: all .25s var(--ease);
}

.footer .footer-cta .btn-outline:hover {
    background: var(--brand-500);
    border-color: var(--brand-500);
}

.footer .social-links {
    display: flex;
    gap: 10px;
}

.footer .social-links a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .22);
    color: #fff;
    transition: all .25s var(--ease);
}

.footer .social-links a:hover {
    background: var(--brand-500);
    border-color: var(--brand-500);
    transform: translateY(-2px);
}

.footer-bottom {
    margin-top: 50px;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
    text-align: center;
    color: rgba(255, 255, 255, .6);
    font-size: .88rem;
}

/* --------------------------------------------------------------
   11. Heros et rubriques d'accueil
   --------------------------------------------------------------

   Le titre passait sous l'en-tete sur telephone
   ---------------------------------------------
   main.css declare pour le heros :

       min-height: 100vh;  display: flex;  align-items: center;
       padding-top: 120px;

   Sur un ecran de 393 px, le contenu du heros (titre sur deux lignes,
   paragraphe sur cinq, trois boutons empiles, trois statistiques)
   mesure environ 730 px ; avec les marges internes il en faut 930,
   pour une zone visible de 660. Il deborde donc de 270 px.

   Or "align-items: center" repartit un debordement des DEUX cotes :
   le contenu remonte de 135 px. L'en-tete, lui, n'en fait que 66 et
   il est en position fixe. Le titre finissait derriere.

   Ce n'est pas un defaut de l'en-tete : c'est le centrage vertical
   qui n'a de sens que si le contenu tient dans la hauteur.

   La parade tient en un mot-cle : "safe". Un alignement "safe center"
   centre tant qu'il y a la place et repasse au bord des que le
   contenu deborde -- justement pour ne jamais rendre inaccessible ce
   qui depasse. Les navigateurs qui l'ignorent gardent la declaration
   precedente, d'ou les deux lignes.
   -------------------------------------------------------------- */
/* Le selecteur s'ecrit .hero.section, et pas .hero, pour une raison
   precise -- c'est la cause premiere du bug.

   L'element porte les DEUX classes : <section class="hero section">.
   Plus bas dans cette meme feuille, la regle generale des rubriques dit

       .section { padding: 46px 0; }        (sous 768 px)

   "padding" est un RACCOURCI : il reecrit les quatre cotes, donc
   padding-top. Les deux selecteurs ont la meme specificite (0,1,0), et
   .section est plus bas dans le fichier : c'est lui qui l'emportait.

   Le heros recevait donc 46 px de marge haute, pour un en-tete fixe qui
   en mesure 66. Le titre demarrait 20 px DERRIERE l'en-tete -- et cela
   valait deja pour le padding-top: 120px de main.css, ecrase de la meme
   facon depuis le debut.

   .hero.section vaut (0,2,0) et l'emporte quel que soit l'ordre des
   regles. Deux classes au lieu d'une : le correctif tient la, le reste
   n'est que consequence. */
.hero.section {
    /* 100vh sur mobile designe l'ecran barres du navigateur MASQUEES,
       donc plus haut que ce que l'on voit. 100svh designe la zone
       reellement visible. Ordre = repli pour les anciens moteurs. */
    min-height: 100vh;
    min-height: 100svh;

    /* "safe center" centre tant qu'il y a la place et repasse au bord
       des que le contenu deborde, au lieu de le pousser hors de l'ecran
       des deux cotes. Ligne precedente = repli. */
    align-items: center;
    align-items: safe center;

    /* Le decalage sous l'en-tete fixe cesse d'etre un nombre magique
       recopie : il derive de la hauteur mesuree de l'en-tete. */
    padding-top: calc(var(--h-entete, 66px) + 54px);
    padding-bottom: 80px;
}

/* Repli pour les moteurs sans "safe center" (Safari anterieur a 15.4) :
   sous 992 px le contenu du heros deborde de toute facon, le centrage
   vertical n'y apporte rien. */
@media (max-width: 991.98px) {
    .hero.section {
        align-items: flex-start;
        padding-top: calc(var(--h-entete, 66px) + 32px);
        padding-bottom: 56px;
    }
}

/* Meme construction, meme defaut : la page 404 centre elle aussi un
   contenu qui peut depasser la hauteur de l'ecran. */
.error-404 {
    min-height: 100vh;
    min-height: 100svh;
    align-items: center;
    align-items: safe center;
    padding-top: calc(var(--h-entete, 66px) + 54px);
}

.hero .hero-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero .hero-content h1 {
    font-size: clamp(1.85rem, 4.6vw, 3.15rem);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -.025em;
}

.hero .hero-content p {
    max-width: 64ch;
    margin-inline: auto;
    color: rgba(255, 255, 255, .88);
    line-height: 1.75;
}

.hero .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 30px 0 44px;
}

.hero .hero-actions .btn {
    padding: 13px 28px;
    border-radius: var(--r-pill);
    font-weight: 600;
}

/* Empiles sur mobile, les trois appels a l'action prenaient chacun la
   largeur de leur libelle : trois boutons de tailles differentes,
   centres, donnaient un escalier. */
@media (max-width: 575.98px) {
    .hero .hero-actions {
        flex-direction: column;
        align-items: stretch;
        max-width: 300px;
        margin-inline: auto;
    }

    .hero .hero-actions .btn {
        width: 100%;
    }
}

.hero .hero-actions .btn-primary {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    border: 0;
}

.hero .hero-actions .btn-secondary {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .35);
    color: #fff;
}

.hero .hero-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, .22);
}

.hero .stat-item {
    text-align: center;
    padding: 14px 8px;
}

.hero .stat-number {
    display: block;
    font-size: clamp(1.6rem, 3.4vw, 2.3rem);
    font-weight: 700;
    color: #fff;
}

.hero .stat-label {
    font-size: .85rem;
    color: rgba(255, 255, 255, .74);
}

.about .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

.about .stat-number {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--brand-500);
}

.about .stat-label {
    font-size: .86rem;
    color: var(--ink-500);
}

.about .main-image img {
    border-radius: var(--r-lg);
    box-shadow: var(--sh-3);
}

/* --------------------------------------------------------------
   12. Fiche projet
   -------------------------------------------------------------- */
/* Le cadre suit la forme de l'image (--r, pose par le PHP) au lieu de lui
   imposer un 16/10 : l'image de cette fiche est en 1,79, elle y perdait
   10 % de sa largeur. Le repli 16/10 ne sert que si --r est absent.

   Les bornes de hauteur evitent les deux exces : une image tres panoramique
   qui se reduirait a un bandeau, et une image en hauteur qui remplirait
   l'ecran a elle seule. */
.project-details .project-hero {
    position: relative;
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--sh-2);
    aspect-ratio: var(--r, 16 / 10);
    min-height: 240px;
    max-height: 70vh;
}

.project-details .project-hero img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-details .project-hero-overlay {
    position: absolute;
    top: 16px;
    left: 16px;
}

.project-details .project-hero-overlay .project-status {
    padding: 7px 16px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .94);
    color: var(--ink-900);
    font-size: .8rem;
    font-weight: 700;
}

.project-details .project-info {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--paper);
    box-shadow: var(--sh-1);
    height: 100%;
}

.project-details .project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.project-details .project-meta span {
    padding: 5px 13px;
    border-radius: var(--r-pill);
    background: var(--brand-050);
    color: var(--brand-700);
    font-size: .78rem;
    font-weight: 600;
}

.project-details .project-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.project-details .project-description {
    color: var(--ink-500);
    line-height: 1.75;
    font-size: .95rem;
}

.project-details .detail-item,
.project-details .spec-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: .92rem;
}

.project-details .detail-item:last-child,
.project-details .spec-item:last-child {
    border-bottom: 0;
}

.project-details .label,
.project-details .spec-label {
    color: var(--ink-500);
}

.project-details .value,
.project-details .spec-value {
    font-weight: 600;
    color: var(--ink-900);
    text-align: right;
}

.project-details .project-gallery {
    margin-top: 44px;
}

/* ---------------------------------------------------------------
   Galerie de projet : mise en page justifiee
   ---------------------------------------------------------------
   Chaque vignette porte la forme reelle de son image dans --r
   (largeur / hauteur), pose par le PHP qui lit le fichier.

   L'arithmetique, pour qui reprendra ce code : dans une rangee,
   chaque element part d'une largeur de base r x H et grandit
   proportionnellement a r. Sa largeur finale vaut donc
   r x (H + reste / somme des r), et sa hauteur -- largeur divisee
   par r -- vaut H + reste / somme des r : la MEME pour tous les
   elements de la rangee. La rangee remplit toute la largeur, les
   hauteurs s'alignent, et aucune image n'est recadree.

   Ce que cela remplace : un cadre fixe en 4/3 pour toutes les
   images, avec object-fit: cover. Sur cette fiche, les images vont
   de 1,36 a 2,08 de rapport ; la plus panoramique perdait 36 % de
   sa largeur.

   --h-rangee est la hauteur visee d'une rangee, pas une contrainte :
   la hauteur reelle s'ajuste pour que la rangee soit pleine.
   --------------------------------------------------------------- */
.project-details .project-gallery .gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    /* Sans cela, flexbox etire les elements a la hauteur de la rangee
       (align-items: stretch par defaut) et l'etirement prend le pas sur
       aspect-ratio : la forme que l'on vient de poser serait perdue. */
    align-items: flex-start;
    --h-rangee: 260px;
}

.project-details .project-gallery .gallery-grid .gallery-item {
    display: block;
    position: relative;
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--sh-1);

    /* Le cadre prend la forme de l'image : plus aucun recadrage. */
    aspect-ratio: var(--r, 1.5);

    flex-grow: var(--r, 1.5);
    flex-basis: calc(var(--r, 1.5) * var(--h-rangee));
    /* Empeche une image tres panoramique de squatter la rangee entiere. */
    min-width: min(240px, 100%);
}

.project-details .project-gallery .gallery-grid .gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    /* Le cadre ayant deja la forme de l'image, "cover" ne coupe rien :
       il ne sert qu'a absorber l'arrondi au pixel pres. */
    object-fit: cover;
    transition: transform .5s var(--ease);
}

.project-details .project-gallery .gallery-grid .gallery-item:hover img {
    transform: scale(1.05);
}

/* Sous 768 px, une image par rangee : deux vignettes cote a cote sur un
   telephone descendent sous la taille ou l'on distingue quoi que ce soit. */
@media (max-width: 767.98px) {
    .project-details .project-gallery .gallery-grid {
        --h-rangee: 200px;
        gap: 12px;
    }

    .project-details .project-gallery .gallery-grid .gallery-item {
        flex-basis: 100%;
        min-width: 100%;
    }
}

.project-details .content-section {
    margin-top: 36px;
}

.project-details .content-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    padding-left: 14px;
    border-left: 4px solid var(--brand-500);
}

.project-details .content-section p {
    color: var(--ink-700);
    line-height: 1.85;
}

.project-details .specs-visual img {
    border-radius: var(--r-md);
    box-shadow: var(--sh-1);
}

.project-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-top: 48px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------
   13. Etats vides et messages
   -------------------------------------------------------------- */
.state-block {
    text-align: center;
    padding: 60px 20px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-lg);
    background: var(--paper-soft);
}

/* Selecteur d'enfant direct : ".state-block i" visait aussi les icones
   des boutons places dans le bloc, qui se retrouvaient en 2,6 rem. */
.state-block>i {
    font-size: 2.6rem;
    color: var(--ink-300);
    display: block;
    margin-bottom: 14px;
}

.state-block h4 {
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.state-block p {
    color: var(--ink-500);
    margin: 0;
}

.site-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    font-size: .94rem;
    margin-bottom: 22px;
}

.site-alert--ok {
    background: #e8f8f0;
    border-color: #b5e6cd;
    color: #05713f;
}

.site-alert--ko {
    background: #fdecee;
    border-color: #f6c5ca;
    color: #b3121f;
}

/* --------------------------------------------------------------
   14. Pages de contenu legal
   -------------------------------------------------------------- */
.privacy .container,
.terms .container {
    max-width: 900px;
}

.privacy h2,
.terms h2 {
    font-size: 1.35rem;
    margin-top: 34px;
    margin-bottom: 12px;
}

.privacy p,
.terms p,
.privacy li,
.terms li {
    color: var(--ink-700);
    line-height: 1.85;
}

/* --------------------------------------------------------------
   15. Profil
   -------------------------------------------------------------- */
.profile-card {
    max-width: 900px;
    margin: 40px auto 70px;
    padding: 30px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-2);
}

.profile-card .form-label {
    font-weight: 600;
    font-size: .88rem;
    color: var(--ink-700);
    margin-bottom: 6px;
}

.profile-card .form-control {
    height: 48px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line-strong);
}

.profile-card .form-control:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px var(--brand-050);
}

.preview_img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--paper);
    box-shadow: var(--sh-2);
    background: var(--paper-soft);
}

.file-upload {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 96px;
    padding: 18px;
    border: 2px dashed var(--line-strong);
    border-radius: var(--r-md);
    background: var(--paper-soft);
    cursor: pointer;
    transition: border-color .2s var(--ease), background .2s var(--ease);
}

.file-upload:hover,
.file-upload.dragover {
    border-color: var(--brand-500);
    background: var(--brand-050);
}

.file-upload input.image {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.file-upload .file-name {
    margin-top: 6px;
    font-size: .88rem;
    color: var(--brand-700);
    font-weight: 600;
}

/* --------------------------------------------------------------
   16. Bouton de remontee
   -------------------------------------------------------------- */
.scroll-top {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--brand-700);
    box-shadow: var(--sh-2);
}

.scroll-top:hover {
    background: var(--brand-500);
}

/* --------------------------------------------------------------
   17. Garde-fous responsives
   -------------------------------------------------------------- */
img,
video,
iframe {
    max-width: 100%;
}

.section {
    padding: 66px 0;
}

@media (max-width: 767.98px) {
    .section {
        padding: 46px 0;
    }

    .page-title {
        padding: 128px 0 46px;
    }
}

/* Le fond fixe provoque des saccades et des bandes blanches sur iOS. */
@media (max-width: 991.98px) {
    .page-title {
        background-attachment: scroll !important;
    }
}

table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

/* --------------------------------------------------------------
   18. Carte de contact
   L'iframe etait en height:100% dans un conteneur sans hauteur propre :
   si Google Maps ne repond pas, la moitie de la page reste blanche.
   -------------------------------------------------------------- */
.contact .map-wrapper {
    min-height: 380px;
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--paper-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='%238a94a6' viewBox='0 0 16 16'%3E%3Cpath d='M8 16s6-5.686 6-10A6 6 0 0 0 2 6c0 4.314 6 10 6 10m0-7a3 3 0 1 1 0-6 3 3 0 0 1 0 6'/%3E%3C/svg%3E") center no-repeat;
    box-shadow: var(--sh-1);
}

.contact .map-wrapper iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 380px;
    border: 0;
}

/* --------------------------------------------------------------
   19. Menu mobile : reparation du bloc conteneur
   --------------------------------------------------------------
   .header porte backdrop-filter (effet verre depoli). Or backdrop-filter
   cree un BLOC CONTENEUR pour les descendants en position:fixed : le
   panneau de navigation, qui vit dans le header, se positionnait donc par
   rapport a la barre (64 px de haut) et non par rapport a l'ecran.
   Resultat : "inset: 0" ne couvrait que la barre, le panneau se retrouvait
   derriere le contenu de la page et aucun lien n'etait cliquable.

   Sous 1200 px on renonce a l'effet verre : un menu qui fonctionne vaut
   mieux qu'un flou decoratif. Au-dessus, le menu est horizontal et la
   question ne se pose pas.
   -------------------------------------------------------------- */
@media (max-width: 1199.98px) {

    .header,
    .scrolled .header {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: var(--paper);
    }
}
