/* ============================================================
   hijri-miladi.com — styles extraits de index.php
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8f9fa;
    color: #212529;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0,0,0,.10);
    max-width: 620px;
    width: 100%;
    padding: 2.5rem 2rem;
}
.icon { font-size: 3rem; margin-bottom: 1rem; text-align: center; }
h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: .5rem; color: #0d6efd; text-align: center; }
.subtitle { color: #6c757d; font-size: .95rem; margin-bottom: 1.25rem; line-height: 1.6; text-align: center; }
h2 { font-size: 1rem; font-weight: 700; color: #212529; margin: 1.5rem 0 .5rem; }
.features { margin-bottom: 1.5rem; }
.features li {
    list-style: none;
    padding: .35rem 0;
    font-size: .92rem;
    color: #495057;
}
.features li::before { content: "✓ "; color: #0d6efd; font-weight: 700; }
.info-box {
    background: #f0f4ff;
    border-left: 3px solid #0d6efd;
    border-radius: 0 .5rem .5rem 0;
    padding: .85rem 1rem;
    margin-bottom: 1.25rem;
    font-size: .88rem;
    color: #495057;
    line-height: 1.7;
}
.info-box.green { border-color: #198754; background: #f0fff4; }
.info-box strong { color: #212529; }
.en { color: #6c757d; font-style: italic; font-size: .85rem; }
.btn {
    display: block;
    background: #0d6efd;
    color: #fff;
    text-decoration: none;
    padding: .75rem 2rem;
    border-radius: .5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    transition: background .2s;
    margin-top: 1.5rem;
}
.btn:hover { background: #0b5ed7; }
.sep { margin: 1.5rem 0; border: none; border-top: 1px solid #e9ecef; }
.footer { margin-top: 1.5rem; font-size: .8rem; color: #adb5bd; text-align: center; }
.months-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .4rem;
    margin-bottom: 1.25rem;
}
.month-item {
    background: #f8f9fa;
    border-radius: .4rem;
    padding: .3rem .6rem;
    font-size: .8rem;
    color: #495057;
}
.month-item span { color: #6c757d; }

/* ── Section date du jour ──────────────────────────────── */
.today-card {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: #fff;
    border-radius: .75rem;
    padding: .85rem 1rem;
    margin-bottom: 1.25rem;
    text-align: center;
}
.today-hijri { font-size: 1.1rem; font-weight: 700; }
.today-miladi { font-size: .82rem; opacity: .85; margin-top: .2rem; }

