/* ==========================================================================
   jeux_de_role.css — Jeux de rôle
   Thème : parchemin, dark fantasy médiévale, dés polyédriques
   ========================================================================== */

* { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family: 'EB Garamond', 'Crimson Pro', 'Cormorant Garamond', Georgia, serif;
    line-height: 1.7;
    color: #2a1f12;
    background: #1a1612;
    background-image:
        radial-gradient(ellipse at 20% 0%, #3a2a1a 0%, #1a1612 60%),
        radial-gradient(ellipse at 80% 100%, #2a1a0a 0%, transparent 70%);
    min-height: 100vh;
}

.jdr-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #d4b87a;
    text-decoration: none;
    font-size: 0.95em;
    border-bottom: 1px solid #8a6f3a;
    font-style: italic;
}
.back-link:hover { color: #f5d896; }

/* HERO ====================================================================== */
.jdr-hero {
    background: linear-gradient(180deg, #2a1f12 0%, #1a1208 100%);
    color: #e8c878;
    padding: 60px 30px;
    text-align: center;
    border: 3px double #8a6f3a;
    margin-bottom: 30px;
    box-shadow: 0 12px 40px rgba(0,0,0,.7), inset 0 0 80px rgba(0,0,0,.6);
    position: relative;
}

.jdr-hero::before, .jdr-hero::after {
    content: '✦';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #8a6f3a;
    font-size: 1.4em;
}
.jdr-hero::before { left: 22px; }
.jdr-hero::after  { right: 22px; }

.jdr-hero h1 {
    font-family: 'Cinzel', 'EB Garamond', serif;
    font-size: 3.2em;
    font-weight: 700;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 12px;
    text-shadow: 0 0 20px rgba(232,200,120,.3);
}

.jdr-hero .tagline {
    font-style: italic;
    font-size: 1.15em;
    color: #c4a868;
    letter-spacing: 1px;
}

.jdr-hero .ornement {
    font-size: 1.2em;
    color: #8a6f3a;
    margin: 16px 0 4px;
    letter-spacing: 8px;
}

/* SECTIONS = PARCHMENT ====================================================== */
.section {
    background: #f1e4c7;
    background-image:
        radial-gradient(ellipse at top left, #fff7e0 0%, transparent 40%),
        radial-gradient(ellipse at bottom right, #d4c19a 0%, transparent 50%),
        repeating-linear-gradient(0deg, transparent 0 28px, rgba(140,110,60,.05) 28px 29px);
    color: #2a1f12;
    padding: 32px 36px;
    margin-bottom: 26px;
    border-radius: 4px;
    box-shadow: 0 8px 28px rgba(0,0,0,.5),
                inset 0 0 80px rgba(140,110,60,.15);
    position: relative;
    border: 1px solid #8a6f3a;
}

.section::before {
    /* Coin abîmé */
    content: '';
    position: absolute;
    top: -1px; right: -1px;
    width: 30px; height: 30px;
    background: linear-gradient(225deg, #1a1612 0%, #1a1612 50%, transparent 50%);
}

.section h2 {
    font-family: 'Cinzel', 'EB Garamond', serif;
    font-size: 1.7em;
    color: #5a2a12;
    margin-bottom: 14px;
    border-bottom: 2px solid #8a6f3a;
    padding-bottom: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.section h3 {
    font-family: 'Cinzel', 'EB Garamond', serif;
    font-size: 1.2em;
    color: #7a3a1a;
    margin: 18px 0 8px;
    font-weight: 600;
    letter-spacing: 1px;
}

.section p { margin-bottom: 12px; }
.section p::first-letter {
    /* Optionnel — on n'applique pas systématiquement */
}
.section ul, .section ol { margin: 10px 0 14px 28px; }
.section li { margin-bottom: 6px; }
.section strong { color: #5a2a12; }
.section em { color: #4a2a18; }

.section a {
    color: #5a2a12;
    text-decoration: underline wavy;
}

/* DICE / D20 ================================================================ */
.dice-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 18px 0;
}

.die {
    width: 78px;
    height: 78px;
    background: linear-gradient(135deg, #5a2a12 0%, #2a1208 100%);
    color: #e8c878;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    border: 2px solid #8a6f3a;
    box-shadow: 0 6px 14px rgba(0,0,0,.5), inset 0 2px 4px rgba(232,200,120,.2);
    text-align: center;
    line-height: 1.1;
}
.die .die-name { font-size: 0.85em; letter-spacing: 1px; }
.die .die-faces { font-size: 0.7em; color: #c4a868; font-weight: 400; font-style: italic; margin-top: 4px; }

/* d20 mis en avant : forme hexagonale stylisée */
.d20-big {
    width: 110px;
    height: 110px;
    background: radial-gradient(circle at 30% 30%, #7a3a1a 0%, #3a1608 70%);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    color: #f5d896;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-size: 2.4em;
    font-weight: 700;
    margin: 10px auto;
    text-shadow: 0 0 10px rgba(245,216,150,.5);
    border: none;
}

#roll-btn {
    background: #5a2a12;
    color: #f5d896;
    border: 2px solid #8a6f3a;
    padding: 10px 28px;
    font-family: 'Cinzel', serif;
    font-size: 1em;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 0 #2a1208;
    margin-top: 10px;
}
#roll-btn:hover { background: #7a3a1a; }
#roll-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #2a1208; }

#roll-result {
    text-align: center;
    font-family: 'Cinzel', serif;
    font-size: 1.4em;
    color: #5a2a12;
    margin-top: 10px;
    min-height: 1.4em;
    font-weight: 700;
}
.crit-success { color: #1a6a2a !important; }
.crit-fail    { color: #8a1a1a !important; }

/* TIMELINE ================================================================== */
.timeline {
    margin: 18px 0;
    border-left: 3px double #8a6f3a;
    padding-left: 22px;
}
.timeline-event {
    position: relative;
    padding-bottom: 14px;
}
.timeline-event::before {
    content: '✦';
    position: absolute;
    left: -32px;
    top: 0;
    color: #5a2a12;
    background: #f1e4c7;
    width: 22px; text-align: center;
}
.timeline-event .date {
    font-weight: 700;
    color: #5a2a12;
    margin-right: 8px;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
}

/* SYSTEMS GRID ============================================================== */
.systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin: 14px 0;
}

.system-card {
    background: rgba(90, 42, 18, .08);
    border: 1px solid #8a6f3a;
    border-left: 4px solid #5a2a12;
    padding: 14px 16px;
    border-radius: 2px;
}
.system-card h3 {
    margin: 0 0 4px 0;
    font-size: 1.05em;
}
.system-card .meta {
    font-size: 0.85em;
    color: #6a4a28;
    font-style: italic;
    margin-bottom: 6px;
}
.system-card p { margin: 0; font-size: 0.95em; }

/* TABLE ===================================================================== */
.section table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 0.95em;
    background: rgba(255, 247, 224, .4);
}
.section th {
    background: #5a2a12;
    color: #f1e4c7;
    padding: 10px 12px;
    text-align: left;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
}
.section td {
    padding: 10px 12px;
    border-bottom: 1px solid #c4a868;
}

/* CHARACTER SHEET ========================================================== */
.char-sheet {
    background: #fff7e0;
    border: 2px solid #5a2a12;
    padding: 18px 22px;
    margin: 14px 0;
    font-family: 'Courier New', monospace;
    box-shadow: 4px 4px 0 #8a6f3a;
}
.char-sheet h3 {
    font-family: 'Cinzel', serif;
    color: #5a2a12;
    border-bottom: 1px dashed #8a6f3a;
    padding-bottom: 4px;
    margin-bottom: 8px;
}
.char-sheet .stats-line {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 8px 0;
}
.char-sheet .stat {
    background: #f1e4c7;
    padding: 4px 10px;
    border: 1px solid #8a6f3a;
    font-weight: 700;
    color: #2a1208;
}
.char-sheet .stat span { color: #7a3a1a; margin-left: 4px; }

/* RESPONSIVE =============================================================== */
@media (max-width: 700px) {
    .jdr-hero h1 { font-size: 2.2em; letter-spacing: 3px; }
    .jdr-hero { padding: 40px 18px; }
    .section { padding: 22px 20px; }
    .die { width: 64px; height: 64px; }
    .d20-big { width: 90px; height: 90px; font-size: 2em; }
}
