/* ==========================================================================
   Page d'accueil publique

   Tout est portee par les tokens de public/css/brand.css : aucune couleur
   n'est ecrite en dur ici, de sorte qu'un changement de marque se limite a
   brand.css. Le prefixe .lk- evite toute collision avec le theme achete.

   Concue en mobile d'abord : les regles de base valent pour le petit ecran,
   les media queries n'ajoutent que ce qui change au-dessus.
   ========================================================================== */

.lk-home {
    color: var(--color-text);
    background-color: var(--color-surface);
}

.lk-home .lk-section {
    padding: 3rem 0;
}

.lk-home .lk-section--alt {
    background-color: var(--color-surface-alt);
}

.lk-home .lk-eyebrow {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--color-primary);
    background-color: var(--brand-50);
    border: 1px solid var(--brand-200);
    border-radius: 999px;
    padding: .35rem .85rem;
    margin-bottom: 1.25rem;
}

.lk-home h1,
.lk-home h2,
.lk-home h3 {
    color: var(--neutral-900);
    letter-spacing: -.015em;
}

.lk-home .lk-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.lk-home .lk-title em {
    font-style: normal;
    color: var(--color-primary);
}

.lk-home .lk-lead {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--color-text-muted);
    max-width: 60ch;          /* longueur de ligne lisible */
    margin-bottom: 1.75rem;
}

.lk-home .lk-section-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: .5rem;
}

.lk-home .lk-section-subtitle {
    color: var(--color-text-muted);
    max-width: 62ch;
    margin: 0 auto 2.5rem;
}

/* --- boutons ---------------------------------------------------------- */

.lk-home .lk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 48px;         /* cible tactile confortable */
    padding: .75rem 1.5rem;
    border-radius: .5rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color .18s ease-out, border-color .18s ease-out, color .18s ease-out;
}

.lk-home .lk-btn--primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-on-primary);
}

.lk-home .lk-btn--primary:hover,
.lk-home .lk-btn--primary:focus {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: var(--color-on-primary);
    text-decoration: none;
}

.lk-home .lk-btn--ghost {
    background-color: transparent;
    border-color: var(--color-border);
    color: var(--neutral-800);
}

.lk-home .lk-btn--ghost:hover,
.lk-home .lk-btn--ghost:focus {
    border-color: var(--color-primary);
    color: var(--color-primary);
    text-decoration: none;
}

.lk-home .lk-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* --- hero -------------------------------------------------------------- */

/* Le layout general place l'en-tete en position fixe (#header.fixed-top) :
   le hero doit reserver sa hauteur, sinon le premier element passe dessous. */
.lk-home .lk-hero {
    padding: calc(var(--lk-header-height, 88px) + 2rem) 0 3rem;
    background:
        radial-gradient(80rem 40rem at 110% -10%, var(--brand-50) 0%, transparent 60%),
        var(--color-surface);
}

.lk-home .lk-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 2.5rem;
}

.lk-home .lk-hero__visual {
    display: none;            /* masque en petit ecran : decoratif */
}

/* Le theme applique ses propres regles aux images : on borne explicitement,
   sinon la photographie deborde de sa colonne.
   Le sujet est cadre a droite du cliche : object-position le garde dans le
   champ quand la colonne recadre. */
.lk-home .lk-hero__visual img {
    width: 100%;
    max-width: 100%;
    height: 360px;
    object-fit: cover;
    object-position: 72% center;
    border-radius: 14px;
    border: 1px solid var(--color-border);
}

/* --- chiffres ---------------------------------------------------------- */

.lk-home .lk-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    border-top: 1px solid var(--color-border);
    padding-top: 1.5rem;
}

.lk-home .lk-stat__value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-primary);
    font-variant-numeric: tabular-nums;   /* evite le sautillement des chiffres */
}

.lk-home .lk-stat__label {
    display: block;
    font-size: .8125rem;
    color: var(--color-text-muted);
    margin-top: .25rem;
}

/* --- cartes de parcours ------------------------------------------------ */