/* ── Jours blancs dynamiques (3 cartes) ───────────────── */
.section-dynamic { margin-bottom: 1.25rem; }
.section-dynamic-title {
    font-size: .82rem;
    color: #495057;
    margin-bottom: .5rem;
}
.section-dynamic-title strong { color: #198754; }
.jb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: 1rem; }
.jb-card {
    background: #f0fff4;
    border: 1px solid #b2dfdb;
    border-radius: .5rem;
    padding: .55rem .4rem;
    text-align: center;
    font-size: .8rem;
}
.jb-card.is-today { background: #d4edda; border-color: #198754; font-weight: 700; }
.jb-hijri { font-size: .95rem; font-weight: 700; color: #198754; }
.jb-miladi { color: #495057; margin-top: .2rem; font-size: .75rem; }

/* ── Mini calendrier 10 jours ─────────────────────────── */
.days10-grid {
    display: flex;
    gap: .3rem;
    overflow-x: auto;
    padding-bottom: .25rem;
}
.day10-card {
    flex: 0 0 auto;
    min-width: 50px;
    background: #f8f9fa;
    border-radius: .4rem;
    padding: .4rem .25rem;
    text-align: center;
    font-size: .78rem;
    border: 1px solid #e9ecef;
}
.day10-card.is-today     { background: #0d6efd; color: #fff; border-color: #0d6efd; }
.day10-card.is-today .day10-hijri { color: rgba(255,255,255,.8); }
.day10-card.is-today .day10-dow   { color: rgba(255,255,255,.7); }
.day10-card.is-jour-blanc:not(.is-today) { background: #f0fff4; border-color: #198754; }
.day10-dow    { font-size: .65rem; color: #adb5bd; margin-bottom: .15rem; }
.day10-miladi { font-size: .9rem; font-weight: 700; }
.day10-hijri  { font-size: .72rem; color: #6c757d; }

/* ── Calendrier mensuel hijri ──────────────────────────── */
.cal-section { margin-bottom: 1.5rem; }
.cal-header { font-size: .95rem; font-weight: 700; text-align: center; margin-bottom: .3rem; }
.cal-months { font-size: .78rem; color: #6c757d; text-align: center; margin-bottom: .6rem; }
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.cal-dow {
    text-align: center;
    font-weight: 700;
    font-size: .7rem;
    color: #6c757d;
    padding: .3rem 0;
}
.cal-cell {
    background: #f8f9fa;
    border-radius: .2rem;
    padding: .25rem .1rem;
    text-align: center;
    min-height: 40px;
    border: 1px solid transparent;
}
.cal-cell.empty      { background: transparent; border-color: transparent; }
.cal-cell.is-secondary { opacity: .55; }
.cal-cell.is-today   { background: #0d6efd; color: #fff; border-color: #0d6efd; }
.cal-cell.is-today .cal-hijri { color: rgba(255,255,255,.75); }
.cal-cell.is-jour-blanc:not(.is-today) { background: #f0fff4; border-color: #198754; }
.cal-cell.is-jour-blanc:not(.is-today) .cal-hijri { color: #198754; }
.cal-miladi { font-size: .82rem; font-weight: 600; }
.cal-hijri  { font-size: .65rem; color: #6c757d; }
.cal-legend {
    display: flex;
    gap: .75rem;
    margin-top: .5rem;
    font-size: .7rem;
    color: #6c757d;
    justify-content: center;
}
.cal-legend span { display: flex; align-items: center; gap: .25rem; }
.legend-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}
.legend-today-dot { background: #0d6efd; }
.legend-jb-dot    { background: #f0fff4; border: 1px solid #198754; }

/* ── Cookie Consent Banner ──────────────────────────────────────── */
#cconsent-backdrop {
    position: fixed; inset: 0; z-index: 9997;
    background: rgba(0,0,0,.52); backdrop-filter: blur(3px);
    transition: opacity .4s; pointer-events: auto;
}
#cconsent-bar {
    position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 9998;
    background: #fff; border-radius: 14px; padding: 1rem 1.25rem;
    max-width: 440px; width: calc(100% - 2.5rem);
    box-shadow: 0 8px 32px rgba(0,0,0,.16); font-size: .88rem;
    transition: transform .5s cubic-bezier(.4,0,.2,1), opacity .5s;
}
.ccb--hidden { transform: translateY(calc(100% + 48px)); opacity: 0; pointer-events: none; }
#cconsent-bar .ccb__title { font-weight: 700; font-size: 1rem; margin-bottom: .35rem; color: #212529; }
#cconsent-bar .ccb__text  { color: #495057; line-height: 1.55; margin-bottom: .85rem; }
#cconsent-bar .ccb__actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ccb__btn {
    border: none; cursor: pointer; padding: .5rem 1.1rem;
    border-radius: 8px; font-size: .88rem; font-weight: 600;
    transition: background .2s;
}
.ccb__btn--accept  { background: #0d6efd; color: #fff; }
.ccb__btn--accept:hover  { background: #0b5ed7; }
.ccb__btn--settings { background: #f0f0f0; color: #333; }
.ccb__btn--settings:hover { background: #e0e0e0; }
.ccb__link { font-size: .78rem; color: #888; text-decoration: underline; cursor: pointer; background: none; border: none; padding: 0; }

/* ── Cookie Consent Modal ────────────────────────────────────────── */
#cconsent-modal {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,.6); align-items: center; justify-content: center; padding: 1rem;
}
#cconsent-modal.ccm--visible { display: flex; }
.ccm__box {
    background: #fff; border-radius: 14px; max-width: 520px; width: 100%;
    max-height: 90vh; overflow-y: auto; padding: 1.5rem;
}
.ccm__title { font-weight: 700; font-size: 1.1rem; margin-bottom: .75rem; }
.ccm__category {
    border: 1px solid #e9ecef; border-radius: 8px;
    padding: .75rem 1rem; margin-bottom: .5rem;
    display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
}
.ccm__category-info strong { display: block; font-size: .92rem; margin-bottom: .2rem; }
.ccm__category-info small  { color: #6c757d; font-size: .8rem; line-height: 1.45; }
.ccm__toggle { flex-shrink: 0; padding-top: .1rem; }
.ccm__toggle input[type=checkbox] { width: 42px; height: 24px; cursor: pointer; accent-color: #0d6efd; }
.ccm__toggle input[disabled] { opacity: .5; cursor: default; }
.ccm__actions { display: flex; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; }

/* ── YouTube consent placeholder ─────────────────────────────────── */
.consent-optout-yt {
    background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 8px;
    padding: 1.25rem; text-align: center; font-size: .88rem; color: #495057;
    margin: .5rem 0;
}
.consent-optout-yt a { color: #0d6efd; cursor: pointer; text-decoration: underline; }

/* ── 12 mini-calendriers hijri (Phase 5) ────────────────────────────────── */
.hijri-year-section { margin: 1.5rem 0; }
.hijri-year-section h2 { font-size: 1rem; font-weight: 700; color: #212529; margin-bottom: .25rem; }
.hijri-year-section h2 small { font-weight: 400; font-size: .8em; color: #6c757d; }

.hijri-year-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin-top: .75rem; }
@media (max-width: 768px) { .hijri-year-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .hijri-year-grid { grid-template-columns: repeat(2, 1fr); gap: .4rem; } }

.hijri-month-card { border: 1px solid #e9ecef; border-radius: .5rem; overflow: hidden; transition: box-shadow .15s; }
.hijri-month-card:hover { box-shadow: 0 2px 8px rgba(13,110,253,.15); }
.hijri-month-card.is-current { border-color: #0d6efd; background: #f0f4ff; }

.hijri-month-link { display: block; text-decoration: none; color: inherit; padding: .45rem .5rem; }
.hijri-month-header { display: flex; align-items: center; gap: .3rem; margin-bottom: .1rem; }
.hijri-month-num { font-size: .68rem; color: #adb5bd; font-weight: 700; min-width: 1.1rem; }
.hijri-month-name { font-size: .75rem; font-weight: 700; color: #0d6efd; flex: 1; }
.hijri-month-badge { font-size: .6rem; background: #0d6efd; color: #fff; border-radius: .75rem; padding: .1rem .35rem; white-space: nowrap; }
.hijri-month-name-ar { font-size: .72rem; color: #495057; text-align: right; direction: rtl; margin-bottom: .1rem; }
.hijri-month-dates { font-size: .65rem; color: #6c757d; margin-bottom: .3rem; }

/* Mini-grille 7 colonnes */
.hijri-month-mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; font-size: .6rem; text-align: center; }
.hijri-mini-dow { color: #6c757d; font-weight: 700; padding: .1rem 0; font-size: .58rem; }
.hijri-mini-cell { padding: .1rem 0; color: #495057; }
.hijri-mini-cell.empty { background: transparent; }
.hijri-mini-cell.jb { background: #cfe2ff; color: #0a58ca; border-radius: 2px; font-weight: 700; }
.hijri-month-count { font-size: .62rem; color: #adb5bd; text-align: right; margin-top: .25rem; }

/* ── Page individuelle mois hijri (mois.php) ────────────────────────────────── */
.breadcrumb { font-size: .8rem; color: #6c757d; margin-bottom: .5rem; }
.breadcrumb a { color: #0d6efd; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.month-page-title { font-size: 1.5rem; font-weight: 700; margin: .25rem 0 .1rem; }
.month-page-num { color: #adb5bd; font-weight: 400; margin-right: .2rem; }
.month-page-year { color: #6c757d; font-size: 1rem; font-weight: 400; margin-left: .3rem; }
.month-page-ar { font-size: 1.1rem; color: #495057; text-align: right; direction: rtl; margin: 0 0 .3rem; }
.month-page-dates { font-size: .82rem; color: #6c757d; margin-bottom: .75rem; }

/* Navigation prev / next */
.month-nav { display: flex; justify-content: space-between; align-items: center; margin: .5rem 0 1rem; gap: .5rem; }
.month-nav a { text-decoration: none; color: #0d6efd; font-size: .82rem; display: flex; align-items: center; gap: .25rem; }
.month-nav a:hover { text-decoration: underline; }
.month-nav-home { color: #6c757d !important; font-size: 1rem !important; }

/* Calendrier mensuel moyen (plus grand que le mini, plus compact que le full) */
.month-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin: .25rem 0 .75rem; }
.month-cal-dow { text-align: center; font-size: .72rem; color: #6c757d; font-weight: 700; padding: .25rem 0; }
.month-cal-cell { text-align: center; font-size: .88rem; padding: .35rem .1rem; border-radius: 4px; color: #212529; }
.month-cal-cell.empty { background: transparent; }
.month-cal-cell.jb { background: #cfe2ff; color: #0a58ca; font-weight: 700; }
.month-cal-cell.is-today { background: #198754; color: #fff !important; font-weight: 700; border-radius: 50%; }

/* Section jours blancs */
.month-jb-section { margin: .5rem 0 1rem; }
.month-jb-title { font-size: .88rem; font-weight: 700; color: #212529; margin-bottom: .5rem; }
.month-jb-title i { color: #0d6efd; margin-right: .3rem; }
