/**
 * Download-vo — mise en valeur des fichiers à télécharger
 *
 * Variables (posées sur chaque carte) :
 *   --downloadvo-color  : couleur du bouton et de l'icône
 *   --downloadvo-radius : arrondi de la carte
 *   --downloadvo-bg     : fond de la carte (facultatif, sinon celui du style)
 */

/* ------------------------------------------------------------------ */
/* Base commune                                                       */
/* ------------------------------------------------------------------ */

.downloadvo-card {
    --downloadvo-color: #546e7a;
    --downloadvo-radius: 12px;
    --downloadvo-ink: #111827;
    --downloadvo-muted: #6b7280;
    --downloadvo-tint: color-mix(in srgb, var(--downloadvo-color) 10%, transparent);
    --downloadvo-inner-radius: min(var(--downloadvo-radius), 10px);
    display: flex;
    align-items: center;
    gap: 1.1em;
    margin: 2em 0;
    padding: 1.1em 1.25em;
    background: var(--downloadvo-bg, #fff);
    border-radius: var(--downloadvo-radius);
    color: var(--downloadvo-ink);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

/* Cartes consécutives : on resserre l'espace entre elles */
.downloadvo-card + .downloadvo-card {
    margin-top: -0.85em;
}

.downloadvo-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.downloadvo-icon-svg {
    display: block;
    width: 36px;
    height: 43px;
}

.downloadvo-icon-svg .downloadvo-icon-sheet {
    fill: var(--downloadvo-color);
}

.downloadvo-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

.downloadvo-card .downloadvo-title {
    font-weight: 600;
    font-size: 1.02em;
    letter-spacing: -0.01em;
    color: inherit;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.downloadvo-card .downloadvo-title:hover,
.downloadvo-card .downloadvo-title:focus {
    color: var(--downloadvo-color);
}

.downloadvo-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25em 0;
    font-size: 0.82em;
    color: var(--downloadvo-muted);
    font-variant-numeric: tabular-nums;
}

.downloadvo-meta-item + .downloadvo-meta-item::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    margin: 0 0.7em;
    vertical-align: middle;
    background: currentColor;
    border-radius: 50%;
    opacity: 0.5;
}

.downloadvo-ext {
    display: inline-block;
    margin-left: 0.35em;
    padding: 0.1em 0.45em;
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--downloadvo-color);
    background: var(--downloadvo-tint);
    border-radius: 4px;
}

.downloadvo-card .downloadvo-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.7em 1.15em;
    font-size: 0.9em;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    background: var(--downloadvo-color);
    border: 1.5px solid var(--downloadvo-color);
    border-radius: var(--downloadvo-inner-radius);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, filter 0.2s ease, transform 0.2s ease;
}

.downloadvo-card .downloadvo-button svg {
    width: 1.1em;
    height: 1.1em;
}

.downloadvo-card .downloadvo-button:hover,
.downloadvo-card .downloadvo-button:focus {
    color: #fff;
    filter: brightness(1.08);
}

.downloadvo-card .downloadvo-button:hover svg {
    transform: translateY(1px);
}

.downloadvo-card .downloadvo-button svg {
    transition: transform 0.2s ease;
}

.downloadvo-card a:focus-visible {
    outline: 2px solid var(--downloadvo-color);
    outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* 1. Carte : filet fin, ombre légère                                 */
/* ------------------------------------------------------------------ */

.downloadvo-style-carte {
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 1px 3px rgba(17, 24, 39, 0.03);
}

.downloadvo-style-carte:hover {
    border-color: rgba(17, 24, 39, 0.12);
    box-shadow: 0 4px 6px -2px rgba(17, 24, 39, 0.04), 0 12px 24px -6px rgba(17, 24, 39, 0.1);
}

/* ------------------------------------------------------------------ */
/* 2. Élevée : sans filet, ombre profonde, icône sur pastille         */
/* ------------------------------------------------------------------ */

.downloadvo-style-elevee {
    padding: 1.35em 1.5em;
    box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.03), 0 2px 4px rgba(17, 24, 39, 0.04), 0 16px 32px -12px rgba(17, 24, 39, 0.18);
}

.downloadvo-style-elevee:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.03), 0 4px 8px rgba(17, 24, 39, 0.05), 0 24px 40px -14px rgba(17, 24, 39, 0.24);
}

