/* ============================================================================
   IKOTACHI.COM — Design System Noir & Or
   ============================================================================ */

:root {
    --ikotachi-noir: #000000;
    --ikotachi-noir-clair: #1a1a1a;
    --ikotachi-or: #D4AF37;
    --ikotachi-or-clair: #E8C766;
    --ikotachi-blanc: #FFFFFF;
    --ikotachi-gris-fond: #F7F7F5;
    --ikotachi-gris-texte: #555555;
    --ikotachi-ombre: 0 2px 12px rgba(0, 0, 0, 0.08);
    --ikotachi-rayon: 8px;
}

/* ============================================================================
   1. TYPOGRAPHIE & BASE
   ============================================================================ */
body {
    background-color: var(--ikotachi-gris-fond);
    color: #222;
}

h1, h2, h3 {
    color: var(--ikotachi-noir);
    font-weight: 700;
}

a {
    color: var(--ikotachi-noir);
}
a:hover {
    color: var(--ikotachi-or);
}

/* ============================================================================
   2. BOUTONS
   ============================================================================ */
.dokan-btn,
.ikotachi-btn,
button.dokan-btn {
    background-color: var(--ikotachi-noir) !important;
    color: var(--ikotachi-or) !important;
    border: 1px solid var(--ikotachi-noir) !important;
    border-radius: var(--ikotachi-rayon) !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px !important;
    transition: all 0.25s ease;
}
.dokan-btn:hover,
.ikotachi-btn:hover {
    background-color: var(--ikotachi-or) !important;
    color: var(--ikotachi-noir) !important;
    border-color: var(--ikotachi-or) !important;
}
.dokan-btn-theme {
    background-color: var(--ikotachi-or) !important;
    color: var(--ikotachi-noir) !important;
    border-color: var(--ikotachi-or) !important;
}
.dokan-btn-theme:hover {
    background-color: var(--ikotachi-noir) !important;
    color: var(--ikotachi-or) !important;
}
.dokan-btn-sm {
    padding: 6px 12px !important;
    font-size: 11px !important;
}
.dokan-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================================================
   3. CARTES & GRILLES (bibliothèque, catalogue, stats)
   ============================================================================ */
.ikotachi-grille-bibliotheque {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.ikotachi-carte-livre {
    background: var(--ikotachi-blanc);
    border-radius: var(--ikotachi-rayon);
    box-shadow: var(--ikotachi-ombre);
    overflow: hidden;
    text-align: center;
    padding-bottom: 16px;
    border-top: 3px solid var(--ikotachi-or);
    transition: transform 0.2s ease;
}
.ikotachi-carte-livre:hover {
    transform: translateY(-4px);
}
.ikotachi-carte-livre img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    margin-bottom: 12px;
}
.ikotachi-carte-livre h3 {
    font-size: 15px;
    margin: 0 12px 6px;
}
.ikotachi-auteur-nom {
    color: var(--ikotachi-gris-texte);
    font-size: 13px;
    margin-bottom: 12px;
}

.ikotachi-cartes-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 20px 0;
}
.ikotachi-carte {
    background: var(--ikotachi-noir);
    color: var(--ikotachi-blanc);
    border-radius: var(--ikotachi-rayon);
    padding: 20px;
    text-align: center;
    border-bottom: 3px solid var(--ikotachi-or);
}
.ikotachi-carte-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--ikotachi-or);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.ikotachi-carte-valeur {
    display: block;
    font-size: 24px;
    font-weight: 700;
}
.ikotachi-carte-valeur-sm {
    font-size: 15px;
}

.ikotachi-carte-comite {
    box-shadow: var(--ikotachi-ombre);
    border-radius: var(--ikotachi-rayon);
    border-left: 4px solid var(--ikotachi-or) !important;
}

/* ============================================================================
   4. TABLEAUX
   ============================================================================ */
.dokan-table,
.ikotachi-table-catalogue,
.ikotachi-table-auteurs,
.ikotachi-table-historique,
.ikotachi-table-coupons,
.ikotachi-table-avis,
.ikotachi-table-releves {
    width: 100%;
    border-collapse: collapse;
    background: var(--ikotachi-blanc);
    box-shadow: var(--ikotachi-ombre);
    border-radius: var(--ikotachi-rayon);
    overflow: hidden;
    margin: 16px 0;
}
.dokan-table thead,
.ikotachi-table-catalogue thead,
.ikotachi-table-auteurs thead,
.ikotachi-table-historique thead,
.ikotachi-table-coupons thead,
.ikotachi-table-avis thead,
.ikotachi-table-releves thead {
    background: var(--ikotachi-noir);
    color: var(--ikotachi-or);
}
.dokan-table th,
.dokan-table td,
.ikotachi-table-catalogue th, .ikotachi-table-catalogue td,
.ikotachi-table-auteurs th, .ikotachi-table-auteurs td,
.ikotachi-table-historique th, .ikotachi-table-historique td,
.ikotachi-table-coupons th, .ikotachi-table-coupons td,
.ikotachi-table-avis th, .ikotachi-table-avis td,
.ikotachi-table-releves th, .ikotachi-table-releves td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

/* ============================================================================
   5. BADGES DE STATUT
   ============================================================================ */
.ikotachi-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

/* ============================================================================
   6. FORMULAIRES
   ============================================================================ */
