/*
 * APP.CGT.FR — Home éditoriale
 * Sélection + Web-to-print + Kiosque + tracts.cgt.fr
 * Préfixe exclusif : app-home-*
 */

.app-home-page {
    padding-bottom: 80px;
}

.app-home-sections {
    --app-home-red: #ed1c24;
    --app-home-red-dark: #cf171e;
    --app-home-ink: #202124;
    --app-home-muted: #71757a;
    --app-home-soft: #f6f6f5;
    --app-home-border: rgba(32, 33, 36, .12);
    --app-home-radius: 24px;

    width: 100%;
    max-width: 1120px;
    margin: 44px auto 54px;
    padding: 0 15px;
    color: var(--app-home-ink);
}

.app-home-sections *,
.app-home-sections *::before,
.app-home-sections *::after {
    box-sizing: border-box;
}

.app-home-block {
    width: 100%;
    margin: 0 0 24px;
    overflow: hidden;
    border: 1px solid var(--app-home-border);
    border-radius: var(--app-home-radius);
    background: #fff;
}

.app-home-eyebrow {
    margin: 0 0 8px;
    color: #8a8d91;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.app-home-block h2 {
    margin: 0;
    color: var(--app-home-ink);
    font-family: "Satoshi", Arial, sans-serif;
    font-size: clamp(31px, 4vw, 44px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -.035em;
}

.app-home-block h2 span {
    color: var(--app-home-red);
}

.app-home-block-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
}

.app-home-block-head > div:first-child > p:last-child,
.app-home-lead {
    max-width: 680px;
    margin: 13px 0 0;
    color: var(--app-home-muted);
    font-size: 14px;
    line-height: 1.55;
}

.app-home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-family: "Satoshi", Arial, sans-serif;
    font-size: 12px;
    line-height: 1;
    font-weight: 850;
    text-decoration: none !important;
    transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.app-home-button:hover,
.app-home-button:focus {
    transform: translateY(-1px);
}

.app-home-button--red {
    border-color: var(--app-home-red);
    background: var(--app-home-red);
    color: #fff !important;
}

.app-home-button--red:hover,
.app-home-button--red:focus {
    border-color: var(--app-home-red-dark);
    background: var(--app-home-red-dark);
}

.app-home-button--dark {
    border-color: var(--app-home-ink);
    background: var(--app-home-ink);
    color: #fff !important;
}

.app-home-button--light {
    margin-top: 25px;
    border-color: #fff;
    background: #fff;
    color: var(--app-home-ink) !important;
}

.app-home-card-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    background: #f0f0f0;
    color: var(--app-home-ink);
    transition: transform .15s ease, background .15s ease, color .15s ease;
}

.app-home-empty {
    display: flex;
    align-items: center;
    gap: 10px 18px;
    margin-top: 25px;
    padding: 22px;
    border: 1px dashed rgba(32, 33, 36, .18);
    border-radius: 14px;
    color: var(--app-home-muted);
    font-size: 12px;
}

.app-home-empty strong {
    color: var(--app-home-ink);
}

/* ========================================================================
 * SÉLECTION — version compacte, sans cartes ni visuels
 * ===================================================================== */

.app-home-selection {
    padding: 20px 24px 8px;
    box-shadow: none;
}

.app-home-selection__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 8px;
}

.app-home-selection .app-home-eyebrow {
    margin-bottom: 4px;
}

.app-home-selection h2 {
    font-size: 24px;
    line-height: 1.05;
    letter-spacing: -.025em;
}

.app-home-admin-link a {
    display: inline-flex;
    padding: 7px 10px;
    border: 1px solid var(--app-home-border);
    border-radius: 8px;
    color: var(--app-home-muted);
    font-size: 9px;
    font-weight: 700;
    text-decoration: none !important;
}

.app-home-selection__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
}

.app-home-selection__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 12px 0;
    border-top: 1px solid var(--app-home-border);
    color: var(--app-home-ink) !important;
    text-decoration: none !important;
}

.app-home-selection__title {
    min-width: 0;
    overflow: hidden;
    color: var(--app-home-ink);
    font-family: "Satoshi", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-home-selection__meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    color: var(--app-home-muted);
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
}

.app-home-selection__meta span {
    color: var(--app-home-red);
    font-size: 15px;
    transition: transform .15s ease;
}

.app-home-selection__item:hover .app-home-selection__title,
.app-home-selection__item:focus .app-home-selection__title {
    color: var(--app-home-red);
}

.app-home-selection__item:hover .app-home-selection__meta span,
.app-home-selection__item:focus .app-home-selection__meta span {
    transform: translateX(2px);
}

/* ========================================================================
 * WEB-TO-PRINT
 * ===================================================================== */

