:root {
    --primary-color: #295c7a;
    --primary-dark: #1a4a5e;
    --secondary-color: #d4af37;
    --accent-yellow: #fdb825;
    --bg-beige: linear-gradient(135deg, #e8dcc4 0%, #c9a961 100%);
    --bg-light: #f5ecd7;
    --bg-input: #f5f5f5;
    --text-dark: #2a2a2a;
}

/* Utility Classes */
.uppercase {
    text-transform: uppercase;
}

.font-anton {
    font-family: 'Anton', sans-serif;
    font-weight: 400;
}

.bold {
    font-weight: 700;
}

.radius-8 {
    border-radius: 8px;
}

.radius-10 {
    border-radius: 10px;
}

.radius-15 {
    border-radius: 15px;
}

/* Assistant input styles for JS */
.assistant-bonus-input {
    width: 60px;
    padding: 6px 8px;
    font-size: 1em;
    text-align: center;
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    font-weight: 700;
}

.assistant-bonus-select {
    padding: 6px 8px;
    font-size: 0.9em;
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    font-weight: 700;
}

.bonus-icon {
    margin-right: 6px;
    color: var(--primary-color);
}

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

body {
    font-family: 'Source Sans 3', sans-serif;
    background-color: #e8dcc4;
    color: var(--text-dark);
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

/* Background image uniquement sur desktop (>768px) */
@media (min-width: 769px) {
    body {
        background-image: url('https://images.ctfassets.net/ps7sveckw0ws/4t8oQDAbnQSy9P0m2whU85/707f0474735282a55bd3a3a10e3d09ad/ToW_Background_Light.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: fixed;
    }
}

/* Force font sur tous les éléments */
body, input, button, select, textarea, label, p, span, div {
    font-family: 'Source Sans 3', sans-serif;
}

.app-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--primary-color);
    border-radius: 15px;
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: flex-start;
}

.header-text {
    flex: 1;
    text-align: left;
}

.language-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 15px;
    display: flex;
    gap: 5px;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px;
    border-radius: 8px;
}

.lang-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid transparent;
    color: white;
    font-weight: 700;
    font-size: 0.9em;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--primary-color);
}

.header-logo {
    width: 80px;
    height: auto;
    flex-shrink: 0;
}

header h1 {
    font-family: 'Anton', sans-serif;
    font-size: 3.2em;
    font-weight: 400;
    margin: 0;
    color: var(--accent-yellow);
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1.2;
}

.subtitle {
    background: var(--bg-beige);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin: 5px 0 0 0;
    line-height: 1.2;
}

.title-ribbon {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 30px auto;
    display: block;
}


