/* ===== CARTES ACCUEIL & PLANNING ===== */

.card-base {
position: relative;
width: 9.5rem;
height: auto;
perspective: 1000px;
margin: 1rem 0.75rem;
display: flex;
flex-direction: column;
border-radius: 6px;
overflow: hidden;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
transition: box-shadow 0.3s ease, transform 0.3s ease;
}

@media (min-width: 768px) {
.card-base {
    width: 10rem;
    margin: 0.5rem 1rem;
}
}

.card-base a {
display: flex;
flex-direction: column;
text-decoration: none;
height: 100%;
position: relative;
}

.card-base:hover {
transform: translateY(-1px);
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

/* ===== IMAGE CONTAINER (PARTAGÉ) ===== */

.card-image-container {
position: relative;
overflow: hidden;
height: 5rem;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
flex-shrink: 0;
}

@media (min-width: 768px) {
.card-image-container {
    height: 7.2rem;
}
}

.card-image {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
filter: brightness(1) contrast(1.1);
transition: transform 0.2s ease, filter 0.2s ease;
will-change: transform;
}

.card-base a:hover .card-image {
transform: scale(1.02);
filter: brightness(1.02) contrast(1.12);
}

/* Overlay gradient */
.image-overlay {
position: absolute;
inset: 0;
background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(20, 40, 60, 0.4) 100%
);
pointer-events: none;
}

/* Shine effect */
.image-shine {
position: absolute;
inset: 0;
background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0) 50%
);
opacity: 0;
transition: opacity 0.2s ease;
pointer-events: none;
}

.card-base a:hover .image-shine {
opacity: 1;
}

/* ===== BADGES (PARTAGÉ) ===== */

.badge {
position: absolute;
background: linear-gradient(135deg, rgba(80, 90, 110, 0.5), rgba(60, 70, 90, 0.5));
padding: 0.2rem 0.45rem;
border-radius: 4px;
border: 1px solid rgba(150, 160, 180, 0.3);
z-index: 10;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
display: flex;
align-items: center;
justify-content: center;
gap: 0.25rem;
}

@media (min-width: 768px) {
.badge {
    padding: 0.25rem 0.55rem;
}
}

.badge-text {
color: #e5e7eb;
font-size: 0.5rem;
font-weight: 700;
letter-spacing: 0.08em;
display: block;
margin: 0;
}

@media (min-width: 768px) {
.badge-text {
    font-size: 0.6rem;
}
}

.badge-glow {
position: absolute;
inset: -4px;
border-radius: 4px;
background: radial-gradient(circle, rgba(100, 120, 150, 0.3), transparent);
opacity: 0;
transition: opacity 0.2s ease;
pointer-events: none;
}

.card-base a:hover .badge-glow {
opacity: 0.3;
}

/* Badge SCAN (gris) */
.scan-badge {
top: 0.3rem;
left: 0.3rem;
}

/* Badge ANIME (bleu foncé) */
.anime-badge {
top: 0.3rem;
left: 0.3rem;
background: linear-gradient(135deg, rgba(29, 78, 137, 0.8), rgba(15, 40, 71, 0.8));
border-color: rgba(30, 58, 95, 0.5);
}

.anime-card-premium a:hover .anime-badge .badge-glow {
background: radial-gradient(circle, rgba(29, 78, 137, 0.4), transparent);
}

/* Badge langue (haut droit - avec drapeau) */
.language-badge-top {
top: 0.3rem;
right: 0.3rem;
padding: 0.2rem 0.45rem;
}

@media (min-width: 768px) {
.language-badge-top {
    padding: 0.4rem 0.55rem;
}
}

/* Flag icon dans le badge langue */
.flag-icon {
width: 22px;
height: 15px;
object-fit: contain;
display: block;
border-radius: 2px;
margin: 0;
flex-shrink: 0;
}

/* ===== CARD CONTENT (PARTAGÉ) ===== */

.card-content {
padding: 0.75rem 0.6rem;
position: relative;
overflow: hidden;
flex-grow: 1;
display: flex;
flex-direction: column;
border: 1px solid rgba(100, 110, 130, 0.25);
border-top: none;
}

