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

/* =========================================
   THEME SOMBRE (Pour la page d'accueil)
========================================= */
:root {
    --bg-color: #1a1a3a;
    --text-color: #f4f4f9;
    --accent-color: #f78c1e;
    --card-bg: #2a2a5a;
    --card-hover: #3a3a7a;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

header {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(26,26,58,0) 100%);
    position: relative;
}

.logo {
    max-width: 250px;
    height: auto;
    margin-bottom: 1rem;
}

h1 {
    color: var(--text-color);
    font-size: 2rem;
    margin: 0;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem 2rem 1rem;
}

.cards-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

@media(min-width: 600px) {
    .cards-container {
        flex-direction: row;
    }
}

.card {
    flex: 1;
    background-color: var(--card-bg);
    color: var(--text-color);
    text-decoration: none;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.card:hover {
    transform: translateY(-5px);
    background-color: var(--card-hover);
    border-color: var(--accent-color);
}

.card i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.card h2 { margin: 0 0 0.5rem 0; font-size: 1.5rem; }
.card p { margin: 0; font-size: 0.9rem; opacity: 0.9; }

.rules {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
}
.rules h2 { color: var(--accent-color); margin-top: 0; }
.rules ul { list-style-type: none; padding: 0; margin: 0; }
.rules li { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.rules li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.rules strong { color: var(--accent-color); }
.warning { color: #ff4444; font-weight: bold; }

footer {
    text-align: center;
    padding: 2rem;
    background-color: rgba(0,0,0,0.4);
    margin-top: 2rem;
}
.socials { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; }
.socials a { color: var(--text-color); text-decoration: none; font-size: 1.2rem; transition: color 0.3s ease; }
.socials a:hover { color: var(--accent-color); }


/* =========================================
   THEME LATEX (Pour la carte du bar)
========================================= */

body.latex-theme {
    background-color: #e0e4e8; /* Fond d'écran gris derrière la feuille */
    color: #333;
    font-family: 'Verdana', sans-serif; /* Police typique du syllabus */
    padding: 2rem 1rem;
}

.latex-theme .paper {
    max-width: 1000px;
    margin: 0 auto;
    background: #ffffff; /* La feuille A4 blanche */
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 4px;
}

.latex-theme .latex-header {
    background: none;
    text-align: center;
    padding: 0 0 1.5rem 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid #333;
}

.latex-theme .logo-latex {
    max-width: 200px;
    margin-bottom: 1rem;
}

.latex-theme h1 {
    color: #000;
    font-size: 2.2rem;
    font-weight: bold;
    margin: 0;
    font-family: 'Verdana', sans-serif;
}

.latex-theme .back-btn {
    position: absolute;
    top: 0;
    left: 0;
    background: #333;
    color: #fff;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.3s;
}
.latex-theme .back-btn:hover { background: #555; }

.latex-theme .multicol {
    column-count: 2;
    column-gap: 3rem;
    column-rule: 1px solid #ccc;
}

@media(max-width: 800px) {
    .latex-theme .multicol {
        column-count: 1;
        column-rule: none;
    }
    .latex-theme .paper {
        padding: 1.5rem;
    }
    .latex-theme .back-btn {
        position: relative;
        display: inline-block;
        margin-bottom: 1rem;
    }
}

/* Boîtes type "tcolorbox" */
.latex-theme .tcolorbox {
    border: 1px solid #ccc;
    border-radius: 6px;
    position: relative;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem 1.2rem 1rem 1.2rem;
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.latex-theme .tcolorbox-title {
    position: absolute;
    top: -15px;
    left: 15px;
    padding: 6px 15px;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    font-size: 1.05rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Couleurs tirées de pkg_syl.sty */
.color-softs { border-color: #2980b9; background-color: rgba(41, 128, 185, 0.05); }
.color-softs .tcolorbox-title { background-color: #2980b9; }

.color-vins { border-color: #cc0000; background-color: rgba(204, 0, 0, 0.05); }
.color-vins .tcolorbox-title { background-color: #cc0000; }

.color-zero { border-color: #00994c; background-color: rgba(0, 153, 76, 0.05); }
.color-zero .tcolorbox-title { background-color: #00994c; }

.color-classiques { border-color: #e67e22; background-color: rgba(230, 126, 34, 0.05); }
.color-classiques .tcolorbox-title { background-color: #e67e22; }

.color-speciales { border-color: #a87a14; background-color: rgba(168, 122, 20, 0.05); }
.color-speciales .tcolorbox-title { background-color: #a87a14; }

/* Typographie interne LaTeX */
.latex-theme .sub-section {
    font-weight: bold;
    color: #444;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
}

.latex-theme ul {
    list-style-type: none;
    padding-left: 5px;
    margin: 0;
}

.latex-theme ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.latex-theme ul li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: #666;
    font-weight: bold;
}

.minne-title-inline {
    break-inside: avoid;
    page-break-inside: avoid;
    text-align: center;
    margin: 2rem 0 1rem 0;
}
.minne-title-inline h2 {
    font-size: 1.8rem;
    color: #000;
    border-bottom: 2px solid #ccc;
    display: inline-block;
    padding-bottom: 5px;
}

.latex-theme .beer-item {
    background: #fff;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-left: 3px solid rgba(0,0,0,0.1);
}

.latex-theme .beer-item h4 {
    margin: 0 0 6px 0;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #222;
}

.latex-theme .beer-item .abv {
    background: #f1f2f6;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: normal;
    color: #555;
    border: 1px solid #ddd;
}

.latex-theme .beer-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

.latex-theme .tasting-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.latex-theme .tasting-notes span {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #495057;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}
