/* ═══════════════════════════════════════════
   DragonsMag — calendrier.css
   Page calendrier des sorties
   Dépend de base.css
═══════════════════════════════════════════ */

/* ════════════════════════════════════════════
   LAYOUT
════════════════════════════════════════════ */
.page-calendrier {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

/* ════════════════════════════════════════════
   EN-TÊTE — navigation + sélecteur de période
════════════════════════════════════════════ */
.cal-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.cal-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.cal-title {
    font-family: var(--fh);
    font-size: clamp(18px, 3vw, 26px);
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.cal-title span { color: var(--accent3); }

/* Navigation mois précédent / suivant */
.cal-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.cal-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--r);
    border: 1px solid var(--border2);
    background: var(--bg3);
    color: var(--text2);
    font-family: var(--fb);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
    white-space: nowrap;
}
.cal-nav-link:hover {
    border-color: var(--accent2);
    color: var(--accent3);
    background: var(--accent-bg);
}
.cal-nav-link svg { width: 14px; height: 14px; }

/* Indicateur mois courant */
.cal-current-badge {
    font-family: var(--fm);
    font-size: 11px;
    color: var(--text3);
    padding: 4px 10px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 99px;
}

/* ── Sélecteur mois/année ── */
.cal-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cal-selector-label {
    font-family: var(--fb);
    font-size: 12px;
    font-weight: 600;
    color: var(--text3);
    white-space: nowrap;
}

.cal-select {
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: var(--r);
    color: var(--text);
    font-family: var(--fb);
    font-size: 13px;
    padding: 7px 12px;
    outline: none;
    cursor: pointer;
    transition: border-color .15s;
    width: auto;
}
.cal-select:focus { border-color: var(--accent2); }
.cal-select option { background: var(--bg3); }

.cal-selector-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: var(--r);
    border: none;
    background: var(--accent);
    color: #fff;
    font-family: var(--fb);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.cal-selector-btn:hover {
    background: var(--accent2);
    transform: translateY(-1px);
}

/* ════════════════════════════════════════════
   STATS RAPIDES
════════════════════════════════════════════ */
.cal-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.cal-stat {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 99px;
    font-family: var(--fb);
    font-size: 12px;
    color: var(--text2);
}
.cal-stat b {
    font-family: var(--fh);
    font-size: 14px;
    font-weight: 700;
    color: var(--accent3);
}

/* ════════════════════════════════════════════
   LISTE DES SORTIES
════════════════════════════════════════════ */
.cal-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* Séparateur de semaine */
.cal-week-sep {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 8px;
}

.cal-week-label {
    font-family: var(--fm);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text3);
    white-space: nowrap;
}

.cal-week-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Carte sortie */
.cal-item {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);
    text-decoration: none;
    transition: all .15s;
    position: relative;
    overflow: hidden;
    border-radius: var(--r);
}
.cal-item:hover {
    background: var(--bg3);
    border-color: var(--accent2);
    border-left-color: var(--accent);
    transform: translateX(3px);
}

/* Couleur du trait gauche selon type produit */
.cal-item.type-jv     { border-left-color: var(--green); }
.cal-item.type-jds    { border-left-color: var(--amber); }
.cal-item.type-anime  { border-left-color: var(--blue); }
.cal-item.type-bd     { border-left-color: var(--accent3); }
.cal-item.type-manga  { border-left-color: var(--accent3); }
.cal-item.type-film   { border-left-color: #e84040; }

/* Image */
.cal-item-img {
    width: 120px;
    height: 160px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--bg4);
    border-right: 1px solid var(--border);
}
.cal-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.cal-item:hover .cal-item-img img { transform: scale(1.04); }

/* Zone droite — date + infos */
.cal-item-right {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

/* Date en bandeau en haut */
.cal-item-date {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg3);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.cal-item-day {
    font-family: var(--fh);
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}
.cal-item-month {
    font-family: var(--fb);
    font-size: 11px;
    font-weight: 600;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* Infos texte */
.cal-item-info {
    flex: 1;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 0;
}

.cal-item-name {
    font-family: var(--fh);
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .15s;
}
.cal-item:hover .cal-item-name { color: var(--accent3); }

.cal-item-original {
    font-family: var(--fb);
    font-size: 12px;
    color: var(--text3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.cal-item-type {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    border: 1px solid var(--border2);
    background: var(--bg4);
    color: var(--text3);
}

.cal-item-type.jv     { background:var(--green-bg);  color:var(--green);   border-color:rgba(74,222,128,.3); }
.cal-item-type.jds    { background:var(--amber-bg);  color:var(--amber);   border-color:rgba(251,191,36,.3); }
.cal-item-type.anime  { background:var(--blue-bg);   color:var(--blue);    border-color:rgba(96,165,250,.3); }
.cal-item-type.bd,
.cal-item-type.manga  { background:var(--accent-bg); color:var(--accent3); border-color:rgba(116,27,71,.3); }
.cal-item-type.film   { background:var(--red-bg);    color:var(--red);     border-color:rgba(248,113,113,.3); }

.cal-item-edition {
    font-size: 12px;
    color: var(--text2);
}

.cal-item-arrow {
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: var(--text3);
    font-size: 20px;
    opacity: 0;
    transition: opacity .15s, transform .15s;
    flex-shrink: 0;
}
.cal-item:hover .cal-item-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* Responsive */
@media (max-width: 640px) {
    .cal-item-img  { width: 80px; height: 110px; }
    .cal-item-name { font-size: 14px; }
    .cal-item-day  { font-size: 17px; }
    .cal-item-info { padding: 10px 12px; }
}

/* ════════════════════════════════════════════
   ÉTAT VIDE
════════════════════════════════════════════ */
.cal-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 12px;
    color: var(--text3);
    text-align: center;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--r);
}

.cal-empty-title {
    font-family: var(--fh);
    font-size: 18px;
    font-weight: 700;
    color: var(--text2);
}

/* ════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════ */
@media (max-width: 640px) {
    .cal-header-top { flex-direction: column; align-items: flex-start; }
    .cal-nav { width: 100%; justify-content: space-between; }
    .cal-selector { width: 100%; }
    .cal-item { padding: 10px 12px; gap: 10px; }
    .cal-item-img { width: 34px; height: 48px; }
    .cal-item-name { font-size: 13px; }
    .cal-item-day { font-size: 18px; }
}
