/* ==========================================================
   UW-PAVE (Expertises / pôles)
   Mêmes colonnes que .expertise-grid dans Maquette_Utah.html (6 bureau,
   3 tablette, 2 mobile), en rangées centrées (2026-10-09 : une rangée
   incomplète ne reste plus à gauche). Visuel par item : icône FontAwesome (prioritaire)
   ou photo (variante ajoutée par nous, absente de la maquette).
========================================================== */


.uw-pave-head {
    text-align: center;
}


.uw-pave-title {
    margin: 0;
}


.uw-pave-desc {
    margin: 12px auto 0;

    max-width: 640px;

    font-size: 14px;
    line-height: 1.8;

    color: #5d6676;
}


/* ----------------------------------------------------------
   GRILLE — identique à .expertise-grid dans Maquette_Utah.html
---------------------------------------------------------- */

/* Rangées centrées (flex) au lieu d'une grille fixe de 6 colonnes : une rangée incomplète (2, 3, 4… pavés)
   reste centrée. Mêmes largeurs qu'avant : icône = 1/6 de la largeur, photo = 1/3 (≤800px : 1/3 et pleine
   largeur, ≤480px : 1/2 et pleine largeur). --g = espace entre les colonnes. */
.uw-pave-grid {
    --g: 26px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--g);
    margin-top: 28px;
}


.uw-pave-item {
    color: inherit;
    text-decoration: none;
}

.uw-pave-item--icon { flex: 0 0 calc((100% - 5 * var(--g)) / 6); min-width: 0; }


/* ----------------------------------------------------------
   VARIANTE ICÔNE — petit pictogramme centré (grille d'expertises)
---------------------------------------------------------- */

.uw-pave-item--icon {
    text-align: center;
}


a.uw-pave-item--icon:hover .uw-pave-icon {
    transform: translateY(-4px);
}


.uw-pave-icon {
    width: 60px;
    height: 60px;

    margin: 0 auto 18px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: color-mix(in srgb, var(--uw-pave-accent, var(--couleur)) 7%, transparent);
    color: var(--uw-pave-accent, var(--couleur));

    font-size: 24px;

    transition: transform .25s ease;
}


/* ----------------------------------------------------------
   VARIANTE PHOTO — même format/effets que section_pole.inc.php
   sur Minceur Concept : image plein cadre très haute, titre
   superposé en bas avec un trait qui s'étire au survol, photo
   qui s'assombrit au survol. Pas de texte séparé sous la carte.
---------------------------------------------------------- */

/* La variante photo n'existe pas dans la maquette (grille icônes uniquement) :
   span 2 colonnes pour qu'elle ne soit pas écrasée dans une grille pensée
   pour des petites icônes. */
.uw-pave-item--photo {
    flex: 0 0 calc((100% - 2 * var(--g)) / 3);
    min-width: 0;

    display: flex;
    flex-direction: column;

    background: #fff;
    border-radius: 8px;
    overflow: hidden;

    transition: box-shadow .4s ease;
}


.uw-pave-item--photo:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, .15);
}


.uw-pave-photo {
    position: relative;

    width: 100%;
    height: 551px;

    overflow: hidden;
}


.uw-pave-photo img {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    display: block;
    object-fit: cover;
    object-position: center;

    transition: transform .7s ease;
}


/* Filtre sombre sur la photo, actif uniquement au survol */
.uw-pave-photo::after {
    content: '';
    position: absolute;
    z-index: 2;
    inset: 0;

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

    transition: background-color .6s ease;

    pointer-events: none;
}


.uw-pave-item--photo:hover .uw-pave-photo::after {
    background: rgba(0, 0, 0, .4);
}


/* Titre superposé en bas de la photo */
.uw-pave-title-overlay {
    position: absolute;
    z-index: 3;

    left: 1.5rem;
    right: 1.5rem;
    bottom: 15px;

    margin: 0;
    padding-left: 32px;

    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;

    transition: padding-left .6s ease;
}


/* Trait à gauche du titre, qui s'étire au survol */
.uw-pave-title-overlay::before {
    content: '';
    position: absolute;

    left: 0;
    top: 50%;

    transform: translateY(-50%);

    width: 22px;
    height: 2px;

    background: var(--couleur2);

    transition: width .6s ease;
}


.uw-pave-item--photo:hover .uw-pave-title-overlay {
    padding-left: 55px;
}


.uw-pave-item--photo:hover .uw-pave-title-overlay::before {
    width: 45px;
}


/* ----------------------------------------------------------
   TEXTE (variante icône)
---------------------------------------------------------- */

.uw-pave-item h3 {
    margin: 0;

    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.3px;
    line-height: 1.6;

    color: #0a1422;
}


.uw-pave-item--icon h3 {
    min-height: 48px;
}


.uw-pave-item p {
    margin: 12px 0 0;

    font-size: 15px; /* texte courant 15px / 1.7 (maquette), avant 12px / 1.8 */
    line-height: 1.7;

    color: #5d6676;
}


.uw-pave-link {
    display: inline-block;

    margin-top: 10px;

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

    color: var(--uw-pave-accent, var(--couleur));
}


/* ----------------------------------------------------------
   THÈME SOMBRE (couleur de fond 4, comme l'ancien pave2)
---------------------------------------------------------- */

/* Ne s'applique qu'à la variante icône : les cartes photo gardent leur propre
   fond blanc (comme avant), donc leur texte reste toujours sombre. */
.uw-pave-section.sec-theme-c4 .uw-pave-title,
.uw-pave-section.sec-theme-c4 .uw-pave-item--icon h3 {
    color: #fff;
}


