/* EZ Products — rendu public.
   Les couleurs s'alignent sur les variables des pages de vente
   (--ez-sales-primary) et retombent sur celles d'EzLMS puis sur un défaut. */

.ez-prod-btn-wrap {
    text-align: center;
    margin: 40px 0;
}

.ez-prod-btn {
    display: inline-block;
    padding: 18px 38px;
    border: 0;
    border-radius: 10px;
    background: var(--ez-sales-primary, var(--ez-primary, #6366f1));
    color: #fff !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform .25s ease, filter .25s ease;
    box-shadow: 0 4px 15px var(--ez-sales-primary-glow, rgba(99, 102, 241, .35));
}

.ez-prod-btn:hover {
    transform: translateY(-3px) scale(1.02);
    filter: brightness(1.1);
}

.ez-prod-btn[disabled] {
    opacity: .6;
    cursor: wait;
    transform: none;
}

.ez-prod-btn-main {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
}

.ez-prod-btn-sub {
    display: block;
    margin-top: 5px;
    font-size: .95rem;
    opacity: .85;
}

/* ─── Bloc prix sur la fiche produit ─── */

.ez-prod-buybox {
    margin: 40px 0;
    padding: 30px;
    border: 1px solid rgba(127, 127, 127, .25);
    border-radius: 16px;
    text-align: center;
}

.ez-prod-buybox-price {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -.02em;
}

.ez-prod-buybox-price.ez-prod-free {
    color: #16a34a;
}

.ez-prod-buybox .ez-prod-btn-wrap {
    margin-bottom: 0;
}

/* ─── Contenu débloqué ─── */

.ez-prod-unlocked {
    margin: 30px 0;
    padding: 26px;
    border: 1px solid rgba(22, 163, 74, .35);
    border-radius: 16px;
    background: rgba(22, 163, 74, .06);
}

.ez-prod-unlocked-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 1.05rem;
}

.ez-prod-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
}

.ez-prod-files {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ez-prod-files li {
    margin: 0 0 10px;
}

.ez-prod-files a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 1px solid rgba(127, 127, 127, .25);
    border-radius: 10px;
    background: rgba(127, 127, 127, .06);
    text-decoration: none !important;
    transition: border-color .15s ease, transform .15s ease;
}

.ez-prod-files a:hover {
    border-color: var(--ez-sales-primary, var(--ez-primary, #6366f1));
    transform: translateX(3px);
}

.ez-prod-file-label {
    flex: 1;
    font-weight: 600;
    word-break: break-word;
}

.ez-prod-file-size {
    font-size: .85rem;
    opacity: .6;
    white-space: nowrap;
}

.ez-prod-unlocked-content > *:first-child {
    margin-top: 0;
}

/* ─── Espace « Mes achats » ─── */

.ez-prod-purchase {
    margin-bottom: 40px;
}

.ez-prod-purchase-title {
    margin: 0 0 12px;
    font-size: 1.4rem;
    font-weight: 800;
}

.ez-prod-empty,
.ez-prod-login-notice {
    padding: 40px;
    text-align: center;
    opacity: .75;
}

/* ─── Grille de produits ─── */

.ez-prod-grid-heading {
    text-align: center;
    margin-bottom: 30px;
}

.ez-prod-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.ez-prod-grid[data-columns="2"] {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.ez-prod-grid[data-columns="4"] {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.ez-prod-card {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(127, 127, 127, .25);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(127, 127, 127, .05);
    transition: transform .2s ease, border-color .2s ease;
}

.ez-prod-card:hover {
    transform: translateY(-4px);
    border-color: var(--ez-sales-primary, var(--ez-primary, #6366f1));
}

.ez-prod-card-media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    text-align: center;
}

.ez-prod-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.ez-prod-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 2.5rem;
    opacity: .35;
}

.ez-prod-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    flex: 1;
}

.ez-prod-card-body h3 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.3;
}

.ez-prod-card-body h3 a {
    text-decoration: none !important;
    color: inherit;
}

.ez-prod-card-excerpt {
    margin: 0;
    font-size: .92rem;
    opacity: .75;
}

.ez-prod-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 8px;
}

.ez-prod-card-price {
    font-weight: 800;
    font-size: 1.1rem;
}

.ez-prod-card-link {
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--ez-sales-primary, var(--ez-primary, #6366f1));
    color: #fff !important;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none !important;
}

/* ─── Erreurs de configuration ─── */

.ez-prod-error {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fee2e2;
    color: #b91c1c;
    text-align: center;
}

/* ─── Barre d'aperçu administrateur ─── */

.ez-prod-adminbar {
    margin: 0 0 28px;
    padding: 14px 18px;
    border: 1px dashed rgba(127, 127, 127, .5);
    border-radius: 12px;
    background: rgba(127, 127, 127, .08);
    font-size: .92rem;
    line-height: 1.5;
}

.ez-prod-adminbar-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
}

.ez-prod-adminbar-main span {
    opacity: .8;
}

.ez-prod-adminbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
}

.ez-prod-adminbar-actions a {
    font-weight: 600;
}

.ez-prod-adminbar-note {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(127, 127, 127, .25);
    font-size: .85rem;
    opacity: .75;
}

.ez-prod-unlocked.is-preview {
    border-color: rgba(127, 127, 127, .45);
    background: rgba(127, 127, 127, .06);
}

.ez-prod-unlocked.is-preview .ez-prod-check {
    background: #6b7280;
}
