/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
}

/* === APP LAYOUT === */
.app {
    max-width: 900px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* === HEADER === */
.header {
    background: #8B1A1A;
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    height: 76px;
    width: auto;
    filter: brightness(0) invert(1);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-pdf {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    background: rgba(255,255,255,0.9);
    cursor: pointer;
    white-space: nowrap;
}

.btn-pdf:hover {
    background: white;
}

.language-select {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

/* === TABS === */
.tabs {
    display: flex;
    background: #6B1414;
    overflow-x: auto;
}

.tab {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    min-width: fit-content;
}

.tab:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.tab.active {
    background: #A52A2A;
    color: white;
}

/* === CONTENT ===
   Le contenu est rendu par generateSheetHTML() (shared/render.js), la même
   fonction que l'aperçu d'impression/PDF de l'admin — mise en forme (police,
   pointillés, colonnes) définie une seule fois dans shared/sheet.css. Ici on
   ne gère que l'habillage écran (pas de dimensions A4, pas de .print-active). */
.content {
    flex: 1;
    padding: 1.5rem 1rem;
    overflow-y: auto;
    display: flex;
    justify-content: center;
}

.content .sheet {
    width: 100%;
    max-width: 640px;
    font-size: 17px;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .header {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .tabs {
        flex-wrap: nowrap;
    }

    .tab {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }

    .content .sheet {
        font-size: 15px;
    }
}
