/* ==========================================================================
   Jordan Nicol — Page projet (modèle Theme Builder « Page projet »)
   Fichier : css/sections/page-projet.css (chargé sur chaque réalisation)

   Modèle Elementor appliqué à toutes les réalisations, rempli par les
   balises dynamiques (titre, champs ACF) et les shortcodes de
   inc/realisations.php. En-tête : css/sections/entete-page.css ; carte
   « Projet suivant », pastilles et encart final : css/projets.css.

   .jn-entete-projet ...................... en-tête (avec .jn-entete-page)
   ├── .jn-entete-projet__numero .......... « Projet 01 / 04 »
   ├── .jn-entete-projet__titre ........... H1 en dégradé or
   └── .jn-entete-projet__resume .......... « Le projet » (champ le_projet)
   .jn-projet-grand-visuel ................ grand visuel [jn_projet_visuel]
   .jn-detail-projet ...................... fiche | « Mon intervention »
   └── .jn-detail-projet__texte ........... champ mon_intervention
   .jn-projet-suivant ..................... carte du modèle de boucle « Projet suivant »

   Sommaire
   1. En-tête
   2. Grand visuel
   3. Fiche et « Mon intervention »
   4. Projet suivant et lien retour
   ========================================================================== */


/* 1. En-tête
   -------------------------------------------------------------------------- */
.jn-entete-projet__numero .jn-numero-total {
    color: #5E6E8C;
}

.jn-entete-projet__titre .elementor-heading-title {
    background: linear-gradient(100deg, #C9A04F 0%, #F3D892 40%, #D4AF5F 70%, #B8913F 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.jn-entete-projet__resume p,
.jn-detail-projet__texte p {
    margin: 0;
}


/* 2. Grand visuel
   --------------------------------------------------------------------------
   Format 2:1 comme la maquette (1 200 x 600).
   Largeur explicite du widget : sans elle, dans un conteneur en colonne,
   le visuel (container-type + aspect-ratio) est mesuré à 0 de haut en
   mobile et la section suivante passe par-dessus. */
.jn-projet-grand-visuel .elementor-widget,
.elementor-widget.jn-projet-suivant__grille {
    width: 100%;
}

.jn-projet-grand-visuel .jn-pv {
    aspect-ratio: 2 / 1;
    border-radius: 32px;
}

@media (max-width: 767px) {
    .jn-projet-grand-visuel .jn-pv {
        border-radius: 18px;
    }
}


/* 3. Fiche et « Mon intervention »
   --------------------------------------------------------------------------
   Texte du champ WYSIWYG : paragraphes espacés, puces dorées. */
.jn-detail-projet__texte p + p,
.jn-detail-projet__texte p + ul,
.jn-detail-projet__texte ul + p {
    margin-top: 14px;
}

.jn-detail-projet__texte ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.jn-detail-projet__texte li {
    position: relative;
    margin: 0;
    padding-left: 22px;
}

.jn-detail-projet__texte li::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 4px;
    width: 6px;
    height: 6px;
    border-radius: 99px;
    background: #E3C07A;
}

.jn-detail-projet .jn-technos {
    gap: 8px;
}

/* Bouton « Voir le site en ligne » (champ ACF url_site) : masqué si le
   champ est vide. */
.elementor-widget.jn-detail-projet__site:has(a:not([href])),
.elementor-widget.jn-detail-projet__site:has(a[href=""]),
.elementor-widget.jn-detail-projet__site:has(a[href="#"]) {
    display: none;
}

/* Contexte vide : pas d'espace inutile */
.jn-detail-projet__contexte:has(.elementor-heading-title:empty) {
    display: none;
}


/* 4. Projet suivant et lien retour
   --------------------------------------------------------------------------
   Carte du modèle de boucle « Carte projet suivant » : texte | visuel
   (largeur du visuel réglée dans Elementor : 520 / 320 px / 100 %). */
.e-con.jn-projet-suivant {
    color: inherit;
    text-decoration: none;
}

.e-con.jn-projet-suivant > .e-con.jn-projet-suivant__texte {
    --width: auto;
    flex: 1 1 0;
    min-width: 0;
}

@media (max-width: 767px) {
    .e-con.jn-projet-suivant > .e-con.jn-projet-suivant__texte {
        flex: none;
    }
}

.jn-projet-suivant .jn-pv__navigateur,
.jn-projet-suivant .jn-pv__telephone {
    transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.jn-projet-suivant:hover .jn-pv__navigateur {
    transform: translate3d(0, -1cqw, 0);
}

.jn-projet-suivant:hover .jn-pv__telephone {
    transform: translate3d(0, -1.6cqw, 0);
}

.jn-projet-suivant__fleche svg {
    transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.jn-projet-suivant:hover .jn-projet-suivant__fleche svg {
    transform: translateX(6px);
}

.e-con.jn-projet-suivant:focus-visible {
    outline: 2px solid #E3C07A;
    outline-offset: 6px;
}

.elementor-widget.jn-lien-retour .elementor-heading-title a {
    color: #C7D1E3;
    text-decoration: none;
    background: linear-gradient(#E3C07A, #E3C07A) left bottom / 0 1px no-repeat;
    transition: color 0.3s ease, background-size 0.3s ease;
}

.elementor-widget.jn-lien-retour .elementor-heading-title a:hover,
.elementor-widget.jn-lien-retour .elementor-heading-title a:focus-visible {
    color: #E3C07A;
    background-size: 100% 1px;
}

@media (prefers-reduced-motion: reduce) {
    .jn-projet-suivant .jn-pv__navigateur,
    .jn-projet-suivant .jn-pv__telephone,
    .jn-projet-suivant__fleche svg {
        transition: none;
    }
}