/* ============================================================
   GOAT — Heroic Fantasy / Game of Thrones Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Cinzel:wght@400;600;700&family=MedievalSharp&display=swap');

/* ── Palette ─────────────────────────────────────────────── */
:root {
    --black:      #0a0a0c;
    --dark:       #111115;
    --stone:      #1a1a1f;
    --stone-mid:  #242430;
    --stone-light:#2f2f3e;
    --gold:       #c9a84c;
    --gold-light: #e8c96a;
    --gold-dim:   #7a6028;
    --crimson:    #8b1a1a;
    --crimson-hot:#c0392b;
    --silver:     #a8a8b8;
    --parchment:  #e8d5a3;
    --ash:        #6b6b7a;
    --glow-gold:  rgba(201, 168, 76, 0.4);
    --glow-red:   rgba(139, 26, 26, 0.5);
}

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    background-color: var(--black);
    background-image:
        radial-gradient(ellipse at 20% 20%, rgba(139,26,26,0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(201,168,76,0.04) 0%, transparent 60%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='4' height='4' fill='%230a0a0c'/%3E%3Crect x='0' y='0' width='1' height='1' fill='%23111115' opacity='0.5'/%3E%3C/svg%3E");
    color: var(--parchment);
    font-family: 'Cinzel', serif;
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb {
    background: var(--gold-dim);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3 {
    font-family: 'Cinzel Decorative', serif;
    color: var(--gold);
    text-shadow: 0 0 20px var(--glow-gold), 0 2px 4px rgba(0,0,0,0.8);
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

h1 { font-size: 2.2rem; font-weight: 900; }
h2 { font-size: 1.7rem; font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; color: var(--gold-light); }
h4, h5, h6 {
    font-family: 'Cinzel', serif;
    color: var(--gold-light);
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

p { margin-bottom: 1.25rem; color: var(--parchment); }

/* Separateur ornemental */
h1::after, h2::after {
    content: '';
    display: block;
    margin: 0.5rem auto 0;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ── Links ────────────────────────────────────────────────── */
a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.25s, text-shadow 0.25s;
}
a:hover {
    color: var(--gold-light);
    text-shadow: 0 0 8px var(--glow-gold);
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
    background: linear-gradient(180deg, #0d0d10 0%, var(--stone) 100%) !important;
    border-bottom: 1px solid var(--gold-dim);
    box-shadow: 0 4px 20px rgba(0,0,0,0.8), 0 1px 0 var(--gold-dim);
    padding: 0.5rem 1.5rem;
    position: relative;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--gold-dim) 15%,
        var(--gold) 50%,
        var(--gold-dim) 85%,
        transparent 100%);
}

.navbar-brand {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--gold) !important;
    text-shadow: 0 0 15px var(--glow-gold), 0 0 30px rgba(201,168,76,0.2);
    letter-spacing: 3px;
    position: relative;
}

.navbar-brand::before,
.navbar-brand::after {
    content: '⚔';
    font-size: 0.9rem;
    margin: 0 0.4rem;
    opacity: 0.7;
}

.navbar-nav .nav-link {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--silver) !important;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0.6rem 1rem !important;
    position: relative;
    transition: color 0.25s;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.3s;
}

.navbar-nav .nav-link:hover {
    color: var(--gold) !important;
}
.navbar-nav .nav-link:hover::after {
    width: 80%;
}

/* ── Main container ───────────────────────────────────────── */
.container {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
    background: linear-gradient(145deg, var(--stone) 0%, var(--stone-mid) 100%);
    border: 1px solid var(--gold-dim);
    border-radius: 2px;
    color: var(--parchment);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.6),
        inset 0 1px 0 rgba(201,168,76,0.1);
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: visible;
}

/* Coins décoratifs */
.card::before,
.card::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: var(--gold);
    border-style: solid;
    z-index: 1;
}
.card::before {
    top: -1px; left: -1px;
    border-width: 2px 0 0 2px;
}
.card::after {
    bottom: -1px; right: -1px;
    border-width: 0 2px 2px 0;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 16px 48px rgba(0,0,0,0.7),
        0 0 20px rgba(201,168,76,0.1),
        inset 0 1px 0 rgba(201,168,76,0.15);
}

.card-header {
    background: linear-gradient(90deg, var(--dark) 0%, var(--stone-mid) 100%);
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--gold-dim);
    border-radius: 0 !important;
    padding: 0.9rem 1.25rem;
}

.card-header h4 { margin: 0; color: var(--gold); font-size: 1rem; }
.card-body { padding: 1.75rem; }
.card-title { color: var(--gold-light); font-family: 'Cinzel', serif; }
.card-text { color: var(--silver); }