/* Separator - réduit et centré comme le 3ème screen */
.separator {
    width: 100%;
    max-width: 600px;
    height: auto;
    margin: 35px auto;
    display: block;
    opacity: 0.7;
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.mode-btn {
    font-family: 'Anton', sans-serif;
    flex: 1;
    padding: 22px 30px;
    border: none;
    background: var(--primary-color);
    color: var(--accent-yellow);
    font-size: 1.3em;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.mode-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.mode-btn:hover::before {
    left: 100%;
}

.mode-btn.active {
    background: var(--primary-color);
    color: var(--accent-yellow);
}


/* Mode Content */
.mode-content {
    display: none;
}

.mode-content.active {
    display: block;
}

/* Army Section */
.army-section {
    margin-bottom: 30px;
}

.army-section h2 {
    font-family: 'Anton', sans-serif;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 2.2em;
    font-weight: 400;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-frame {
    background: transparent;
    padding: 30px;
    border: none;
    border-radius: 15px;
    position: relative;
}

/* Control Group */
.control-group {
    margin-bottom: 25px;
}

.control-group:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.control-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 1em;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-group label i {
    margin-right: 6px;
    color: var(--primary-color);
}

.counter {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-beige);
    padding: 12px;
    border: none;
    border-radius: 8px;
}

.counter input {
    flex: 1;
    text-align: center;
    font-size: 1.6em;
    font-weight: 700;
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    padding: 10px;
    font-family: 'Source Sans 3', sans-serif;
}

.counter input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.btn-minus, .btn-plus {
    width: 55px;
    height: 55px;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    font-size: 2.2em;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Hover effects - grouped */
.mode-btn:hover,
.reset-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.toggle-btn:hover,
.situation-btn:hover {
    border-color: var(--secondary-color);
    background: var(--bg-light);
    transform: translateY(-2px);
}

.btn-minus:hover, 
.btn-plus:hover {
    background: var(--primary-dark);
    transform: scale(1.08);
}

.scroll-top-btn:hover {
    background: var(--accent-yellow);
    transform: translateY(-5px);
}

.simulate-btn:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

/* Active states - grouped */
.btn-minus:active, 
.btn-plus:active,
.faction-btn:active,
.scroll-top-btn:active {
    transform: scale(0.95);
}

.toggle-btn.active,
.situation-btn.active {
    background: var(--primary-color);
    color: white;
}

.toggle-btn.active .toggle-label {
    color: white;
}

.toggle-btn.active .toggle-label i,
.situation-btn.active i {
    color: white;
}

/* Toggle Group */
.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
    margin-top: 25px;
}

.toggle-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    background: var(--bg-beige);
    border: none;
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn.active .toggle-value {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

.toggle-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    text-align: left;
}

.toggle-label i {
    color: var(--primary-color);
    font-size: 1.1em;
}

.toggle-value {
    background: white;
    padding: 6px 18px;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    font-weight: 700;
    min-width: 55px;
    text-align: center;
    color: var(--primary-color);
}

/* Total Display */
.total-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-color);
    padding: 22px 28px;
    margin-top: 25px;
    border: 1px solid var(--primary-color);
    border-radius: 10px;
}