.uw-pave-section.sec-theme-c4 .uw-pave-desc,
.uw-pave-section.sec-theme-c4 .uw-pave-item--icon p {
    color: rgba(255, 255, 255, .75);
}


/* ==========================================================
   ≤1150px — identique à Maquette_Utah.html
========================================================== */

@media (max-width: 1150px) {

    .uw-pave-grid {
        --g: 15px;
    }

}


/* ==========================================================
   TABLETTE (≤800px) — identique à Maquette_Utah.html
========================================================== */

@media (max-width: 800px) {

    .uw-pave-grid {
        --g: 20px;
        row-gap: 30px;
    }

    .uw-pave-item--icon {
        flex-basis: calc((100% - 2 * var(--g)) / 3);
    }


    .uw-pave-item--photo {
        flex-basis: 100%;
    }


    .uw-pave-photo {
        height: 400px;
    }

}


/* ==========================================================
   PETIT MOBILE (≤480px) — identique à Maquette_Utah.html
========================================================== */

@media (max-width: 480px) {

    .uw-pave-grid {
        --g: 22px;
        row-gap: 28px;
    }

    .uw-pave-item--icon {
        flex-basis: calc((100% - var(--g)) / 2);
    }


    .uw-pave-item h3 {
        font-size: 15px;
    }


    .uw-pave-item p {
        font-size: 15px;
    }


    .uw-pave-item--photo {
        flex-basis: 100%;
    }


    .uw-pave-title-overlay {
        font-size: 1rem;
        left: 1rem;
        right: 1rem;
    }

}

/* ==========================================================
   DISPOSITION « PROBLÉMATIQUE + SERVICES » (section_pole.inc.php, disposition = probleme)
   Photo portrait à gauche (380px max), à droite : petit titre, H2 (taille commune du site, *mots* en
   couleur 2), texte, puis les pavés en liste (icône, titre + pastilles, texte, lien). Variables du thème
   (--card, --line, --ink, --muted) : mode sombre automatique. Sans photo : le contenu prend toute la largeur.
========================================================== */

.uw-pb { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 64px; align-items: center; }
.uw-pb--sans-photo { grid-template-columns: minmax(0, 1fr); max-width: 860px; margin-inline: auto; }

.uw-pb-photo { width: 100%; max-width: 380px; justify-self: center; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 24px; background: color-mix(in srgb, var(--ink) 6%, var(--card)); }
.uw-pb-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

.uw-pb-content { min-width: 0; }
/* Petit titre = .title-line commun (uw-core.css : police script, couleur 1, trait avant) ;
   en mode sombre, texte et trait en couleur 2 (la couleur 1 disparaît sur fond sombre) */
html.uw-dark .uw-pb-section:not(.sec-theme-c1):not(.sec-theme-c2):not(.sec-theme-c3):not(.sec-theme-c4) .uw-pb-kicker { color: var(--couleur2); }
html.uw-dark .uw-pb-section:not(.sec-theme-c1):not(.sec-theme-c2):not(.sec-theme-c3):not(.sec-theme-c4) .uw-pb-kicker::before { background: currentColor; }
.uw-pb-title { margin: 6px 0 14px; text-align: left; text-wrap: balance; }
.uw-pb-title em { font-style: normal; color: var(--couleur2); }
.uw-pb-intro { margin: 0; max-width: 58ch; color: var(--muted); font-size: 15px; line-height: 1.7; }

.uw-pb-list { display: grid; gap: 14px; margin-top: 28px; }
.uw-pb-item {
    display: flex; gap: 16px; padding: 18px 18px 18px 16px; border-radius: 18px;
    background: var(--card); border: 1px solid var(--line); color: inherit; text-decoration: none;
    transition: transform .35s cubic-bezier(.25, .8, .25, 1), box-shadow .35s, border-color .35s;
}
a.uw-pb-item:hover { transform: translateX(6px); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); box-shadow: 0 18px 36px -22px color-mix(in srgb, var(--c) 60%, transparent); color: inherit; text-decoration: none; }
a.uw-pb-item:focus-visible { outline: 2px solid var(--c); outline-offset: 3px; }
.uw-pb-ico { flex: none; width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--card)); }
.uw-pb-body { flex: 1; min-width: 0; }
.uw-pb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.uw-pb-head h3 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.uw-pb-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.uw-pb-tags span { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.4; color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--card)); }
.uw-pb-body p { margin: 6px 0 8px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.uw-pb-more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--c); }
.uw-pb-more i { font-style: normal; transition: transform .3s; }
a.uw-pb-item:hover .uw-pb-more i { transform: translateX(4px); }

/* Fonds sombres réglés dans la liste des sections (couleur 1 / 4) : textes hors cartes en clair */
.uw-pb-section.sec-theme-c1 .uw-pb-title,
.uw-pb-section.sec-theme-c4 .uw-pb-title { color: #fff; }
.uw-pb-section.sec-theme-c1 .uw-pb-intro,
.uw-pb-section.sec-theme-c4 .uw-pb-intro { color: rgba(255, 255, 255, .78); }
.uw-pb-section.sec-theme-c1 .uw-pb-kicker { color: #fff; }
.uw-pb-section.sec-theme-c1 .uw-pb-kicker::before { background: #fff; }

@media (max-width: 991px) {
    .uw-pb { grid-template-columns: 1fr; gap: 40px; }
    .uw-pb-photo { aspect-ratio: 4 / 3; max-width: 520px; }
}

@media (max-width: 480px) {
    .uw-pb-item { gap: 12px; padding: 14px; }
    .uw-pb-ico { width: 42px; height: 42px; font-size: 17px; border-radius: 12px; }
    .uw-pb-head h3 { font-size: 16.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .uw-pb-item, .uw-pb-more i { transition: none; }
}