/* ── Boutons ──────────────────────────────────────────────── */
.btn {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 1px;
    padding: 0.5rem 1.4rem;
    transition: all 0.25s;
    position: relative;
    cursor: pointer;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1px;
    opacity: 0;
    transition: opacity 0.25s;
    background: rgba(255,255,255,0.05);
}
.btn:hover::before { opacity: 1; }

/* Primary — or */
.btn-primary {
    background: linear-gradient(135deg, #6b4c14, var(--gold-dim), #8a6020);
    border: 1px solid var(--gold);
    color: var(--parchment);
    box-shadow: 0 2px 8px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, var(--gold-dim), var(--gold), #9a7030);
    border-color: var(--gold-light);
    color: var(--black);
    box-shadow: 0 4px 16px var(--glow-gold), inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

/* Danger — sang */
.btn-danger {
    background: linear-gradient(135deg, #4a0000, var(--crimson));
    border: 1px solid #a02020;
    color: var(--parchment);
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.btn-danger:hover {
    background: linear-gradient(135deg, var(--crimson), var(--crimson-hot));
    border-color: #c03030;
    box-shadow: 0 4px 16px var(--glow-red);
    transform: translateY(-1px);
}

/* Success — émeraude */
.btn-success {
    background: linear-gradient(135deg, #1a3a1a, #2d6a2d);
    border: 1px solid #3a8a3a;
    color: var(--parchment);
}
.btn-success:hover {
    background: linear-gradient(135deg, #2d6a2d, #3d9a3d);
    border-color: #5aaa5a;
    box-shadow: 0 4px 16px rgba(60,160,60,0.3);
    transform: translateY(-1px);
}

/* Info */
.btn-info {
    background: linear-gradient(135deg, #0d2a3a, #1a4a6a);
    border: 1px solid #2a6a9a;
    color: var(--parchment);
}
.btn-info:hover {
    background: linear-gradient(135deg, #1a4a6a, #2a6a9a);
    border-color: #4a9aca;
    transform: translateY(-1px);
}

/* Warning */
.btn-warning {
    background: linear-gradient(135deg, #3a2a00, #7a5a00);
    border: 1px solid #b08010;
    color: var(--parchment);
}
.btn-warning:hover {
    background: linear-gradient(135deg, #7a5a00, #aa8020);
    border-color: var(--gold);
    transform: translateY(-1px);
}

/* Secondary */
.btn-secondary {
    background: linear-gradient(135deg, var(--stone), var(--stone-mid));
    border: 1px solid var(--ash);
    color: var(--silver);
}
.btn-secondary:hover {
    background: linear-gradient(135deg, var(--stone-mid), var(--stone-light));
    border-color: var(--silver);
    color: var(--parchment);
}

.btn-block { width: 100%; display: block; }
.btn-sm { padding: 0.3rem 0.8rem; font-size: 0.7rem; }

/* ── Formulaires ──────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }

label {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold-light);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    display: block;
}

.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
textarea,
select {
    background: rgba(10,10,12,0.8);
    border: 1px solid var(--stone-light);
    border-top-color: var(--gold-dim);
    color: var(--parchment);
    border-radius: 1px;
    padding: 0.6rem 0.9rem;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    width: 100%;
    transition: border-color 0.25s, box-shadow 0.25s;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.4);
}

.form-control:focus,
input:focus, textarea:focus, select:focus {
    background: rgba(15,15,18,0.9);
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(201,168,76,0.2), inset 0 2px 6px rgba(0,0,0,0.4);
    color: var(--parchment);
    outline: none;
}

.form-control::placeholder { color: var(--ash); font-style: italic; }

/* ── Tables ───────────────────────────────────────────────── */
.table {
    color: var(--parchment);
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-size: 0.88rem;
}

.table thead th {
    background: linear-gradient(180deg, var(--dark), var(--stone));
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--gold-dim);
    padding: 0.85rem 1rem;
    white-space: nowrap;
}

.table tbody td {
    background: rgba(26,26,31,0.6);
    border-bottom: 1px solid rgba(201,168,76,0.08);
    padding: 0.75rem 1rem;
    vertical-align: middle;
    transition: background 0.2s;
}

.table tbody tr:hover td {
    background: rgba(201,168,76,0.05);
}

.table-bordered {
    border: 1px solid var(--gold-dim);
    border-radius: 2px;
    overflow: hidden;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid rgba(201,168,76,0.12);
}

.table-responsive {
    border: 1px solid var(--gold-dim);
    border-radius: 2px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

/* ── Alertes ──────────────────────────────────────────────── */
.alert {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    border-radius: 1px;
    border-width: 1px;
    padding: 0.9rem 1.25rem;
    margin-bottom: 1.25rem;
    letter-spacing: 0.5px;
    position: relative;
    padding-left: 2.5rem;
}

.alert::before {
    font-size: 1rem;
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
}

.alert-danger {
    background: linear-gradient(90deg, rgba(139,26,26,0.3), rgba(139,26,26,0.1));
    border-color: var(--crimson);
    color: #e88;
    box-shadow: 0 4px 16px rgba(139,26,26,0.2);
}
.alert-danger::before { content: '⚠'; color: var(--crimson-hot); }

.alert-success {
    background: linear-gradient(90deg, rgba(40,100,40,0.3), rgba(40,100,40,0.1));
    border-color: #3a8a3a;
    color: #8e8;
}
.alert-success::before { content: '✦'; color: #5a5; }

.alert-info {
    background: linear-gradient(90deg, rgba(30,70,120,0.3), rgba(30,70,120,0.1));
    border-color: #2a6a9a;
    color: #8af;
}
.alert-info::before { content: '◆'; color: #4af; }

.alert-warning {
    background: linear-gradient(90deg, rgba(120,90,0,0.3), rgba(120,90,0,0.1));
    border-color: #aa8020;
    color: var(--gold-light);
}
.alert-warning::before { content: '☽'; color: var(--gold); }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 1px;
    padding: 0.3em 0.7em;
}

.badge-primary, .badge-secondary {
    background: var(--stone-light);
    color: var(--silver);
    border: 1px solid var(--ash);
}

/* Niveau newbie */
.badge-newbie {
    background: linear-gradient(90deg, #1a1a2a, #252540);
    color: var(--silver);
    border: 1px solid #4444aa;
}

/* Niveau senior */
.badge-senior {
    background: linear-gradient(90deg, #2a1800, #4a3000);
    color: var(--gold);
    border: 1px solid var(--gold-dim);
    box-shadow: 0 0 8px rgba(201,168,76,0.2);
}

/* ── Page hero (accueil) ──────────────────────────────────── */
.page-hero {
    text-align: center;
    padding: 3rem 1rem 2rem;
    position: relative;
}

.page-hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.page-hero p {
    font-size: 1rem;
    color: var(--silver);
    font-style: italic;
    letter-spacing: 1px;
}

/* ── Ornement séparateur ──────────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--gold-dim);
    font-size: 0.9rem;
}
.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

/* ── Panneaux latéraux / sidebar ──────────────────────────── */
.panel {
    background: linear-gradient(180deg, var(--stone) 0%, var(--dark) 100%);
    border: 1px solid var(--gold-dim);
    border-radius: 2px;
    padding: 1.5rem;
    position: relative;
}

.panel::before {
    content: '◆';
    position: absolute;
    top: -0.6rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--stone);
    padding: 0 0.4rem;
    color: var(--gold);
    font-size: 0.7rem;
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
    background: linear-gradient(0deg, #060608 0%, var(--dark) 100%);
    color: var(--ash);
    text-align: center;
    padding: 1.5rem 0;
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-top: 1px solid var(--gold-dim);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--gold-dim) 15%,
        var(--gold) 50%,
        var(--gold-dim) 85%,
        transparent 100%);
}

/* ── Texte utilitaires ────────────────────────────────────── */
.text-muted { color: var(--ash) !important; }
.text-gold  { color: var(--gold) !important; }
.text-parchment { color: var(--parchment) !important; }

/* ── Effet parchemin sur certaines sections ───────────────── */
.parchment-bg {
    background: linear-gradient(145deg, #1e1810, #15120a);
    border: 1px solid #5a4820;
    color: var(--parchment);
}

/* ── Like button animé ────────────────────────────────────── */
.like-button {
    transition: all 0.2s;
}
.like-button:active {
    transform: scale(0.92);
}

/* ── Responsive tweaks ────────────────────────────────────── */
@media (max-width: 768px) {
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }
    .navbar-brand { font-size: 1.2rem; }
    .navbar-brand::before,
    .navbar-brand::after { display: none; }
    .card-body { padding: 1.25rem; }
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes goldFlicker {
    0%, 100% { text-shadow: 0 0 20px var(--glow-gold), 0 2px 4px rgba(0,0,0,0.8); }
    50% { text-shadow: 0 0 30px rgba(201,168,76,0.7), 0 2px 4px rgba(0,0,0,0.8); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.container > * {
    animation: fadeInUp 0.4s ease both;
}

h1 { animation: goldFlicker 4s ease-in-out infinite; }

/* ── Bootstrap overrides ──────────────────────────────────── */
.bg-primary { background: var(--crimson) !important; }
.bg-info    { background: var(--stone-mid) !important; }
.bg-dark    { background: var(--dark) !important; }
.text-white { color: var(--parchment) !important; }

/* HR */
hr {
    border: none;
    border-top: 1px solid var(--gold-dim);
    margin: 1.5rem 0;
}

/* Select dropdown options */
option {
    background: var(--stone);
    color: var(--parchment);
}
