/* new */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Century Gothic, CenturyGothic, AppleGothic, sans-serif !important;
}

body {
    Font-family: Century Gothic, CenturyGothic, AppleGothic, sans-serif;
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

header {
    max-width: 100%;
    background: linear-gradient(135deg, #276749 0%, #2f855a 100%);
    color: #fff;
    text-align: center;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

section {
    margin-bottom: 10%;
}

.header-title {
    font-size: 150%;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.header-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

.screen {
    display: none;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease-in-out;
}

.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin: 1rem 0;
    padding: 1.5rem;
    border: 1px solid #f0f0f0;
}

.card h3 {
    color: #2f855a;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    text-align: center;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
}

.card input,
.card select {
    width: 100%;
    padding: 0.8rem;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.card input:focus,
.card select:focus {
    outline: none;
    border-color: #2f855a;
    box-shadow: 0 0 0 3px rgba(47, 133, 90, 0.1);
}

.card ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.card ul li {
    display: flex;
    justify-content: space-between;
    /* sanction à gauche, prix à droite */
    padding: 4px 0;
    border-bottom: 1px solid #eee;
    /* optionnel, pour séparer */
}

.card ul li span {
    flex: 1;
    /* occupe tout l’espace à gauche */
}

.card ul li strong {
    min-width: 60px;
    /* fixe la colonne des prix */
    text-align: right;
}

.sanction-item {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 12px;
    /* espace interne uniforme */
    margin: 10px;
    /* espace externe entre les bords du conteneur et la carte */
    box-shadow: 0 1px 0 rgba(0, 0, 0, .05);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Ligne 1 : joueur + bouton */
.sanction-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 10px;
    margin-right: 10px;
    margin-top: 5px;
}

.sanction-player {
    font-size: 0.95rem;
    font-weight: bold;
}

/* Bouton – */
.delete-btn {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border: none;
    border-radius: 6px;
    width: 22px;
    height: 22px;
    font-size: 14px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
    text-align: center;
    transition: background .2s, transform .15s;
}

.delete-btn:hover {
    background: rgba(220, 53, 69, 0.3);
    transform: scale(1.1);
}

/* Ligne 2 : sanction + prix */
.sanction-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 5px;
}

.sanction-desc {
    font-size: 0.9rem;
    color: #444;
}

.sanction-amount {
    font-weight: 700;
    font-size: 0.95rem;
}


/* Style spécifique pour le select de quantité */
#qtySelect {
    width: 100%;
    padding: 0.8rem;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
    appearance: none;
    /* supprime style par défaut navigateur */
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

/* focus : contour vert comme les autres champs */
#qtySelect:focus {
    outline: none;
    border-color: #2f855a;
    box-shadow: 0 0 0 3px rgba(47, 133, 90, 0.1);
}

/* optionnel : flèche custom comme pour "Lieu" */
#qtySelect {
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
    /* espace pour la flèche */
}




/* Overlay plein écran */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    /* activé par showLoader() */
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
    /* effet vitre */
}

/* Container du loader */
.loader-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Cercle animé */
.loader-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid #38a169;
    border-radius: 50%;
    animation: pulse 1.5s infinite ease-out;
    box-shadow: 0 0 15px rgba(56, 161, 105, 0.6);
}

.loader-circle.delay {
    animation-delay: 0.3s;
}

.loader-circle.delay2 {
    animation-delay: 0.6s;
}

/* Animation cercle qui s’agrandit et s’estompe */
@keyframes pulse {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Texte au centre */
.loader-text {
    position: absolute;
    font-size: 1rem;
    font-weight: bold;
    color: #38a169;
    text-shadow: 0 0 8px rgba(56, 161, 105, 0.8);
    animation: blink 1.2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}





.confirm-details {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 10px;
    font-size: 0.9rem;
}

.confirm-label {
    font-weight: bold;
    white-space: nowrap;
}

.confirm-value {
    word-break: break-word;
}

.player-name {
    display: block;
    /* chaque joueur forcé sur une ligne */
    margin-bottom: 2px;
}


.btn {
    width: 100%;
    padding: 0.8rem;
    border-radius: 10px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.5rem 0;
}

.btn-primary {
    background: linear-gradient(135deg, #2f855a 0%, #276749 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(47, 133, 90, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    color: #fff;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(56, 161, 105, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    color: #fff;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 100%;
    width: 100%;
    display: flex;
    justify-content: space-around;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 0.8rem 0;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
}

.nav-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
}

.nav-btn:hover {
    background: #f8f9fa;
    transform: scale(1.1);
}

.nav-btn.active {
    color: #2f855a;
    background: rgba(47, 133, 90, 0.1);
}

.list {
    list-style: none;
    padding: 0;
}

.list li {
    background: #f8f9fa;
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 10px;
    border-left: 4px solid #2f855a;
    transition: all 0.3s ease;
    height: 70px;
}

.list li:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}


.stat-card {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    color: #fff;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

.player-card.selected {
    background: #c6f6d5;
    /* vert clair */
    border: 2px solid #2f855a;
    /* bordure verte */
    transform: scale(1.05);
    /* petit zoom pour attirer l’œil */
    box-shadow: 0 4px 12px rgba(47, 133, 90, 0.3);
    /* ombre verte douce */
    transition: all 0.3s ease;
    /* animation fluide */
}

.back-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.2);
    /* Fond sombre translucide */
    color: #fff;
    border: none;
    border-radius: 10px;
    /* Bouton rond */
    cursor: pointer;
    font-size: 1.4rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease, transform 0.2s ease;
}

.back-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.back-btn:active {
    transform: scale(0.95);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.install-btn {
    /* masqué par défaut, affiché par JS */
    background: linear-gradient(135deg, #2f855a 0%, #276749 100%);
    position : absolute;
    color: #fff;
    right : 10px;
    font-size: 1rem;
    font-weight: bold;
    padding: 12px 20px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(47, 133, 90, 0.3);
    transition: all 0.3s ease;
    margin: 5px;
    text-align: center;
}

.install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(47, 133, 90, 0.4);
}

.install-btn:active {
    transform: scale(0.97);
}

.log-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.2);
    /* Fond sombre translucide */
    color: #fff;
    border: none;
    border-radius: 10px;
    /* Bouton rond */
    cursor: pointer;
    font-size: 1.4rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease, transform 0.2s ease;
}

.log-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.log-btn:active {
    transform: scale(0.95);
}

.log-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #38a169;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2f855a, #38a169);
    transition: width 0.3s ease;
}

.sanction-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.modal-input {
    width: 90%;
    padding: 8px 10px;
    margin: 6px 0 12px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.modal-input:focus {
    border-color: #888;
}