/* --- PAGE SCRIPTS --- */
.scripts-page {
    /* On décale vers le bas pour ne pas passer sous le header */
    padding: calc(var(--header-height) + 30px) 20px 60px;
    min-height: 100dvh;
}

.scripts-container {
    max-width: var(--app-max-width);
    margin: 0 auto;
}

.scripts-header {
    text-align: center;
    margin-bottom: 50px;
}

.scripts-header h1 {
    font-size: 3rem;
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
}

.scripts-header h1 span {
    background: var(--ui-gradient); /* */
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.scripts-header p {
    font-size: 1.1rem;
    opacity: 0.7;
    margin-top: 10px;
    font-weight: 500;
}

/* --- LA GRILLE --- */
.scripts-grid {
    display: grid;
    /* Crée automatiquement des colonnes d'au moins 320px */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* --- LA CARTE --- */
.script-card {
    background: transparent;
    border: 1px solid #fff1;
    outline-offset: 0;
    border-radius: 16px;
    padding: 10px;
    display: flex;
    position: relative;
    flex-direction: column;
    will-change: transform;
    transition: all ease 0.3s;
}

.script-card::before{
    content: ""; inset: 0;
    position: absolute;
    background: var(--bg);
    border-radius: inherit;
    z-index: -1; opacity: 0.9;
    transition: all linear 0.3s;
}

.script-card::after{
    content: ""; inset: -2px;
    position: absolute;
    background: var(--ui-gradient);
    border-radius: 18px;
    z-index: -2;
    opacity: 0; transition: all linear 0.3s;
}

.script-card:hover::after{opacity: 1;}

.script-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--ui-gradient);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Conteneur de l'image dans la carte */
.script-card-img-container {
    width: 100%;
    height: 180px;
    background: #0003;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    border-bottom: 1px solid #fff1;
}

.script-card-img {
    width: 100%;
    z-index: 1;
    height: 100%;
    object-fit: cover;
}


.fallback-title {
    position: absolute;
    font-size: 1.4rem;
    font-weight: 900;
    text-transform: uppercase;
    font-style: italic;
    color: var(--text-light);
    z-index: 100;
    text-align: center;
    padding: 15px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.script-card-content {
    padding: 6px;
    display: flex;
    flex-direction: column;
    will-change: transform;
    flex: 1; /* Permet au bouton de rester en bas si les textes ont des tailles différentes */
}

.script-card-title {
    will-change: transform;
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.script-card-bio {
    font-size: 0.95rem;
    opacity: 0.7;
    will-change: transform;
    line-height: 1.6;
    margin-bottom: 25px;
    flex: 1; /* Pousse le bouton vers le bas */
}

.script-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    color: var(--text-light);
    opacity: 0.8;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    outline: 1px solid #fff1;
    text-transform: uppercase;
    transition: all 0.2s;
}

.script-card-btn:hover {
    background: #fff1;
    opacity: 1;
}


.pagination-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.page-btn {
    background: transparent;
    border: 1px solid #fff1;
    color: var(--text-light);
    width: 45px;
    height: 45px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background: #fff1;
}

.page-btn.active {
    background: var(--text-light);
    color: var(--text-dark);
    border: none;
}