.total-label {
    font-size: 1.6em;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.total-value {
    font-size: 3em;
    font-weight: 900;
    color: var(--secondary-color);
}

/* Result Section */
.result-section {
    margin-top: 30px;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: var(--primary-color);
    border-radius: 10px;
    position: relative;
}

.result-header::before {
    content: "";
    background-image: url('img/ui-skel.png');
    width: 200px;
    height: 200px;
    background-size: contain;
    transform: scaleX(-1);
    display: block;
    background-repeat: no-repeat;
    position: absolute;
    top: -50px;
    left: -80px;
}

.result-header h3 {
    font-family: 'Anton', sans-serif;
    color: var(--accent-yellow);
    font-size: 1.8em;
    font-weight: 400;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.result-box {
    background: transparent;
    padding: 30px 0;
    border: none;
    border-radius: 15px;
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.result-content {
    background: transparent;
    border-radius: 10px;
    padding: 20px 30px;
    margin-bottom: 15px;
    border: none;
}

.diff-label {
    font-size: 1em;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-align: center;
}

.diff-value {
    font-size: 3.5em;
    font-weight: 900;
    color: var(--primary-color);
    margin: 10px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.winner-box {
    font-family: 'Anton', sans-serif;
    font-size: 1.4em;
    font-weight: 400;
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--accent-yellow);
    color: var(--primary-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
}

.winner-box img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.winner-box.army-a,
.winner-box.army-b,
.winner-box.draw {
    background: var(--accent-yellow);
    color: var(--primary-color);
}

.break-test-box {
    background: var(--primary-color);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
}

.break-icon {
    font-size: 1.4em;
    flex-shrink: 0;
    color: var(--secondary-color);
    font-weight: 700;
}

.break-test-box p {
    text-align: left;
    line-height: 1.5;
    font-size: 0.9em;
    color: white;
    margin: 0;
    font-weight: 400;
    flex: 1;
}

.break-test-box strong {
    font-weight: 700;
    color: var(--secondary-color);
}

/* Reset Button */
.reset-btn {
    width: 100%;
    padding: 18px;
    margin-top: 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.15em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.reset-icon {
    font-size: 1.4em;
    display: inline-block;
    transition: transform 0.3s ease;
}

.reset-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.reset-btn:hover .reset-icon {
    transform: rotate(180deg);
}

.credits {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(41, 92, 122, 0.2);
    color: var(--primary-color);
    font-size: 0.95em;
    opacity: 0.8;
}

.credits strong {
    color: var(--secondary-color);
    font-weight: 700;
}

.credits a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.credits a:hover {
    color: var(--accent-yellow);
    text-decoration: underline;
}

/* Scroll to Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.3em;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

/* Scroll to Top Button Mobile */
.scroll-top-btn-mobile {
    display: none;
}

@media (max-width: 768px) {
    .scroll-top-btn {
        display: none;
    }
    
    .scroll-top-btn-mobile {
        display: block;
        width: 45px;
        height: 45px;
        background: var(--secondary-color);
        color: white;
        border: none;
        border-radius: 50%;
        font-size: 1.1em;
        cursor: pointer;
        transition: all 0.3s ease;
        margin: 20px auto 10px;
    }
    
    .scroll-top-btn-mobile:hover {
        background: var(--accent-yellow);
        transform: translateY(-3px);
    }
    
    .scroll-top-btn-mobile:active {
        transform: translateY(-1px);
    }
}

/* Break Simulator */
.break-simulator {
    margin-top: 20px;
    padding: 15px;
    background: transparent;
    border-radius: 10px;
}

.simulator-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.simulator-input-group {
    flex: 1;
    min-width: 100px;
}

.simulator-input-group label {
    display: block;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.simulator-input-group label .loser-label,
.simulator-input-group label .winner-label {
    font-size: 0.85em;
    opacity: 0.7;
    font-weight: 400;
}

.simulator-input-group input {
    width: 100%;
    padding: 8px;
    font-size: 1em;
    text-align: center;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    background: var(--bg-input);
}

.break-thresholds {
    padding: 0;
    margin-bottom: 12px;
    text-align: left;
    line-height: 1.5;
    font-size: 0.9em;
    color: var(--text-dark);
}

.threshold-section {
    margin-bottom: 10px;
}

.threshold-section strong {
    font-weight: 700;
    color: var(--primary-color);
}

.simulate-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent-yellow);
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
}

.simulate-btn i {
    font-size: 1.2em;
}

.dice-result {
    margin-top: 15px;
    padding: 15px;
    background: var(--primary-color);
    border-radius: 8px;
    text-align: center;
    animation: slideIn 0.3s ease;
}

.dice-result h3 {
    color: var(--secondary-color);
    margin: 0 0 12px 0;
    font-size: 1.1em;
}

.dice-roll-display {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 12px 0;
    font-size: 1.5em;
}

.dice-roll-display .die {
    background: white;
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 700;
    animation: diceRoll 0.5s ease;
}

@keyframes diceRoll {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(90deg); }
    50% { transform: rotate(180deg); }
    75% { transform: rotate(270deg); }
}

.dice-totals {
    color: white;
    margin: 12px 0;
}

.dice-totals p {
    margin: 6px 0;
    font-size: 0.95em;
}

.dice-totals strong {
    color: var(--secondary-color);
}

.dice-outcome {
    margin-top: 12px;
    padding: 12px 0;
}

.dice-outcome h4 {
    color: var(--secondary-color);
    margin: 0 0 8px 0;
    font-size: 1.1em;
}

.dice-outcome p {
    color: white;
    margin: 0;
    font-size: 1.5em;
    font-weight: 700;
}

.auto-flee-warning {
    margin-top: 10px;
    padding: 10px;
    background: var(--primary-color);
    border-radius: 6px;
    color: white;
    font-weight: 600;
    font-size: 0.85em;
    text-align: center;
}

/* Assistant Mode */
.assistant-container {
    background: transparent;
    padding: 20px;
    border: none;
    border-radius: 15px;
}

.assistant-container h2 {
    font-family: 'Anton', sans-serif;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.8em;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.situation-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 25px;
}

.situation-btn {
    padding: 12px 16px;
    background: var(--bg-beige);
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
}

.situation-btn i {
    font-size: 1em;
    color: var(--primary-color);
}

.assistant-inputs {
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 10px;
    margin-bottom: 20px;
    min-height: auto;
}

.bonus-wrapper {
    margin-bottom: 10px;
}

.bonus-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-beige);
    border: none;
    border-radius: 8px;
    min-height: 50px;
}

.bonus-label {
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    font-size: 0.9em;
}

.bonus-label i,
.assistant-inputs label i {
    margin-right: 6px;
    color: var(--primary-color);
    font-size: 0.95em;
}

.info-text {
    display: block;
    margin-top: 5px;
    opacity: 0.8;
    font-size: 0.85em;
    color: inherit;
    text-align: left;
}

.bonus-value {
    font-size: 1.3em;
    font-weight: 900;
    color: var(--primary-color);
    min-width: 40px;
    text-align: center;
}

.assistant-result {
    display: none;
}

.assistant-result.active {
    display: block;
    background: var(--bg-beige);
    padding: 28px;
    border: none;
    border-radius: 10px;
    margin-top: 25px;
}

.assistant-result h3 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 1.3em;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 8px;
    }

    header {
        padding: 12px 12px 15px 12px;
        margin-bottom: 15px;
    }
    
    .language-toggle {
        top: 50%;
        transform: translateY(-50%);
        right: 8px;
        flex-direction: column;
        padding: 3px;
        gap: 2px;
    }
    
    .lang-btn {
        padding: 6px 10px;
        font-size: 0.75em;
        min-width: 35px;
    }

    header h1 {
        font-size: 1.4em;
        margin: 0 0 2px 0;
    }

    .header-content {
        flex-direction: row;
        gap: 12px;
        align-items: center;
        flex-wrap: nowrap;
    }
    
    .header-text {
        text-align: left;
        flex: 1;
        min-width: 0;
    }
    
    .header-logo {
        width: 70px;
        flex-shrink: 0;
    }

    .subtitle {
        font-size: 0.75em;
    }
    
    .credits {
        font-size: 0.85em;
        margin-top: 20px;
        padding-top: 15px;
    }
    
    .break-simulator {
        padding: 15px;
    }
    
    .simulator-inputs {
        flex-direction: column;
        gap: 10px;
    }
    
    .simulator-input-group {
        min-width: auto;
    }
    
    .dice-roll-display .die {
        width: 50px;
        height: 50px;
        font-size: 1.5em;
    }
    
    .simulate-btn {
        font-size: 1em;
        padding: 12px;
    }

    .title-ribbon {
        margin: 15px auto;
        max-width: 200px;
    }

    .separator {
        margin: 20px auto;
        max-width: 400px;
    }

    .mode-selector {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }

    .mode-btn {
        padding: 14px 20px;
        font-size: 1.1em;
    }

    .army-section {
        margin-bottom: 20px;
    }

    .army-section h2 {
        font-size: 1.5em;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .section-frame {
        padding: 12px;
    }

    .control-group {
        margin-bottom: 15px;
    }

    .control-group label {
        font-size: 0.85em;
        margin-bottom: 6px;
    }

    .control-group small {
        font-size: 0.75em;
        margin-top: 3px;
    }

    .counter {
        gap: 6px;
        padding: 6px;
        flex-wrap: nowrap;
    }

    .counter input {
        font-size: 1.2em;
        padding: 6px;
        min-width: 0;
        flex: 1;
    }

    .btn-minus, .btn-plus {
        width: 40px;
        height: 40px;
        font-size: 1.6em;
        flex-shrink: 0;
    }

    .toggle-group {
        gap: 6px;
        margin-bottom: 15px;
        margin-top: 15px;
        padding-top: 15px;
    }

    .toggle-btn {
        padding: 10px 12px;
        font-size: 0.85em;
    }

    .toggle-value {
        padding: 4px 10px;
        font-size: 0.85em;
        min-width: 40px;
    }

    .total-display {
        padding: 12px 16px;
        margin-top: 15px;
    }

    .total-label {
        font-size: 1.1em;
    }

    .total-value {
        font-size: 2em;
    }

    .result-section {
        margin-top: 20px;
    }

    .result-header {
        flex-direction: row;
        gap: 12px;
        padding: 12px 15px;
        margin-bottom: 15px;
    }

    .result-header::before {
        width: 120px;
        height: 120px;
        top: -30px;
        left: -10px;
    }

    .result-header h3 {
        font-size: 1.1em;
        line-height: 1.2;
    }

    .result-box {
        padding: 20px 15px;
    }

    .result-content {
        padding: 15px;
        margin-bottom: 12px;
    }

    .diff-label {
        font-size: 0.9em;
        margin-bottom: 6px;
    }

    .diff-value {
        font-size: 2.5em;
        margin: 8px 0;
    }
    
    .winner-box {
        font-size: 1.1em;
        padding: 10px;
        margin-top: 12px;
    }
    
    .winner-box img {
        width: 35px;
        height: 35px;
    }
    
    .break-test-box {
        padding: 12px;
        gap: 8px;
    }
    
    .break-icon {
        font-size: 1.2em;
    }

    .break-test-box p {
        font-size: 0.85em;
        line-height: 1.4;
    }

    .reset-btn {
        padding: 14px;
        margin-top: 20px;
        font-size: 1em;
    }

    .reset-icon {
        font-size: 1.2em;
    }

    .situation-selector {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 20px;
    }

    .situation-btn {
        padding: 14px 12px;
        font-size: 0.85em;
    }

    .assistant-container {
        padding: 20px;
    }

    .assistant-container h2 {
        font-size: 1.6em;
        margin-bottom: 20px;
    }

    .assistant-inputs {
        padding: 5px 15px;
        margin-bottom: 15px;
        min-height: auto;
    }

    .bonus-item {
        padding: 12px 15px;
        margin-bottom: 8px;
    }

    .bonus-label {
        font-size: 0.85em;
    }

    .bonus-value {
        font-size: 1.3em;
    }

    .assistant-result {
        padding: 20px;
        margin-top: 15px;
    }
}