.app-home-webtoprint {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr);
    gap: 32px;
    min-height: 390px;
    padding: 42px;
    background: radial-gradient(circle at 88% 18%, rgba(237, 28, 36, .10), transparent 38%), #fff;
    box-shadow: 0 13px 34px rgba(0, 0, 0, .045);
}

.app-home-webtoprint__content {
    align-self: center;
}

.app-home-webtoprint__audience {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 19px;
    color: var(--app-home-ink);
}

.app-home-webtoprint__audience-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 11px;
    background: #f4f4f3;
}

.app-home-webtoprint__audience strong,
.app-home-webtoprint__audience small {
    display: block;
}

.app-home-webtoprint__audience strong {
    font-size: 11px;
    font-weight: 900;
}

.app-home-webtoprint__audience small {
    margin-top: 2px;
    color: var(--app-home-muted);
    font-size: 9px;
}

.app-home-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 26px;
}

.app-home-count {
    color: var(--app-home-muted);
    font-size: 10px;
    font-weight: 650;
}

.app-home-count strong {
    margin-right: 3px;
    color: var(--app-home-ink);
    font-size: 16px;
    font-weight: 900;
}

.app-home-webtoprint__visual {
    position: relative;
    min-height: 295px;
}

.app-home-webtoprint__visual::before {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: rgba(237, 28, 36, .065);
    content: "";
    transform: translate(-50%, -50%);
}

.app-home-print-cover {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 158px;
    aspect-ratio: 210 / 297;
    overflow: hidden;
    border: 6px solid #fff;
    border-radius: 8px;
    background: #ececeb;
    box-shadow: 0 17px 35px rgba(0, 0, 0, .16);
    transform-origin: center bottom;
    transition: transform .18s ease, box-shadow .18s ease;
}

.app-home-print-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.app-home-print-cover--1 { z-index: 4; transform: translate(-50%, -50%) rotate(2deg); }
.app-home-print-cover--2 { z-index: 3; transform: translate(-103%, -42%) rotate(-10deg) scale(.90); }
.app-home-print-cover--3 { z-index: 2; transform: translate(3%, -42%) rotate(10deg) scale(.90); }
.app-home-print-cover--4 { z-index: 1; transform: translate(-49%, -33%) rotate(-1deg) scale(.81); }

.app-home-print-cover:hover,
.app-home-print-cover:focus {
    z-index: 8;
    box-shadow: 0 23px 46px rgba(0, 0, 0, .22);
}

.app-home-print-cover--1:hover,
.app-home-print-cover--1:focus { transform: translate(-50%, -54%) rotate(0); }
.app-home-print-cover--2:hover,
.app-home-print-cover--2:focus { transform: translate(-103%, -46%) rotate(-7deg) scale(.92); }
.app-home-print-cover--3:hover,
.app-home-print-cover--3:focus { transform: translate(3%, -46%) rotate(7deg) scale(.92); }
.app-home-print-cover--4:hover,
.app-home-print-cover--4:focus { transform: translate(-49%, -37%) rotate(-1deg) scale(.83); }

.app-home-print-cover__action {
    position: absolute;
    right: 7px;
    bottom: 7px;
    left: 7px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    padding: 0 9px;
    border-radius: 7px;
    background: rgba(32, 33, 36, .93);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity .14s ease, transform .14s ease;
}

.app-home-print-cover:hover .app-home-print-cover__action,
.app-home-print-cover:focus .app-home-print-cover__action {
    opacity: 1;
    transform: none;
}

.app-home-cover-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    background: linear-gradient(145deg, rgba(237, 28, 36, .08), transparent 48%), #eee;
    color: var(--app-home-ink);
}

.app-home-cover-placeholder small {
    color: var(--app-home-red);
    font-size: 10px;
    font-weight: 900;
}

.app-home-cover-placeholder strong {
    font-size: 12px;
    line-height: 1.16;
    font-weight: 900;
}

.app-home-print-empty {
    position: absolute;
    inset: 0;
}

.app-home-print-empty span {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 155px;
    aspect-ratio: 210 / 297;
    border: 6px solid #fff;
    border-radius: 8px;
    background: #eee;
    box-shadow: 0 17px 35px rgba(0, 0, 0, .12);
}

.app-home-print-empty span:nth-child(1) { transform: translate(-50%, -50%) rotate(2deg); }
.app-home-print-empty span:nth-child(2) { transform: translate(-100%, -42%) rotate(-10deg) scale(.90); }
.app-home-print-empty span:nth-child(3) { transform: translate(0, -42%) rotate(10deg) scale(.90); }

/* ========================================================================
 * KIOSQUE
 * ===================================================================== */