/* Content SCAN (gris) */
.scan-card-premium .card-content {
background: linear-gradient(180deg,rgb(22, 22, 22) 0%, #1f2127 100%);
}

/* Content ANIME (bleu foncé) */
.anime-card-premium .card-content {
background: linear-gradient(180deg,rgb(12, 19, 32) 0%, #081628 100%);
border-color: rgba(29, 78, 137, 0.2);
}

.card-content::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(150, 160, 180, 0.4), transparent);
}

.anime-card-premium .card-content::before {
background: linear-gradient(90deg, transparent, rgba(30, 58, 95, 0.4), transparent);
}

/* ===== TITRE (PARTAGÉ) ===== */

.card-title {
color: #f3f4f6;
font-size: 0.8rem;
font-weight: 700;
text-align: center;
line-height: 1.15;
letter-spacing: 0.05em;
margin: 0;
margin-bottom: 0.5rem;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
word-break: break-word;
transition: color 0.3s ease;
}

@media (min-width: 768px) {
.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    -webkit-line-clamp: 3;
}
}

.card-base a:hover .card-title {
color: #f9fafb;
}

/* ===== DIVIDER (PARTAGÉ) ===== */

.content-divider {
height: 1px;
background: linear-gradient(90deg, transparent, rgba(120, 130, 160, 0.4), transparent);
margin: 0.35rem 0 0.5rem 0;
flex-shrink: 0;
}

.anime-card-premium .content-divider {
background: linear-gradient(90deg, transparent, rgba(30, 58, 95, 0.4), transparent);
}

/* ===== INFO ITEMS (PARTAGÉ) ===== */

.card-info {
display: flex;
flex-direction: column;
gap: 0.35rem;
flex-grow: 1;
justify-content: flex-end;
text-align: center;
}

.info-item {
display: flex;
align-items: center;
justify-content: center;
font-size: 0.65rem;
font-weight: 600;
color: #d1d5db;
padding: 0.3rem 0.4rem;
border-radius: 5px;
transition: all 0.3s ease;
flex-shrink: 0;
}

@media (min-width: 768px) {
.info-item {
    font-size: 0.75rem;
}
}

/* Info Item CHAPTER (SCANS - gris) */
.info-item.chapter {
background: linear-gradient(135deg, rgba(100, 110, 140, 0.4), rgba(80, 90, 120, 0.3));
border: 1px solid rgba(120, 130, 160, 0.3);
}

.scan-card-premium a:hover .info-item.chapter {
background: linear-gradient(135deg, rgba(156, 157, 160, 0.42), rgba(157, 159, 165, 0.32));
border-color: rgba(143, 148, 165, 0.35);
color: #e5e7eb;
}

/* Info Item EPISODE (ANIME - bleu foncé) */
.info-item.episode {
background: linear-gradient(135deg, rgba(29, 78, 137, 0.4), rgba(15, 40, 71, 0.3));
border: 1px solid rgba(30, 58, 95, 0.35);
}

.anime-card-premium a:hover .info-item.episode {
background: linear-gradient(135deg, rgba(37, 99, 235, 0.45), rgba(29, 78, 137, 0.4));
border-color: rgba(59, 130, 246, 0.5);
color: #e5e7eb;
}

/* Release Time (PARTAGÉ) */
.info-item.release-time {
background: linear-gradient(135deg, rgba(80, 100, 120, 0.35), rgba(60, 80, 100, 0.3));
border: 1px solid rgba(100, 120, 140, 0.3);
}

.scan-card-premium a:hover .info-item.release-time {
background: linear-gradient(135deg, rgba(90, 110, 130, 0.37), rgba(70, 90, 110, 0.32));
border-color: rgba(100, 120, 140, 0.35);
color: #e5e7eb;
}

.anime-card-premium a:hover .info-item.release-time {
background: linear-gradient(135deg, rgba(30, 58, 95, 0.45), rgba(15, 40, 71, 0.35));
border-color: rgba(30, 58, 95, 0.5);
color: #e5e7eb;
}

/* ===== ICÔNES SVG HEROICONS ===== */