.downloadvo-style-elevee .downloadvo-icon {
    width: 3.6em;
    height: 3.6em;
    background: var(--downloadvo-tint);
    border-radius: var(--downloadvo-inner-radius);
}

.downloadvo-style-elevee .downloadvo-icon-svg {
    width: 28px;
    height: 34px;
}

.downloadvo-style-elevee .downloadvo-button {
    box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--downloadvo-color) 70%, transparent);
}

/* ------------------------------------------------------------------ */
/* 3. Contour : filet teinté, bouton en contour                       */
/* ------------------------------------------------------------------ */

.downloadvo-style-contour {
    border: 1.5px solid color-mix(in srgb, var(--downloadvo-color) 22%, #e5e7eb);
}

.downloadvo-style-contour:hover {
    border-color: color-mix(in srgb, var(--downloadvo-color) 55%, #e5e7eb);
}

.downloadvo-style-contour .downloadvo-button {
    color: var(--downloadvo-color);
    background: transparent;
}

.downloadvo-style-contour .downloadvo-button:hover,
.downloadvo-style-contour .downloadvo-button:focus {
    color: #fff;
    background: var(--downloadvo-color);
    filter: none;
}

/* ------------------------------------------------------------------ */
/* 4. Doux : fond teinté, bouton tonal                                */
/* ------------------------------------------------------------------ */

.downloadvo-style-doux {
    background: var(--downloadvo-bg, color-mix(in srgb, var(--downloadvo-color) 5%, #fff));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--downloadvo-color) 10%, transparent);
}

.downloadvo-style-doux .downloadvo-ext {
    background: #fff;
}

.downloadvo-style-doux .downloadvo-button {
    color: var(--downloadvo-color);
    background: color-mix(in srgb, var(--downloadvo-color) 13%, #fff);
    border-color: transparent;
}

.downloadvo-style-doux .downloadvo-button:hover,
.downloadvo-style-doux .downloadvo-button:focus {
    color: #fff;
    background: var(--downloadvo-color);
    filter: none;
}

/* ------------------------------------------------------------------ */
/* 5. Compact : ligne fine, bouton rond avec icône seule              */
/* ------------------------------------------------------------------ */

.downloadvo-style-compact {
    gap: 0.85em;
    margin: 1.25em 0;
    padding: 0.7em 0.8em 0.7em 1em;
    border: 1px solid rgba(17, 24, 39, 0.09);
}

.downloadvo-style-compact + .downloadvo-style-compact {
    margin-top: -0.6em;
}

.downloadvo-style-compact:hover {
    border-color: color-mix(in srgb, var(--downloadvo-color) 40%, #e5e7eb);
}

.downloadvo-style-compact .downloadvo-icon-svg {
    width: 26px;
    height: 31px;
}

.downloadvo-style-compact .downloadvo-body {
    gap: 0.1em;
}

.downloadvo-style-compact .downloadvo-title {
    font-size: 0.95em;
}

.downloadvo-style-compact .downloadvo-meta {
    font-size: 0.78em;
}

.downloadvo-style-compact .downloadvo-button {
    width: 2.6em;
    height: 2.6em;
    padding: 0;
    border-radius: 50%;
}

.downloadvo-style-compact .downloadvo-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Liens au fil du texte                                              */
/* ------------------------------------------------------------------ */

.downloadvo-inline {
    white-space: normal;
}

.downloadvo-inline-icon .downloadvo-icon-svg {
    display: inline-block;
    width: 0.95em;
    height: 1.15em;
    margin-right: 0.3em;
    vertical-align: -0.15em;
}

.downloadvo-inline-icon text {
    display: none;
}

.downloadvo-inline-meta {
    font-size: 0.85em;
    color: #6b7280;
    white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Mobile : le bouton passe sous le texte                             */
/* ------------------------------------------------------------------ */

@media (max-width: 560px) {
    .downloadvo-card:not(.downloadvo-style-compact) {
        flex-wrap: wrap;
        padding: 1em;
    }

    .downloadvo-card:not(.downloadvo-style-compact) .downloadvo-body {
        flex-basis: calc(100% - 4.8em);
    }

    .downloadvo-card:not(.downloadvo-style-compact) .downloadvo-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .downloadvo-card,
    .downloadvo-card .downloadvo-button,
    .downloadvo-card .downloadvo-button svg {
        transition: none;
    }

    .downloadvo-card:hover,
    .downloadvo-card .downloadvo-button:hover svg {
        transform: none;
    }
}