.app-home-kiosk {
    padding: 40px 41px 42px;
    background: #f8f8f7;
}

.app-home-kiosk__head-action {
    display: flex;
    align-items: flex-end;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 8px;
}

.app-home-kiosk__head-action small {
    color: var(--app-home-muted);
    font-size: 9px;
    font-weight: 700;
}

.app-home-kiosk__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    margin-top: 28px;
}

.app-home-kiosk-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--app-home-border);
    border-radius: 15px;
    background: #fff;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.app-home-kiosk-card:hover {
    transform: translateY(-3px);
    border-color: rgba(237, 28, 36, .24);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .07);
}

.app-home-kiosk-card > a {
    display: flex;
    height: 100%;
    flex-direction: column;
    color: var(--app-home-ink);
    text-decoration: none !important;
}

.app-home-kiosk-card__visual {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #ececeb;
}

.app-home-kiosk-card__visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.app-home-kiosk-card__body {
    display: flex;
    min-height: 132px;
    flex: 1;
    flex-direction: column;
    padding: 14px 15px 15px;
}

.app-home-kiosk-card__format {
    color: var(--app-home-red);
    font-size: 8px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.app-home-kiosk-card h3 {
    margin: 8px 0 0;
    color: var(--app-home-ink);
    font-family: "Satoshi", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.18;
    font-weight: 900;
}

.app-home-kiosk-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 15px;
    color: var(--app-home-muted);
    font-size: 9px;
    font-weight: 700;
}

.app-home-kiosk-card:hover .app-home-card-arrow {
    transform: translateX(2px);
    background: var(--app-home-red);
    color: #fff;
}

/* ========================================================================
 * TRACTS.CGT.FR
 * ===================================================================== */

.app-home-tracts {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(430px, 1.08fr);
    gap: 38px;
    padding: 42px;
    border-color: var(--app-home-ink);
    background: var(--app-home-ink);
    color: #fff;
}

.app-home-tracts .app-home-eyebrow {
    color: #aaaeb1;
}

.app-home-tracts h2 {
    color: #fff;
}

.app-home-tracts h2 span {
    color: #ff4d54;
}

.app-home-tracts .app-home-lead {
    color: #c7c9cb;
}

.app-home-tracts__content {
    align-self: center;
}

.app-home-tracts__resources {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.app-home-resource {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    min-height: 94px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 13px;
    background: rgba(255, 255, 255, .05);
    color: #fff !important;
    text-decoration: none !important;
    transition: transform .15s ease, background .15s ease;
}

.app-home-resource[href]:hover,
.app-home-resource[href]:focus {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, .09);
}

.app-home-resource__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #fff;
    color: var(--app-home-ink);
}

.app-home-resource strong,
.app-home-resource small {
    display: block;
}

.app-home-resource strong {
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 900;
}

.app-home-resource small {
    margin-top: 3px;
    color: #b8bbbd;
    font-size: 9px;
    line-height: 1.35;
}

.app-home-resource em {
    position: absolute;
    top: 9px;
    right: 9px;
    padding: 4px 6px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 999px;
    color: #aeb1b3;
    font-size: 7px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.app-home-resource--soon {
    opacity: .82;
}

/* ========================================================================
 * RESPONSIVE
 * ===================================================================== */

@media (max-width: 1050px) {
    .app-home-webtoprint,
    .app-home-tracts {
        grid-template-columns: 1fr;
    }

    .app-home-webtoprint__visual {
        min-height: 285px;
    }

    .app-home-kiosk__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .app-home-sections {
        margin-top: 32px;
        margin-bottom: 38px;
        padding: 0 10px;
    }

    .app-home-block {
        border-radius: 18px;
    }

    .app-home-webtoprint,
    .app-home-kiosk,
    .app-home-tracts {
        padding: 27px 21px;
    }

    .app-home-block-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-home-kiosk__head-action {
        align-items: flex-start;
    }

    .app-home-selection {
        padding: 18px 18px 6px;
    }

    .app-home-selection h2 {
        font-size: 21px;
    }

    .app-home-webtoprint__visual {
        min-height: 250px;
    }

    .app-home-print-cover {
        width: 137px;
    }

    .app-home-tracts__resources {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .app-home-selection__meta {
        font-size: 0;
    }

    .app-home-selection__meta span {
        font-size: 15px;
    }

    .app-home-selection__list,
    .app-home-kiosk__grid {
        grid-template-columns: 1fr;
    }

    .app-home-print-cover--4 {
        display: none;
    }

    .app-home-empty {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-home-sections *,
    .app-home-sections *::before,
    .app-home-sections *::after {
        transition: none !important;
    }
}