.info-icon-svg {
width: 12px;
height: 12px;
margin-right: 0.3rem;
flex-shrink: 0;
stroke: #cbd5e1;
fill: none;
transition: stroke 0.3s ease;
}

@media (min-width: 768px) {
.info-icon-svg {
    width: 14px;
    height: 14px;
}
}

.anime-card-premium .info-icon-svg {
stroke: #60a5fa;
}

.scan-card-premium .info-icon-svg {
stroke: #cbd5e1;
}

.time-icon-svg {
width: 12px;
height: 12px;
margin-right: 0.3rem;
flex-shrink: 0;
stroke: #94a3b8;
fill: none;
transition: stroke 0.3s ease;
}

@media (min-width: 768px) {
.time-icon-svg {
    width: 14px;
    height: 14px;
}
}

.anime-card-premium .time-icon-svg {
stroke: #60a5fa;
}

.scan-card-premium .time-icon-svg {
stroke: #94a3b8;
}

/* Hover effects */
.anime-card-premium a:hover .info-icon-svg,
.anime-card-premium a:hover .time-icon-svg {
stroke: #93c5fd;
}

.scan-card-premium a:hover .info-icon-svg,
.scan-card-premium a:hover .time-icon-svg {
stroke: #e5e7eb;
}

/* ===== CATALOGUE CARD (HÉRITE DE CARD-BASE) ===== */

.catalog-card {
position: relative;
width: 9.5rem;
height: auto;
perspective: 1000px;
margin: 0.5rem 0.15rem;
display: flex;
flex-direction: column;
border-radius: 6px;
overflow: visible;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
transition: box-shadow 0.3s ease, transform 0.3s ease;
border: 1px solid rgba(150, 150, 150, 0.15);
}

@media (min-width: 768px) {
.catalog-card {
    width: 13rem;
    margin: 0.5rem 1rem;
}
}

.catalog-card a {
display: flex;
flex-direction: column;
text-decoration: none;
height: 100%;
position: relative;
}

.catalog-card:hover {
transform: translateY(-1px);
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

/* ===== IMAGE CONTAINER ===== */

.catalog-card .card-image-container {
position: relative;
overflow: hidden;
height: 5.5rem;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
flex-shrink: 0;
border-radius: 6px 6px 0 0;
}

@media (min-width: 768px) {
.catalog-card .card-image-container {
    height: 7rem;
}
}

.catalog-card .card-image {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
filter: brightness(1) contrast(1.1);
transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
}

.catalog-card a:hover .card-image {
transform: scale(1.02);
filter: brightness(1.02) contrast(1.12);
}

.catalog-card .image-overlay {
position: absolute;
inset: 0;
background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(20, 40, 60, 0.4) 100%
);
pointer-events: none;
}

.catalog-card .image-shine {
position: absolute;
inset: 0;
background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0) 50%
);
opacity: 0;
transition: opacity 0.4s ease;
pointer-events: none;
}

.catalog-card a:hover .image-shine {
opacity: 1;
}

/* ===== CARD CONTENT (NOIR) ===== */

.catalog-card .card-content {
background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
padding: 0.75rem 0.6rem;
position: relative;
overflow: visible;
flex-grow: 1;
display: flex;
flex-direction: column;
border: 1px solid rgba(60, 60, 60, 0.3);
border-top: none;
border-radius: 0 0 6px 6px;
}

.catalog-card .card-content::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(100, 100, 100, 0.3), transparent);
}

/* ===== TITRE ===== */

.catalog-card .card-title {
color: #f3f4f6;
font-size: 0.85rem;
font-weight: 700;
text-align: center;
line-height: 1.15;
letter-spacing: 0.05em;
margin: 0;
margin-bottom: 0.4rem;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
word-break: break-word;
transition: color 0.3s ease;
text-transform: uppercase;
}

@media (min-width: 768px) {
.catalog-card .card-title {
    font-size: 0.95rem;
    -webkit-line-clamp: 3;
}
}

.catalog-card a:hover .card-title {
color: #ffffff;
}

/* ===== TITRES ALTERNATIFS ===== */

