/* ==========================================================================
   LDD — Ligue des Duellistes du Dimanche
   Styles spécifiques à l'app ldd/ — chargé globalement via base.html.
   ========================================================================== */

/* ── Accueil : chips de règles ───────────────────────────────────────────── */
.ldd-rule-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .35rem .85rem; border-radius: 20px; font-size: .8rem;
    background: rgba(0, 170, 255, .08); border: 1px solid rgba(0, 170, 255, .2);
    color: #c9d8e8;
}
.ldd-rule-chip strong { color: #e8f4ff; }
.ldd-rule-chip--bonus {
    background: rgba(var(--kaiba-gold-warm-rgb), .1);
    border-color: rgba(var(--kaiba-gold-warm-rgb), .3);
    color: #e8c84a;
}
.ldd-rule-chip--bonus strong { color: #FFD700; }

/* ── Formulaire de création de tournoi (.tc-*) ───────────────────────────── */
.tc-wrap { max-width: 1100px; margin: 0 auto; padding: 2rem 1rem; }

.tc-overline { font-family: 'Orbitron', sans-serif; font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; color: rgba(var(--kaiba-gold-warm-rgb), .7); margin-bottom: .4rem; }
.tc-title { font-family: 'Orbitron', sans-serif; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 900; color: #e8f4ff; letter-spacing: .04em; margin-bottom: .5rem; }
.tc-sub { color: rgba(201, 209, 217, .55); font-size: .9rem; max-width: 560px; margin: 0 auto; line-height: 1.7; }

.tc-section { background: rgba(5, 12, 25, .7); border: 1px solid rgba(0, 170, 255, .12); border-radius: 12px; overflow: hidden; }
.tc-section-header { display: flex; align-items: center; gap: .75rem; padding: .85rem 1.25rem; background: rgba(0, 170, 255, .04); border-bottom: 1px solid rgba(0, 170, 255, .08); }
.tc-section-num { font-family: 'Orbitron', sans-serif; font-size: .65rem; font-weight: 700; color: rgba(0, 170, 255, .5); letter-spacing: .1em; min-width: 1.8rem; }
.tc-section-title { font-family: 'Orbitron', sans-serif; font-size: .82rem; font-weight: 700; color: #c9d8e8; letter-spacing: .05em; text-transform: uppercase; margin: 0; }
.tc-section-body { padding: 1.25rem; }

.tc-label { display: block; font-size: .8rem; font-weight: 600; color: #a8bfd1; margin-bottom: .4rem; }
.tc-hint { font-size: .72rem; color: rgba(201, 209, 217, .4); margin-top: .3rem; line-height: 1.5; }
.tc-field-error { font-size: .75rem; color: #ff6b6b; margin-top: .3rem; }
.tc-date-warning { font-size: .72rem; color: #e8c84a; margin-top: .4rem; line-height: 1.5; }

.tc-section-body .form-control,
.tc-section-body .form-select {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(0, 170, 255, .18);
    color: #c9d8e8;
    border-radius: 8px;
    font-size: .88rem;
    transition: border-color .2s, box-shadow .2s;
}
.tc-section-body .form-control:focus,
.tc-section-body .form-select:focus {
    border-color: rgba(0, 170, 255, .55);
    box-shadow: 0 0 0 3px rgba(0, 170, 255, .1);
    background: rgba(0, 170, 255, .04);
    color: #e8f4ff;
    outline: none;
}
.tc-section-body .form-select option { background: #0a1420; color: #c9d8e8; }

.tc-format-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .75rem; }
.tc-format-card {
    position: relative; cursor: pointer;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(0, 170, 255, .12);
    border-radius: 10px; padding: 1rem .9rem;
    transition: border-color .2s, background .2s, transform .15s;
    display: flex; flex-direction: column; gap: .3rem;
    user-select: none;
}
.tc-format-card:hover { border-color: rgba(0, 170, 255, .35); background: rgba(0, 170, 255, .05); transform: translateY(-2px); }
.tc-format-card.is-selected { border-color: rgba(0, 170, 255, .7); background: rgba(0, 170, 255, .1); }
.tc-format-icon { font-size: 1.5rem; color: #00aaff; line-height: 1; }
.tc-format-card.is-selected .tc-format-icon { color: #FFD700; }
.tc-format-name { font-family: 'Orbitron', sans-serif; font-size: .72rem; font-weight: 700; color: #c9d8e8; letter-spacing: .04em; }
.tc-format-card.is-selected .tc-format-name { color: #FFD700; }
.tc-format-desc { font-size: .68rem; color: rgba(201, 209, 217, .45); line-height: 1.4; }
.tc-format-check { position: absolute; top: .6rem; right: .7rem; width: 20px; height: 20px; border-radius: 50%; background: #00aaff; color: #fff; display: none; align-items: center; justify-content: center; font-size: .6rem; }
.tc-format-card.is-selected .tc-format-check { display: flex; }

.tc-topcut-toggle .form-check-input { width: 2.5em; height: 1.3em; margin-top: .15em; }
.tc-topcut-toggle .form-check-input:checked { background-color: #00aaff; border-color: #00aaff; }

.tc-submit-card { background: rgba(5, 12, 25, .8); border: 1px solid rgba(var(--kaiba-gold-warm-rgb), .2); border-radius: 12px; padding: 1.25rem; }
.tc-submit-recap { display: flex; flex-direction: column; gap: .45rem; }
.tc-recap-line { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.tc-recap-key { font-size: .7rem; color: rgba(201, 209, 217, .4); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.tc-recap-val { font-size: .8rem; color: #e8f4ff; font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: calc(100% - 80px); }

.tc-submit-btn {
    position: relative; overflow: hidden;
    display: block; width: 100%; padding: .9rem 1.5rem;
    font-family: 'Orbitron', sans-serif; font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    background: linear-gradient(135deg, rgba(var(--kaiba-gold-warm-rgb), .15) 0%, rgba(var(--kaiba-gold-warm-rgb), .25) 100%);
    border: 1px solid rgba(var(--kaiba-gold-warm-rgb), .55);
    color: #FFD700;
    border-radius: 8px; cursor: pointer;
    transition: color .28s, border-color .28s, box-shadow .28s;
}
.tc-submit-btn:hover { color: #001a00; border-color: #FFD700; box-shadow: 0 6px 28px rgba(var(--kaiba-gold-warm-rgb), .35); }
.tc-submit-sweep { position: absolute; inset: 0; background: #FFD700; transform: translateX(-102%); transition: transform .38s cubic-bezier(.4, 0, .2, 1); z-index: 0; pointer-events: none; }
.tc-submit-btn:hover .tc-submit-sweep { transform: translateX(0); }
.tc-submit-btn i,
.tc-submit-btn span:not(.tc-submit-sweep) { position: relative; z-index: 1; }

@media (max-width: 575px) {
    .tc-format-grid { grid-template-columns: 1fr; }
}

/* ── Conteneurs à largeur max contrainte ─────────────────────────────────── */
.ldd-container-sm { max-width: 620px; }
.ldd-container-md { max-width: 800px; }
