/* ============================================================
   WHISTAO - Styles globaux
   ============================================================ */

:root {
    /* Couleurs principales */
    --felt-green: #1a5c2e;
    --felt-green-dark: #0f3d1d;
    --felt-green-light: #2a7a3e;
    --gold: #d4a847;
    --gold-light: #e8c96a;
    --gold-dark: #b08a2f;
    --wood-brown: #5c3a1e;
    --wood-brown-dark: #3d2513;
    --cream: #f5edd6;
    --cream-dark: #e0d4b8;

    /* Couleurs des cartes */
    --card-red: #c41e3a;
    --card-black: #1a1a1a;
    --card-bg: #ffffff;
    --card-back: #1a3a6e;
    --card-back-pattern: #2a4a7e;

    /* États */
    --active-green: #2ecc71;
    --inactive-red: #e74c3c;
    --warning-orange: #f39c12;

    /* Texte */
    --text-light: #f5edd6;
    --text-dark: #1a1a1a;
    --text-muted: #8a7e6a;

    /* Ombres */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);

    /* Tailles */
    --card-width: 70px;
    --card-height: 100px;
    --card-radius: 6px;
    --border-radius: 8px;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Georgia', 'Times New Roman', serif;
    background: var(--felt-green-dark);
    color: var(--text-light);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

body {
    display: flex;
    flex-direction: column;
}

/* Écran principal */
#app {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
}

.screen.active {
    display: flex;
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border: 2px solid var(--gold);
    border-radius: var(--border-radius);
    background: linear-gradient(145deg, var(--gold-dark), var(--gold));
    color: var(--wood-brown-dark);
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background: linear-gradient(145deg, var(--gold), var(--gold-light));
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-small {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-danger {
    background: linear-gradient(145deg, #a01020, var(--inactive-red));
    color: white;
    border-color: var(--inactive-red);
}

/* Cadre décoratif */
.fancy-border {
    border: 2px solid var(--gold-dark);
    border-radius: var(--border-radius);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3), var(--shadow-md);
}

/* Titre */
.title {
    font-size: 48px;
    font-weight: bold;
    color: var(--gold);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    text-align: center;
    letter-spacing: 4px;
}

.subtitle {
    font-size: 18px;
    color: var(--cream-dark);
    text-align: center;
    font-style: italic;
}

/* Overlay modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.show {
    opacity: 1;
}

.modal {
    background: linear-gradient(145deg, var(--felt-green-dark), var(--felt-green));
    border: 2px solid var(--gold);
    border-radius: 12px;
    padding: 24px 32px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal h2 {
    color: var(--gold);
    text-align: center;
    margin-bottom: 16px;
    font-size: 24px;
}

/* Indicateur joueur actif */
.indicator-active {
    color: var(--active-green);
    text-shadow: 0 0 8px var(--active-green);
}

.indicator-inactive {
    color: var(--inactive-red);
    opacity: 0.6;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px var(--gold); }
    50% { box-shadow: 0 0 20px var(--gold), 0 0 40px var(--gold-dark); }
}

.animate-fade-in { animation: fadeIn 0.3s ease; }
.animate-slide-up { animation: slideUp 0.4s ease; }
.animate-pulse { animation: pulse 1.5s infinite; }
.animate-glow { animation: glow 2s infinite; }

/* Responsive */
@media (max-width: 768px) {
    :root {
        --card-width: 62px;
        --card-height: 89px;
    }

    .title { font-size: 32px; }
    .subtitle { font-size: 14px; }
    .btn { padding: 10px 20px; font-size: 15px; }
}

@media (max-width: 480px) {
    :root {
        --card-width: 54px;
        --card-height: 78px;
    }

    .title { font-size: 24px; }
    .btn { padding: 10px 18px; font-size: 14px; }
}

/* Très petits écrans (iPhone SE, etc.) */
@media (max-width: 375px) {
    :root {
        --card-width: 48px;
        --card-height: 69px;
    }
}

/* Mode paysage mobile : cartes plus compactes en hauteur */
@media (max-height: 500px) and (orientation: landscape) {
    :root {
        --card-width: 50px;
        --card-height: 72px;
    }
}