.alternate-titles {
color: #9ca3af;
font-size: 0.7rem;
font-style: italic;
line-height: 1.1;
margin: 0;
margin-bottom: 0.4rem;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
word-break: break-word;
opacity: 0.7;
transition: opacity 0.3s ease;
text-align: center;
}

@media (min-width: 768px) {
.alternate-titles {
    font-size: 0.72rem;
}
}

.catalog-card a:hover .alternate-titles {
opacity: 0.9;
}

/* ===== DIVIDER ===== */

.catalog-card .content-divider {
height: 1px;
background: linear-gradient(90deg, transparent, rgba(100, 100, 100, 0.3), transparent);
margin: 0.35rem 0 0.5rem 0;
flex-shrink: 0;
}

/* ===== CATALOG INFO ===== */

.catalog-info {
display: flex;
flex-direction: column;
gap: 0.35rem;
flex-grow: 1;
justify-content: flex-start;
}

.info-row {
display: flex;
flex-direction: column;
gap: 0.2rem;
font-size: 0.65rem;
}

.info-label {
color: #9ca3af;
font-weight: 700;
letter-spacing: 0.05em;
font-size: 0.7rem;
text-transform: uppercase;
opacity: 0.8;
}

.info-value {
color: #d1d5db;
font-size: 0.7rem;
font-weight: 500;
margin: 0;
line-height: 1.15;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
word-break: break-word;
transition: color 0.3s ease;
}

@media (min-width: 768px) {
.info-value {
    font-size: 0.7rem;
}
}

.catalog-card a:hover .info-value {
color: #e5e7eb;
}

/* ===== SYNOPSIS TOOLTIP ===== */

.synopsis-tooltip {
position: absolute;
bottom: 100%;
left: 0;
right: 0;
width: 100%;
background: linear-gradient(180deg, rgba(26, 26, 26, 0.95), rgba(15, 15, 15, 0.95));
backdrop-filter: blur(8px);
border: 1px solid rgba(100, 120, 150, 0.3);
border-radius: 6px 6px 0 0;
padding: 0.75rem 0.6rem;
margin-bottom: 0;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
pointer-events: none;
z-index: 50;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
box-sizing: border-box;
}

@media (max-width: 767px) {
.synopsis-tooltip {
    display: none;
}
}

.catalog-card:hover .synopsis-tooltip {
opacity: 1;
visibility: visible;
}

.synopsis-label {
display: block;
color: #9ca3af;
font-weight: 700;
letter-spacing: 0.05em;
font-size: 0.6rem;
text-transform: uppercase;
opacity: 0.8;
margin-bottom: 0.5rem;
}

.synopsis-content {
color: #d1d5db;
font-size: 0.7rem;
font-style: italic;
line-height: 1.3;
display: -webkit-box;
-webkit-line-clamp: 5;
-webkit-box-orient: vertical;
overflow: hidden;
word-break: break-word;
}

@media (min-width: 768px) {
.synopsis-content {
    font-size: 0.65rem;
}
}


/* ===== ICÔNES SVG HEROICONS ===== */

.info-icon-svg {
width: 14px;
height: 14px;
margin-right: 0.3rem;
flex-shrink: 0;
stroke: #cbd5e1;
fill: none;
transition: stroke 0.3s ease;
}

.anime-card-premium .info-icon-svg {
stroke: #60a5fa;
}

.scan-card-premium .info-icon-svg {
stroke: #cbd5e1;
}

.time-icon-svg {
width: 14px;
height: 14px;
margin-right: 0.3rem;
flex-shrink: 0;
stroke: #94a3b8;
fill: none;
transition: stroke 0.3s ease;
}

.anime-card-premium .time-icon-svg {
stroke: #60a5fa;
}

.scan-card-premium .time-icon-svg {
stroke: #94a3b8;
}

/* Hover effects */
.anime-card-premium a:hover .info-icon-svg,
.anime-card-premium a:hover .time-icon-svg {
stroke: #93c5fd;
}

.scan-card-premium a:hover .info-icon-svg,
.scan-card-premium a:hover .time-icon-svg {
stroke: #e5e7eb;
}