/* ==========================================================
   UW-METHODE (Ma méthode en 5 étapes)
   Fond sombre partagé via .uw-dark-section (assets/css/uw-core.css).
========================================================== */

.uw-methode-section {
    position: relative;
    overflow: hidden;
}


.uw-methode-section:after {
    content: '';
    position: absolute;
    z-index: 0;

    left: -5%;
    bottom: -60px;

    width: 110%;
    height: 100px;

    border: 1px dashed #ff26252b;
    border-radius: 50%;

    pointer-events: none;
}


/* En-tête (2026-10-09, maquette « Mon approche ») : calé à gauche, petit titre .title-line commun,
   titre (police / taille / couleur communes, *mots* en <em>), texte facultatif */
.uw-methode-head {
    position: relative;
    z-index: 1;

    max-width: 760px;
    margin-bottom: 44px;
}

/* Petit titre sur fond sombre : couleur 2 éclaircie (la couleur 1 disparaît), trait de la même couleur */
.uw-methode-section:not(.sec-theme-fond) .uw-methode-kicker { color: color-mix(in srgb, var(--couleur2) 80%, #fff); }
.uw-methode-kicker::before { background: currentColor; }

.uw-methode-title {
    position: relative;
    z-index: 1;

    margin: 6px 0 12px;
    text-wrap: balance;
}

.uw-methode-title em { font-style: normal; }

.uw-methode-intro {
    margin: 0;

    font-size: 15px;
    line-height: 1.7;

    color: #c9d0db;
}


/* Autant de colonnes que d'étapes affichées (--n posé par section_methode.inc.php) */
.uw-methode-steps {
    position: relative;
    z-index: 1;

    display: grid;
    grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr));

    gap: 35px;
}

/* Dernière étape : le trait s'efface au lieu de s'arrêter net */
.uw-methode-step:last-child .uw-methode-icon-row:after {
    background: linear-gradient(90deg, #f32628, transparent);
}


.uw-methode-step {
    position: relative;
}


.uw-methode-num {
    font-size: 32px;
    font-weight: bold;
    line-height: 1;

    color: #ffffff38;
}


.uw-methode-icon-row {
    display: flex;
    align-items: center;

    gap: 8px;

    margin: 8px 0;
}


.uw-methode-icon-row:after {
    content: '';

    flex: 1;
    height: 2px;

    background: linear-gradient(90deg, #f32628, #fff5);
}


.uw-methode-icon {
    flex: 0 0 auto;

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

    box-sizing: border-box;

    width: 40px;
    height: 40px;

    padding: 7px;

    border: 1px solid #727783;
    border-radius: 50%;

    color: #fff;
    font-size: 16px;
}


/* Titre et texte sous l'icône, alignés à gauche (maquette « Mon approche » ; avant : décalés de 48px, titre 14px) */
.uw-methode-step h3 {
    margin: 4px 0 0;

    font-size: 17px;
    letter-spacing: 0;

    color: #fff;
}


.uw-methode-step p {
    margin: 8px 0 0;

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

    color: #d7dce4;
}


/* ==========================================================
   ≤1150px
========================================================== */

@media (max-width: 1150px) {

    .uw-methode-steps {
        gap: 27px;
    }


    .uw-methode-step h3,
    .uw-methode-step p {
        margin-left: 0;
    }

}


/* ==========================================================
   FOND CLAIR — « Fond du site » (sec-theme-fond) en mode clair : le style ci-dessus est prévu
   pour un fond sombre (textes blancs) → couleurs du thème. En mode sombre, ce fond est sombre :
   rien ne change.
========================================================== */

html:not(.uw-dark) .uw-methode-section.sec-theme-fond { color: var(--ink); }
html:not(.uw-dark) .uw-methode-section.sec-theme-fond:after { border-color: color-mix(in srgb, var(--couleur2) 25%, transparent); }
html:not(.uw-dark) .uw-methode-section.sec-theme-fond .uw-methode-intro { color: var(--muted); }
html:not(.uw-dark) .uw-methode-section.sec-theme-fond .uw-methode-num { color: color-mix(in srgb, var(--ink) 18%, transparent); }
html:not(.uw-dark) .uw-methode-section.sec-theme-fond .uw-methode-icon { border-color: var(--line); color: var(--couleur); background: var(--card); }
html:not(.uw-dark) .uw-methode-section.sec-theme-fond .uw-methode-icon-row:after { background: linear-gradient(90deg, #f32628, var(--line)); }
html:not(.uw-dark) .uw-methode-section.sec-theme-fond .uw-methode-step:last-child .uw-methode-icon-row:after { background: linear-gradient(90deg, #f32628, transparent); }
html:not(.uw-dark) .uw-methode-section.sec-theme-fond .uw-methode-step h3 { color: var(--ink) !important; }
html:not(.uw-dark) .uw-methode-section.sec-theme-fond .uw-methode-step p { color: var(--muted); }


/* ==========================================================
   TABLETTE (≤991px) : 2 étapes par ligne
========================================================== */

@media (max-width: 991px) {

    .uw-methode-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 25px;
    }


    .uw-methode-head {
        margin-bottom: 32px;
    }


    .uw-methode-step h3 {
        font-size: 16px;
    }


    .uw-methode-step p {
        font-size: 15px;
    }

}


/* ==========================================================
   MOBILE (≤480px)
========================================================== */

@media (max-width: 480px) {

    .uw-methode-steps {
        grid-template-columns: 1fr;

        gap: 23px;
    }


    .uw-methode-step {
        padding-left: 59px;
    }


    .uw-methode-num {
        position: absolute;

        left: 0;
        top: 7px;
    }


    .uw-methode-icon-row {
        float: left;

        margin: 0 12px 0 0;
    }


    .uw-methode-icon-row:after {
        display: none;
    }


    .uw-methode-step h3 {
        padding-top: 4px;
    }


    .uw-methode-step p {
        margin: 8px 0 0 52px;
    }

}