/* Animations */
@keyframes scaleIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideIn {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}


/* Input number arrows hide */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-beige);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border: 1px solid var(--bg-beige);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Faction Selector */
.faction-selector {
    background: transparent;
    padding: 20px;
    border: none;
    border-radius: 10px;
    margin-bottom: 20px;
}

.faction-selector h3 {
    font-family: 'Anton', sans-serif;
    color: var(--primary-color);
    font-size: 1.3em;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    text-align: center;
}

.faction-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.faction-btn {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.faction-btn img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: brightness(0) invert(1);
    max-width: 100%;
    max-height: 100%;
}

@media (hover: hover) {
    .faction-btn:hover {
        transform: translateY(-3px);
        border-color: var(--secondary-color);
        background: var(--secondary-color);
    }

    .faction-btn:hover img {
        transform: scale(1.1);
    }
}

.faction-btn.selected {
    border-color: var(--secondary-color);
    background: var(--secondary-color);
}

.faction-btn.selected img {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .faction-selector {
        padding: 15px;
        margin-bottom: 15px;
    }

    .faction-selector h3 {
        font-size: 1.1em;
        margin-bottom: 12px;
    }

    .faction-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }

    .faction-btn {
        padding: 6px;
    }
    
    .faction-btn img {
        width: 85%;
        height: 85%;
    }
}