.lk-home .lk-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: .75rem;
    padding: 1.5rem;
    transition: border-color .18s ease-out, box-shadow .18s ease-out;
}

.lk-home .lk-card:hover {
    border-color: var(--brand-200);
    box-shadow: 0 6px 20px rgba(40, 42, 42, .07);
}

.lk-home .lk-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: .625rem;
    background-color: var(--brand-50);
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.lk-home .lk-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.lk-home .lk-card__text {
    color: var(--color-text-muted);
    flex-grow: 1;             /* aligne les liens en bas de carte */
    margin-bottom: 1.25rem;
}

.lk-home .lk-card__link {
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
}

.lk-home .lk-card__link:hover,
.lk-home .lk-card__link:focus {
    text-decoration: underline;
}

/* --- categories -------------------------------------------------------- */

.lk-home .lk-cats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.lk-home .lk-cat {
    display: block;
    position: relative;
    border-radius: .75rem;
    overflow: hidden;
    background-color: var(--neutral-100);
    text-decoration: none;
    aspect-ratio: 4 / 3;      /* reserve la place, evite le decalage au chargement */
}

.lk-home .lk-cat__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease-out;
}

.lk-home .lk-cat:hover .lk-cat__img {
    transform: scale(1.04);
}

.lk-home .lk-cat__name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2rem .875rem .75rem;
    font-weight: 600;
    color: #FFFFFF;
    /* degrade fonce : garantit la lisibilite quelle que soit l'image */
    background: linear-gradient(to top, rgba(20, 21, 21, .88) 0%, rgba(20, 21, 21, .55) 55%, transparent 100%);
}

.lk-home .lk-cat:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* --- etapes ------------------------------------------------------------ */

.lk-home .lk-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background-color: var(--color-primary);
    color: var(--color-on-primary);
    font-weight: 700;
    margin-bottom: .875rem;
}

/* --- appel final ------------------------------------------------------- */

/* Panneau clair teinte de la marque : pas de aplat sombre. */
.lk-home .lk-final {
    background-color: var(--brand-50);
    border: 1px solid var(--brand-200);
    border-radius: 1rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.lk-home .lk-final h2 {
    color: var(--brand-900);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: .75rem;
}

.lk-home .lk-final p {
    color: var(--neutral-700);
    max-width: 52ch;
    margin: 0 auto 1.75rem;
}

.lk-home .lk-final .lk-btn--ghost {
    border-color: var(--brand-300);
    color: var(--brand-800);
    background-color: var(--color-surface);
}

.lk-home .lk-final .lk-btn--ghost:hover,
.lk-home .lk-final .lk-btn--ghost:focus {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* ==========================================================================
   A partir de 576px
   ========================================================================== */
@media (min-width: 576px) {
    .lk-home .lk-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lk-home .lk-title { font-size: 2.5rem; }
}

/* ==========================================================================
   A partir de 768px
   ========================================================================== */
@media (min-width: 768px) {
    .lk-home .lk-section  { padding: 4.5rem 0; }
    .lk-home .lk-hero     { padding: calc(var(--lk-header-height, 88px) + 3rem) 0 5rem; }
    .lk-home .lk-title    { font-size: 3rem; }
    .lk-home .lk-section-title { font-size: 2rem; }
    .lk-home .lk-final    { padding: 3.5rem 3rem; }
    .lk-home .lk-final h2 { font-size: 2rem; }
    .lk-home .lk-stat__value { font-size: 2.25rem; }
}

/* ==========================================================================
   A partir de 992px
   ========================================================================== */
@media (min-width: 992px) {
    .lk-home .lk-hero__visual {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .lk-home .lk-hero__visual img {
        max-width: 100%;
        height: auto;
    }
    .lk-home .lk-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ==========================================================================
   Preferences de l'utilisateur
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .lk-home .lk-cat__img,
    .lk-home .lk-card,
    .lk-home .lk-btn {
        transition: none;
    }
    .lk-home .lk-cat:hover .lk-cat__img {
        transform: none;
    }
}


