/* ========== DEBUT : tournoi/composer-equipe.css (version terrain, banc, postes, capitaine) ========== */
:root {
    --primary: #4B0082;
    --primary-light: #7B2FBE;
    --primary-dark: #2E004F;
    --gold: #FFCC00;
    --gold-dark: #e6b800;
    --bg-light: #F0F8FF;
    --white: #ffffff;
    --dark: #1a1a1a;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-hover: 0 15px 40px rgba(75,0,130,0.15);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* ========== NAVBAR ========== */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--light-gray);
}

.logo-nav { height: 45px; }

.nav-right { display: flex; align-items: center; gap: 20px; }

.user-badge {
    background: var(--primary);
    color: white;
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-picker {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--light-gray);
    padding: 8px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}
.lang-picker:hover { border-color: var(--gold); }

.btn-logout {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}
.btn-logout:hover { background: #c82333; transform: translateY(-2px); }

/* ========== MENU HAMBURGER ========== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

.nav-links { display: flex; gap: 15px; align-items: center; }
.nav-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 30px;
    transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { background: var(--primary); color: white; }

/* ========== CONTENU PRINCIPAL ========== */
.composer-main { padding: 40px 5%; }
.container { max-width: 1400px; margin: 0 auto; }

.page-title {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.page-title i { color: var(--gold); }

/* Carte info match */
.match-info-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 20px;
    padding: 25px 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}
.match-info-card h2 { font-size: 1.4rem; margin-bottom: 10px; }
.match-info-card p { font-size: 0.95rem; opacity: 0.9; }

/* Sélection de match */
.matchs-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 30px; }
.match-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--light-gray);
}
.match-item .teams { font-weight: 600; color: var(--dark); }
.match-item .date { color: var(--gray); font-size: 0.9rem; }
.btn-composer {
    background: var(--primary);
    color: white;
    padding: 8px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}
.btn-composer:hover { background: var(--primary-light); transform: translateY(-2px); }

/* ========== EN-TÊTE DE COMPOSITION ========== */
.composition-header {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.compteur {
    font-size: 1.1rem;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 30px;
    background: var(--white);
    box-shadow: var(--shadow);
    border: 2px solid var(--light-gray);
}
.compteur.ok { border-color: var(--success); color: var(--success); }
.compteur.pas-ok { border-color: var(--danger); color: var(--danger); }

/* ========== GRILLE TERRAIN + BANC ========== */
.composition-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 25px;
    margin-bottom: 30px;
}

/* ---- TERRAIN ---- */
.terrain-container {
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--light-gray);
}

.terrain-title {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.terrain-title i { color: var(--gold); }

.terrain {
    position: relative;
    width: 100%;
    height: 500px;
    background: linear-gradient(180deg, #2d8a4e 0%, #1e6b36 100%);
    border-radius: 12px;
    border: 4px solid white;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.3), 0 0 0 2px var(--light-gray);
    margin-bottom: 10px;
    overflow: hidden;
}

.info-texte {
    text-align: center;
    color: var(--gray);
    font-size: 0.85rem;
    margin-top: 10px;
}

/* Positions */
.position-slot {
    width: 110px;
    text-align: center;
    z-index: 2;
}

.position-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.position-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 30px;
    margin: 0 auto;
    border: 2px dashed rgba(255,255,255,0.6);
    border-radius: 15px;
    color: rgba(255,255,255,0.7);
    font-size: 0.7rem;
    cursor: default;
}

/* Badges joueurs (communs) */
.joueur-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    cursor: grab;
    transition: var(--transition);
    white-space: nowrap;
}
.joueur-badge:hover { transform: scale(1.05); box-shadow: 0 6px 12px rgba(0,0,0,0.3); }
.joueur-badge:active { cursor: grabbing; }

.joueur-badge.titulaire {
    background: var(--gold);
    color: var(--dark);
}
.joueur-badge.remplacant {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.joueur-numero {
    background: rgba(0,0,0,0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
}
.joueur-nom {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Étoile capitaine */
.capitaine-etoile {
    color: rgba(0,0,0,0.3);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}
.capitaine-etoile-active {
    color: var(--primary);
    text-shadow: 0 0 6px rgba(255,204,0,0.8);
    cursor: pointer;
    font-size: 0.9rem;
}

/* ---- BANC ---- */
.banc-container {
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--light-gray);
}

.banc-title {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.banc-title i { color: var(--gold); }

.banc {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 200px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 12px;
    border: 2px dashed var(--light-gray);
    margin-bottom: 10px;
    transition: border-color 0.3s;
}
.banc:hover { border-color: var(--primary-light); }

.empty-message {
    text-align: center;
    padding: 40px;
    color: var(--gray);
    font-size: 1rem;
}

/* ========== BARRE D'ACTIONS ========== */
.actions-bar {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.btn-secondary:hover { background: var(--primary); color: white; transform: translateY(-2px); }

.btn-save {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--dark);
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(255,204,0,0.3);
}
.btn-save:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255,204,0,0.5); }
.btn-save:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ========== FOOTER ========== */
footer {
    background: #0a0a0a;
    color: var(--white);
    padding: 40px 5% 20px;
    text-align: center;
    margin-top: auto;
}
.compliance-badges { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.badge-item {
    background: rgba(255,255,255,0.05);
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.8rem;
    color: var(--gold);
    border: 1px solid rgba(255,204,0,0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.contact-box { margin-bottom: 20px; }
.contact-item { color: var(--gold); text-decoration: none; margin: 0 15px; font-weight: 500; transition: var(--transition); }
.contact-item:hover { color: white; }
.legal p { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin: 5px 0; }

/* ========== TOASTS ========== */
.toast-container { position: fixed; bottom: 30px; right: 30px; z-index: 9999; display: flex; flex-direction: column; gap: 12px; }
.toast {
    background: white;
    border-radius: 16px;
    padding: 16px 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 6px solid;
    animation: slideIn 0.3s forwards;
    min-width: 280px;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--primary); }
.toast.warning { border-left-color: var(--warning); }
.toast-content { flex: 1; font-weight: 500; }
.toast-close { background: none; border: none; cursor: pointer; color: var(--gray); font-size: 1.4rem; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .composition-grid { grid-template-columns: 1fr; }
    .terrain { height: 400px; }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 5%;
        background: var(--white);
        padding: 25px;
        border-radius: 15px;
        width: 90%;
        max-width: 300px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        border: 1px solid var(--light-gray);
        z-index: 999;
        gap: 10px;
    }
    .nav-links.active { display: flex; }
    .composer-main { padding: 20px 3%; }
    .page-title { font-size: 1.6rem; }
    .terrain { height: 350px; }
    .match-item { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
    .page-title { font-size: 1.4rem; }
    .match-info-card { padding: 20px; }
    .terrain { height: 280px; }
    .actions-bar { flex-direction: column; }
    .btn-secondary, .btn-save { width: 100%; justify-content: center; }
    .joueur-badge { font-size: 0.75rem; padding: 4px 8px; }
}

@media (max-width: 200px) {
    body { font-size: 0.8rem; }
    nav { flex-direction: column; padding: 10px; }
    .nav-right { flex-wrap: wrap; gap: 10px; justify-content: center; }
    .nav-links { width: 100%; position: static; box-shadow: none; }
    .btn-logout { padding: 6px 14px; font-size: 0.75rem; }
}
/* ========== FIN : tournoi/composer-equipe.css ========== */