/*
 * ZayActu Links — page "/liens/"
 *
 * Toutes les couleurs, rayons et ombres viennent des variables CSS déjà
 * définies par le thème (:root dans zayactu.css, chargé globalement) :
 * --navy, --paper, --bg, --ink, --ink-soft, --line, --radius, --shadow,
 * --shadow-lg. On ne redéfinit rien, on réutilise — c'est ce qui garantit
 * que cette page reste alignée sur la charte réelle même si elle évolue.
 * Des valeurs de repli sont fournies au cas où ces variables ne seraient
 * pas chargées avant ce fichier.
 */

.zli-body {
    background: var(--bg, #F3F5F9);
    color: var(--ink, #101A33);
}

.zli-skip {
    position: absolute;
    left: -999px;
    top: auto;
    background: var(--navy, #16216B);
    color: #fff;
    padding: 10px 16px;
    border-radius: 0 0 8px 0;
    z-index: 1000;
}
.zli-skip:focus {
    left: 0;
    top: 0;
}

.zli-main {
    max-width: 760px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

/* ---------- Barre du haut ---------- */
.zli-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 20px;
    position: relative;
}
.zli-top-logo img {
    height: 40px;
    width: auto;
    display: block;
}
.zli-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.zli-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    border: none;
    color: var(--navy, #16216B);
    font-family: inherit;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    padding: 9px 10px;
    border-radius: 999px;
    transition: background .15s;
}
.zli-share-btn:hover,
.zli-share-btn:focus-visible {
    background: rgba(22, 33, 107, .08);
}
.zli-share-btn span:last-child {
    display: none;
}
@media (min-width: 560px) {
    .zli-share-btn span:last-child { display: inline; }
}
.zli-contact-btn {
    background: var(--navy, #16216B);
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 18px;
    border-radius: 999px;
    white-space: nowrap;
    transition: transform .15s, box-shadow .15s;
}
.zli-contact-btn:hover,
.zli-contact-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: var(--shadow, 0 8px 22px rgba(22,33,107,.16));
}
.zli-share-toast {
    position: absolute;
    top: 100%;
    right: 20px;
    margin-top: 6px;
    background: var(--navy, #16216B);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 999px;
    box-shadow: var(--shadow, 0 8px 22px rgba(22,33,107,.16));
    animation: zli-toast-in .2s ease;
}
@keyframes zli-toast-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Hero ---------- */
.zli-hero {
    text-align: center;
    padding: 12px 0 32px;
}
.zli-hero-logo {
    width: 96px;
    height: auto;
    margin: 0 auto 10px;
    display: block;
}
.zli-hero-tagline {
    margin: 0;
    color: var(--ink-soft, #5C6488);
    font-size: 13px;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-weight: 600;
}
.zli-hero-rule {
    width: 46px;
    height: 3px;
    background: var(--navy, #16216B);
    border-radius: 3px;
    margin: 16px auto 18px;
    opacity: .85;
}
.zli-hero-title {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 900;
    font-size: clamp(26px, 6vw, 38px);
    color: var(--navy, #16216B);
    margin: 0 0 10px;
    line-height: 1.1;
}
.zli-hero-sub {
    color: var(--ink-soft, #5C6488);
    font-size: 15px;
    line-height: 1.5;
    max-width: 52ch;
    margin: 0 auto;
}

/* ---------- Liste de cartes ---------- */
.zli-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.zli-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--paper, #fff);
    border: 1px solid transparent;
    border-radius: var(--radius, 16px);
    box-shadow: var(--shadow, 0 8px 28px rgba(22,33,107,.10));
    padding: 14px 16px;
    text-decoration: none !important;
    color: inherit;
    min-height: 44px;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.zli-card:hover,
.zli-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg, 0 28px 70px rgba(22,33,107,.22));
}
.zli-card:focus-visible {
    outline: 2px solid var(--navy, #16216B);
    outline-offset: 2px;
}

.zli-card--highlight {
    background: #EEF5FF;
    border-color: #BFDDFB;
}

.zli-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.zli-icon svg {
    width: 24px;
    height: 24px;
}
.zli-icon--img {
    padding: 7px;
    background: var(--paper, #fff);
    border: 1px solid var(--line, #E4E7F2);
}
.zli-icon--img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.zli-card-body {
    flex: 1 1 0%;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.zli-card-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--navy, #16216B);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
}
.zli-card-desc {
    font-size: 13.5px;
    color: var(--ink-soft, #5C6488);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zli-badge {
    /* CORRIGÉ (31/08/2026) : `color: #fff` en dur retiré — le fond peut
       être n'importe quelle couleur choisie par l'admin (style inline posé
       par templates/link-card.php via `background:` ci-dessous), et un
       texte blanc fixe pouvait tomber sous le seuil de contraste WCAG AA
       sur un fond clair. La couleur de texte est maintenant calculée
       dynamiquement selon la luminance du fond (zayactu_links_readable_text_color
       dans includes/icons.php) et posée en style inline, qui prend le
       dessus sur cette règle de base. `background` et `color` ci-dessous
       ne servent que de repli si jamais le style inline était absent. */
    background: var(--navy, #16216B);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 3px 9px;
    border-radius: 999px;
}

.zli-card-os {
    display: none;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
}
@media (min-width: 400px) {
    /* En dessous de 400px, l'icône App Store/Google Play prendrait trop
       de place à côté du nom + de la flèche : on la masque, la carte
       reste cliquable et redirige quand même vers le bon store (JS). */
    .zli-card-os {
        display: flex;
    }
}
.zli-os-chip {
    font-size: 10px;
    font-weight: 700;
    color: var(--ink-soft, #5C6488);
    border: 1px solid var(--line, #E4E7F2);
    border-radius: 999px;
    padding: 2px 8px;
    text-align: center;
}

.zli-card-arrow {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--navy, #16216B);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Décalage progressif de l'apparition au scroll (réutilise .reveal du thème) */
.zli-list .zli-card:nth-child(1) { transition-delay: 0s; }
.zli-list .zli-card:nth-child(2) { transition-delay: .05s; }
.zli-list .zli-card:nth-child(3) { transition-delay: .1s; }
.zli-list .zli-card:nth-child(4) { transition-delay: .15s; }
.zli-list .zli-card:nth-child(5) { transition-delay: .2s; }
.zli-list .zli-card:nth-child(6) { transition-delay: .25s; }
.zli-list .zli-card:nth-child(7) { transition-delay: .3s; }
.zli-list .zli-card:nth-child(8) { transition-delay: .35s; }

/* ---------- Bandeau application ---------- */
.zli-appband {
    margin-top: 30px;
    background: var(--navy, #16216B);
    background: linear-gradient(135deg, var(--navy, #16216B), var(--navy-2, #1E2C8A));
    color: #fff;
    border-radius: var(--radius, 16px);
    padding: 26px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: var(--shadow, 0 8px 28px rgba(22,33,107,.10));
}
.zli-appband-text h2 {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 800;
    font-size: 22px;
    margin: 0 0 6px;
}
.zli-appband-text p {
    margin: 0;
    font-size: 14px;
    color: rgba(255,255,255,.82);
    line-height: 1.5;
}
.zli-appband-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.zli-store-btn {
    flex: 1 1 176px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 12px;
    padding: 9px 16px;
    color: #fff !important;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    transition: background .15s, transform .15s;
}
.zli-store-btn:hover,
.zli-store-btn:focus-visible {
    background: rgba(255,255,255,.2);
    transform: translateY(-2px);
}
.zli-store-btn small {
    font-size: 10.5px;
    opacity: .8;
}
.zli-store-btn strong {
    font-size: 14.5px;
    font-weight: 700;
    white-space: nowrap;
}

@media (min-width: 640px) {
    .zli-appband {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 30px 32px;
    }
    .zli-appband-text { max-width: 380px; }
    .zli-appband-buttons { flex-wrap: nowrap; }
}

/* ---------- QR code + arguments ---------- */
.zli-lower {
    margin-top: 26px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.zli-qr {
    display: none;
}
@media (min-width: 860px) {
    .zli-qr {
        display: flex;
        align-items: center;
        gap: 18px;
        background: var(--paper, #fff);
        border-radius: var(--radius, 16px);
        box-shadow: var(--shadow, 0 8px 28px rgba(22,33,107,.10));
        padding: 18px 22px;
    }
    .zli-qr-canvas {
        width: 84px;
        height: 84px;
        flex-shrink: 0;
        border-radius: 8px;
        overflow: hidden;
    }
    .zli-qr-canvas canvas,
    .zli-qr-canvas img {
        width: 100%;
        height: 100%;
        display: block;
    }
    .zli-qr p {
        margin: 0;
        font-size: 14px;
        color: var(--ink-soft, #5C6488);
        max-width: 40ch;
    }
}

.zli-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    text-align: center;
}
.zli-features li {
    background: var(--paper, #fff);
    border-radius: 14px;
    padding: 16px 10px;
    box-shadow: var(--shadow, 0 8px 28px rgba(22,33,107,.10));
}
.zli-features strong {
    display: block;
    color: var(--navy, #16216B);
    font-size: 13.5px;
    margin-bottom: 4px;
}
.zli-features span {
    display: block;
    font-size: 11.5px;
    color: var(--ink-soft, #5C6488);
    line-height: 1.35;
}
@media (max-width: 520px) {
    .zli-features {
        grid-template-columns: 1fr;
        text-align: left;
    }
}

/* ---------- Pied de page ---------- */
.zli-footer {
    background: var(--navy, #16216B);
    color: rgba(255,255,255,.72);
    margin-top: 40px;
    padding: 32px 20px;
    text-align: center;
}
.zli-footer-brand img {
    height: 36px;
    width: auto;
    margin: 0 auto 8px;
    display: block;
}
.zli-footer-brand p {
    margin: 0 0 16px;
    font-size: 12.5px;
    color: rgba(255,255,255,.6);
}
.zli-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 14px;
}
.zli-footer-links a {
    color: rgba(255,255,255,.82);
    text-decoration: none;
    font-size: 12.5px;
}
.zli-footer-links a:hover,
.zli-footer-links a:focus-visible {
    text-decoration: underline;
}
.zli-footer-copy {
    margin: 0;
    font-size: 11.5px;
    color: rgba(255,255,255,.5);
}

/* ---------- Confort tactile & accessibilité ---------- */
.zli-card,
.zli-share-btn,
.zli-contact-btn,
.zli-store-btn {
    -webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
    .zli-card,
    .zli-contact-btn,
    .zli-store-btn {
        transition: none !important;
    }
}
