/* VERSU GOZZI - styles complementaires au CDN Tailwind. */

/* === Saisie scores : gros champs tactiles === */
.score-input {
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
    appearance: textfield;
}
.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.match-card.saved {
    transition: all 0.5s ease-out;
    opacity: 0;
    transform: translateY(-10px);
}
.match-card.error {
    border: 2px solid #dc2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,0.2);
}

/* === Mobile : champs touch-friendly mais compacts === */
@media (max-width: 768px) {
    /* Score inputs : raisonnables (pas geants) pour voir plusieurs matches */
    .score-input {
        font-size: 1.75rem !important;
        padding: 0.5rem !important;
        min-height: 56px !important;
    }
    /* Touch targets 44px minimum + font 16px (evite zoom auto iOS) */
    input[type="text"], input[type="number"], input[type="tel"],
    input[type="email"], input[type="password"], input[type="date"],
    input[type="url"], select, textarea, button {
        min-height: 44px;
        font-size: 16px !important;
    }
    main {
        padding: 0.75rem !important;
    }
    /* Espace en bas pour la nav mobile fixe */
    body {
        padding-bottom: 70px;
    }
    /* Cartes match plus compactes : padding reduit */
    .match-card {
        padding: 0.5rem !important;
    }
}

/* === Bottom nav mobile uniquement === */
.bottom-nav {
    display: none;
}
@media (max-width: 1023px) {
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #7c2d12;
        z-index: 50;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    }
    .bottom-nav a {
        flex: 1;
        text-align: center;
        padding: 0.5rem 0.25rem;
        color: rgba(255,255,255,0.85);
        font-size: 0.7rem;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }
    .bottom-nav a:hover, .bottom-nav a.active {
        background: rgba(0,0,0,0.2);
        color: white;
    }
    .bottom-nav svg {
        width: 22px;
        height: 22px;
    }
}

/* === Tables : transformation en cartes sur tres petit ecran === */
@media (max-width: 640px) {
    .table-cards {
        display: block;
    }
    .table-cards thead {
        display: none;
    }
    .table-cards tbody, .table-cards tr {
        display: block;
    }
    .table-cards tr {
        background: white;
        border-radius: 0.5rem;
        margin-bottom: 0.5rem;
        padding: 0.75rem;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
        border: 1px solid #e2e8f0;
    }
    .table-cards td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.35rem 0 !important;
        border: none !important;
        gap: 0.5rem;
    }
    .table-cards td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #64748b;
        font-size: 0.75rem;
        text-transform: uppercase;
    }
    .table-cards td:empty,
    .table-cards td:first-child::before {
        display: none;
    }
}

/* === Impression === */
@media print {
    .no-print, aside, header, footer, .bottom-nav { display: none !important; }
    body { background: white !important; padding-bottom: 0; }
}
