/* ══════════════════════════════════════════════════════
   DIPLOMA.CSS — Certificats & Attestations plastifiés
   L'image du certificat prend toute la carte
   ══════════════════════════════════════════════════════ */

/* ── Grid layouts ──────────────────────────────────── */
.diploma-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
}

.diploma-grid--compact {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ── Base diploma card ─────────────────────────────── */
.diploma-card {
    position: relative;
    background: #a08050;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    box-shadow:
        0 6px 20px rgba(0,0,0,.15),
        0 2px 6px rgba(0,0,0,.08);
    transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s ease;
    overflow: hidden;
}

.diploma-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow:
        0 18px 40px rgba(0,0,0,.2),
        0 6px 12px rgba(0,0,0,.1);
}

/* Lamination gloss */
.diploma-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        125deg,
        transparent 0%,
        rgba(255,255,255,.2) 25%,
        transparent 50%,
        rgba(255,255,255,.1) 75%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 3;
    opacity: .6;
    border-radius: 10px;
    transition: opacity .4s ease;
}

.diploma-card:hover::before { opacity: .85; }

/* ── Image zone — prend toute la carte ─────────────── */
.diploma-card__img {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    overflow: hidden;
    background: #f9f5e8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.diploma-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.diploma-card:hover .diploma-card__img img {
    transform: scale(1.03);
}

/* Placeholder quand pas d'image */
.diploma-card__img-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    background: linear-gradient(155deg, #fffef7 0%, #f9f5e8 50%, #f5eed8 100%);
    border: 2px dashed rgba(201,168,76,.3);
    border-radius: 4px;
    padding: 24px;
    text-align: center;
}

.diploma-card__img-placeholder i {
    font-size: 36px;
    color: #c9a84c;
    opacity: .5;
}

.diploma-card__img-placeholder span {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 13px;
    color: #8b7335;
    opacity: .6;
    line-height: 1.4;
    max-width: 180px;
}

/* ── Small info bar under image ────────────────────── */
.diploma-card__info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 4px 2px;
    position: relative;
    z-index: 2;
}

.diploma-card__info-text {
    flex: 1;
    min-width: 0;
}

.diploma-card__title {
    font-family: 'Cascadia Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    line-height: 1.3;
}

.diploma-card__org {
    font-family: 'Cascadia Mono', monospace;
    font-size: 9px;
    color: rgba(255,255,255,.6);
    letter-spacing: .5px;
    margin: 0;
}

/* ── Mini thumbnails indicator ─────────────────────── */
.diploma-card__peek {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 4;
    display: flex;
    gap: 4px;
}

.diploma-card__peek-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
}

/* ── Attestation variant (blue-grey) ───────────────── */
.diploma-card--attestation {
    background: #4a6a8a;
}

.diploma-card--attestation .diploma-card__img-placeholder {
    background: linear-gradient(145deg, #f8fcff 0%, #eef5fb 50%, #e8f0f8 100%);
    border-color: rgba(61,122,181,.3);
}

.diploma-card--attestation .diploma-card__img-placeholder i {
    color: #3d7ab5;
}

.diploma-card--attestation .diploma-card__img-placeholder span {
    color: #2a5f91;
}

/* Rank badge */
.diploma-card__rank {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 4;
    font-family: 'Cascadia Mono', monospace;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 3px;
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 1024px) {
    .diploma-grid--compact { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (max-width: 768px) {
    .diploma-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .diploma-card { padding: 12px; }
}

@media (max-width: 480px) {
    .diploma-grid,
    .diploma-grid--compact { grid-template-columns: 1fr; }
}