.ikotachi-form-box {
    background: var(--ikotachi-blanc);
    border: 1px solid #e5e5e5;
    border-left: 4px solid var(--ikotachi-or);
    border-radius: var(--ikotachi-rayon);
    padding: 20px;
    margin: 16px 0;
}
.ikotachi-form-box input[type="text"],
.ikotachi-form-box input[type="number"],
.ikotachi-form-box textarea,
.dokan-form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 12px;
}
.ikotachi-catalogue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.ikotachi-note-auto {
    color: var(--ikotachi-gris-texte);
    font-size: 13px;
    font-style: italic;
}

/* ============================================================================
   7. POPUPS (Revue mensuelle + Mode Pressing)
   ============================================================================ */
.ikotachi-popup-revue,
.ikotachi-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ikotachi-popup-revue-fond,
.ikotachi-popup::before {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    content: "";
}
.ikotachi-popup-revue-contenu,
.ikotachi-popup-contenu {
    position: relative;
    z-index: 2;
    background: var(--ikotachi-noir);
    border: 2px solid var(--ikotachi-or);
    border-radius: var(--ikotachi-rayon);
    padding: 30px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    color: var(--ikotachi-blanc);
}
.ikotachi-popup-revue-contenu img {
    max-width: 100%;
    max-height: 55vh;
    margin-bottom: 15px;
    border-radius: 4px;
}
#ikotachi-fermer-popup-revue,
.ikotachi-popup-fermer {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: var(--ikotachi-or);
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
}
.ikotachi-popup-revue-boutons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}
.ikotachi-popup-contenu h2 {
    color: var(--ikotachi-or);
}

/* ============================================================================
   8. PAGES PUBLIQUES AUTEUR / MAISON
   ============================================================================ */
.ikotachi-entete-auteur {
    text-align: center;
    padding: 40px 20px;
    background: var(--ikotachi-noir);
    color: var(--ikotachi-blanc);
    border-radius: var(--ikotachi-rayon);
    margin-bottom: 30px;
}
.ikotachi-photo-ronde-grande {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--ikotachi-or);
    margin-bottom: 16px;
}
.ikotachi-entete-auteur h1 {
    color: var(--ikotachi-blanc);
}
.ikotachi-bio-auteur {
    max-width: 600px;
    margin: 12px auto 0;
    color: #ddd;
}
.ikotachi-reseaux-auteur {
    margin-top: 16px;
}
.ikotachi-reseaux-auteur a {
    color: var(--ikotachi-or);
    margin: 0 8px;
    font-size: 20px;
}

/* ============================================================================
   9. BLOC "À PROPOS" (fiche livre)
   ============================================================================ */
.ikotachi-bloc-a-propos {
    margin-top: 40px;
    padding: 20px;
    background: var(--ikotachi-blanc);
    border-radius: var(--ikotachi-rayon);
    border-top: 3px solid var(--ikotachi-or);
}
.ikotachi-a-propos-contenu {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
}
.ikotachi-photo-ronde-petite {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* ============================================================================
   10. NOTIFICATIONS
   ============================================================================ */
.ikotachi-liste-notifs {
    list-style: none;
    margin: 16px 0;
    padding: 0;
}
.ikotachi-liste-notifs li {
    background: var(--ikotachi-blanc);
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 4px solid var(--ikotachi-or);
    font-size: 14px;
}
.ikotachi-liste-notifs li small {
    display: block;
    color: var(--ikotachi-gris-texte);
    font-size: 11px;
    margin-top: 4px;
}
.ikotachi-notif-lue {
    opacity: 0.6;
    border-left-color: #ccc !important;
}

/* ============================================================================
   11. PARTAGE
   ============================================================================ */
.ikotachi-boutons-partage,
.ikotachi-partage-article {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 16px 0;
}
.ikotachi-boutons-partage a,
.ikotachi-partage-article a {
    background: var(--ikotachi-noir);
    color: var(--ikotachi-or);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ikotachi-boutons-partage a:hover,
.ikotachi-partage-article a:hover {
    background: var(--ikotachi-or);
    color: var(--ikotachi-noir);
}

/* ============================================================================
   12. BARRE DE PROGRESSION (Objectifs)
   ============================================================================ */
.ikotachi-barre-progression {
    width: 100%;
    height: 18px;
    background: #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}
.ikotachi-barre-remplie {
    height: 100%;
    background: linear-gradient(90deg, var(--ikotachi-or), var(--ikotachi-or-clair));
    transition: width 0.4s ease;
}

/* ============================================================================
   13. LECTEUR PDF (Chapitre)
   ============================================================================ */
.ikotachi-lecteur-pdf-wrap {
    max-width: 850px;
    margin: 0 auto;
    padding: 20px;
}
#ikotachi-lecteur-pdf canvas {
    display: block;
    margin: 0 auto 16px;
    box-shadow: var(--ikotachi-ombre);
    max-width: 100%;
    height: auto !important;
}

/* ============================================================================
   14. RESPONSIVE
   ============================================================================ */
@media (max-width: 768px) {
    .ikotachi-grille-bibliotheque {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .ikotachi-cartes-stats {
        grid-template-columns: 1fr 1fr;
    }
    .ikotachi-catalogue-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .ikotachi-a-propos-contenu {
        flex-direction: column;
        text-align: center;
    }
}
