@font-face {
    font-family: 'CCUltimatum';
    src: url('../font/cc-ultimatum-regular.otf') format('truetype'); /* chemin relatif depuis style.css */
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'RedHatDisplay';
    src: url('../font/RedHatDisplay-VariableFont_wght.ttf') format('truetype'); /* chemin relatif depuis style.css */
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'CCUltimatum';
    background-color: #100728;
    color: white;
}

.card-name {
    font-size: 48px;
    color: darkred;
    text-align: center;
}

.card_card{
    display: flex;
}

.card_desc {
    font-size: 20px;
    font-family: 'RedHatDisplay';

}

.card-image {
    width: 300px;
    display: block;
    margin: 20px auto;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 20px;
}

.card_group {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

#cardCanvas {
    flex-shrink: 0;      /* ← empêche le canvas de rétrécir */
    width: 544px;
    height: 600px;
    display: block;
}

.card_cost {
    position: absolute;

    top: 10px;      /* change ici */
    left: 10px;     /* change ici */

    background: gold;
    color: black;

    font-weight: bold;
    font-size: 22px;

    padding: 6px 10px;
    border-radius: 50%;

    box-shadow: 0 0 6px rgba(0,0,0,0.4);

    z-index: 2;
}

p.card_title_desc {
    font-size: 30px;
    font-style: italic;
    font-weight: bold;
    margin-bottom: 5px;
    font-family: 'CCUltimatum';
}

.table-left {
    display: inline-block;
    margin-left: 40px;
    margin-top: 20px;
    max-height: 650px;
    overflow-y: auto;
}

.table-left table {
    width: auto;
    border-collapse: collapse;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    font-size: 14px;
    color: #dbeafe;
}

.table-left thead th {
    text-align: left;
    padding: 14px 18px;
    font-weight: 600;
    color: #93c5fd;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    letter-spacing: 0.3px;
}

.table-left tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: background 0.15s ease;
}

.table-left tbody tr:hover {
    background: rgba(255,255,255,0.04);
}

.table-left td,
.table-left th {
    padding: 12px 18px;
    vertical-align: top;
}

.table-left tbody th {
    font-weight: 500;
    color: #e0e7ff;
    white-space: nowrap;
}

.table-left td.description {
    white-space: normal;
    max-width: 480px;
    line-height: 1.45;
    color: #e5e7eb;
}

.meta {
    color: #64748b;
    font-size: 12px;
}

.up {
    color: #22c55e;
    font-weight: 700;
}

.down {
    color: #ef4444;
    font-weight: 700;
}

.keyword {
    color: #38bdf8;
    font-weight: 600;
}

.released {
    color: #34d399;
    font-weight: 700;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255,255,255,0.08);
    margin-right: 6px;
}

.cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    align-items: center;
}

.card_card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 272px;
}

.card-canvas {
    display: block;
    width: 272px;
    height: 300px;
    transition: transform 0.15s ease;
}

canvas.card-canvas {
    margin-bottom: 5px;
}

.card-canvas:hover {
    transform: scale(1.04);
}

.card-title {
    margin-top: 10px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    color: #e5e7eb;
    font-size: 14px;
}

.card-title:hover {
    color: #93c5fd;
}

.extension-block {
    margin-bottom: 40px;
}

.extension-title {
    font-size: 28px;
    color: #fbbf24; /* un doré pour faire ressortir */
    margin-left: 20px;
    margin-bottom: 15px;
    font-family: 'CCUltimatum';
}

.cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-left: 20px;
}

.card_effect {
    max-width: 25vw; /* 25% de la largeur de la fenêtre */
    word-wrap: break-word; /* casse les mots si besoin */
    overflow-wrap: break-word;
}

.extension-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.extension-content.collapsed {
    display: none;
}

/* grille des extensions */
.extensions-grid {
    display: grid;
    gap: 24px;
}

/* bloc extension */
.extension-block {
    border-radius: 12px;
    padding: 16px;
}

/* header fixe */
.extension-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 48px; /* clé pour l’alignement */
}

.extension-content {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    transition:
        max-height 0.55s cubic-bezier(.34,1.56,.64,1),
        opacity 0.25s ease,
        transform 0.55s cubic-bezier(.34,1.56,.64,1);
}

.extension-content.open {
    opacity: 1;
    transform: translateY(0);
}

/* contenu pliable */
.extension-content.collapsed {
    display: none;
}

/* grille des cartes */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 272px);
    gap: 16px;
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* flèche */
.arrow {
    display: inline-block;
    transition: transform 0.45s cubic-bezier(.34,1.56,.64,1);
}

.toggle-btn.open .arrow {
    transform: rotate(180deg) scale(1.15);
}

.card-count {
    font-size: 0.9em;
    opacity: 0.7;
    margin-left: 8px;
}

.extension-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.btn-modern {
    padding: 14px 26px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;

    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 10px 25px rgba(99,102,241,0.35);

    transition: all 0.25s ease;
    }

.btn-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 35px rgba(99,102,241,0.5);
    filter: brightness(1.08);
}

.btn-modern:active {
    transform: translateY(0);
    box-shadow: 0 6px 15px rgba(99,102,241,0.35);
}

.btn_back {
    margin: 20px 0 0 20px;
}

.btn-cards {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 8px;
    background: transparent;
    transition: all 0.2s ease;
    display: inline-block;
}

.btn-cards:hover {
    border-color: white;
    transform: translateX(-3px);
}

.btn-cards:active {
    transform: translateX(-1px);
}
