/* ============================================================================
   PMU PRO — Générateur Intelligent de Permutations
   ----------------------------------------------------------------------------
   Fichier : style.css
   Rôle    : Thème visuel de l'application (bleu foncé / blanc / gris clair).
             Complète Bootstrap 5 sans le remplacer.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. VARIABLES DE THÈME
   ------------------------------------------------------------------------- */
:root {
    --pmu-navy:        #0b2545;
    --pmu-navy-dark:   #061a33;
    --pmu-navy-light:  #17416e;
    --pmu-blue:        #1b6ec2;
    --pmu-gold:        #f5b301;
    --pmu-grey:        #f4f6f9;
    --pmu-grey-dark:   #dde3ec;
    --pmu-text:        #1f2937;
    --pmu-radius:      .75rem;
    --pmu-shadow:      0 .5rem 1.5rem rgba(11, 37, 69, .10);
    --pmu-shadow-lg:   0 1rem 2.5rem rgba(11, 37, 69, .22);
}

/* ---------------------------------------------------------------------------
   2. BASE
   ------------------------------------------------------------------------- */
body {
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    color: var(--pmu-text);
    background-color: var(--pmu-grey);
}

.bg-navy      { background-color: var(--pmu-navy) !important; }
.text-navy    { color: var(--pmu-navy) !important; }
.badge.bg-navy{ background-color: var(--pmu-navy) !important; }
.border-navy  { border-color: var(--pmu-navy) !important; }

/* ============================================================================
   3. PAGE D'ACCUEIL (index.php)
   ========================================================================== */
.page-accueil {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #fff;
    overflow-x: hidden;
}

.hero-background {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: url("images/hero.svg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--pmu-navy-dark);
}

.hero-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(140deg, rgba(6, 26, 51, .92) 0%, rgba(11, 37, 69, .82) 45%, rgba(27, 110, 194, .65) 100%);
}

.hero {
    flex: 1 0 auto;
    padding: 4rem 0 3rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem 1rem;
    border-radius: 999px;
    background: rgba(245, 179, 1, .15);
    border: 1px solid rgba(245, 179, 1, .45);
    color: var(--pmu-gold);
    font-size: .85rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(3rem, 9vw, 6rem);
    font-weight: 800;
    letter-spacing: .12em;
    line-height: 1.05;
    margin-bottom: .5rem;
    text-shadow: 0 .25rem 2rem rgba(0, 0, 0, .55);
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2.6vw, 1.6rem);
    font-weight: 300;
    color: var(--pmu-gold);
    letter-spacing: .04em;
    margin-bottom: 1.5rem;
}

.hero-text {
    max-width: 46rem;
    color: rgba(255, 255, 255, .82);
    font-size: 1.02rem;
    line-height: 1.7;
}

.btn-commencer {
    background: linear-gradient(135deg, var(--pmu-gold) 0%, #ff9d00 100%);
    color: #10233d;
    font-weight: 700;
    letter-spacing: .16em;
    padding: .95rem 3rem;
    border: none;
    border-radius: 999px;
    box-shadow: var(--pmu-shadow-lg);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.btn-commencer:hover,
.btn-commencer:focus {
    color: #10233d;
    transform: translateY(-3px);
    filter: brightness(1.06);
    box-shadow: 0 1.25rem 3rem rgba(245, 179, 1, .35);
}

.hero-stat {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--pmu-radius);
    padding: 1rem .5rem;
    backdrop-filter: blur(6px);
}

.hero-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}

.hero-stat-label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .65);
}

.hero-feature {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--pmu-radius);
    padding: 1.5rem;
    transition: transform .18s ease, background .18s ease;
}

.hero-feature:hover { transform: translateY(-4px); background: rgba(255, 255, 255, .1); }
.hero-feature i     { font-size: 1.9rem; color: var(--pmu-gold); }
.hero-feature h3    { font-size: 1.05rem; font-weight: 700; margin: .75rem 0 .5rem; }
.hero-feature p     { font-size: .88rem; color: rgba(255, 255, 255, .75); margin: 0; }

.hero-footer {
    flex-shrink: 0;
    padding: 1.25rem 0;
    font-size: .82rem;
    color: rgba(255, 255, 255, .55);
    background: rgba(6, 26, 51, .55);
}

/* ============================================================================
   4. APPLICATION (app.php)
   ========================================================================== */
.page-app { background-color: var(--pmu-grey); }

.navbar .nav-link            { color: rgba(255, 255, 255, .78); font-weight: 500; border-radius: .5rem; }
.navbar .nav-link:hover      { color: #fff; background: rgba(255, 255, 255, .08); }
.navbar .nav-link.active     { color: #fff; background: var(--pmu-navy-light); }

/* --- Cartes --------------------------------------------------------------- */
.card-pmu {
    border: 1px solid var(--pmu-grey-dark);
    border-radius: var(--pmu-radius);
    box-shadow: var(--pmu-shadow);
    overflow: hidden;
}

.card-header-pmu {
    background: linear-gradient(100deg, var(--pmu-navy) 0%, var(--pmu-navy-light) 100%);
    color: #fff;
    font-weight: 600;
    letter-spacing: .02em;
    border-bottom: none;
    padding: .85rem 1.1rem;
}

.card-header-pmu .btn-light { --bs-btn-color: var(--pmu-navy); font-weight: 600; }

/* --- Boutons -------------------------------------------------------------- */
.btn-pmu {
    background: linear-gradient(135deg, var(--pmu-navy) 0%, var(--pmu-blue) 100%);
    color: #fff;
    font-weight: 600;
    letter-spacing: .04em;
    border: none;
    border-radius: .6rem;
    transition: filter .18s ease, transform .18s ease;
}

.btn-pmu:hover, .btn-pmu:focus { color: #fff; filter: brightness(1.12); transform: translateY(-1px); }
.btn-pmu:disabled              { filter: grayscale(.4); transform: none; }

/* --- Tableaux ------------------------------------------------------------- */
.table-navy th {
    background-color: var(--pmu-navy);
    color: #fff;
    font-weight: 600;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-color: var(--pmu-navy-light);
}

.table-scroll        { max-height: 65vh; overflow-y: auto; }
.table-scroll thead th { position: sticky; top: 0; z-index: 2; }

/* --- Puces de chevaux ----------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: .25rem; }

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 .45rem;
    border-radius: .5rem;
    background: var(--pmu-navy);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    font-variant-numeric: tabular-nums;
}

.chip-favori   { background: var(--pmu-gold); color: #10233d; }
.chip-outsider { background: #0dcaf0; color: #062c36; }

/* --- Divers --------------------------------------------------------------- */
.exemple-box {
    background: var(--pmu-grey);
    border: 1px dashed var(--pmu-grey-dark);
    border-radius: .5rem;
    padding: .75rem;
    font-size: .85rem;
}

.exemple-box code { color: var(--pmu-navy); font-weight: 600; }

.stat-card   { transition: transform .18s ease, box-shadow .18s ease; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--pmu-shadow-lg); }
.stat-icon   { font-size: 1.6rem; display: block; margin-bottom: .35rem; }
.stat-value  { font-size: 1.55rem; font-weight: 700; color: var(--pmu-navy); line-height: 1.1; }
.stat-label  { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; }

.progress { height: .75rem; background-color: var(--pmu-grey-dark); }

.app-footer {
    background: var(--pmu-navy);
    color: rgba(255, 255, 255, .6);
}

.form-control:focus, .form-select:focus {
    border-color: var(--pmu-blue);
    box-shadow: 0 0 0 .2rem rgba(27, 110, 194, .18);
}

code { background: rgba(11, 37, 69, .06); padding: .1rem .35rem; border-radius: .3rem; }

/* --- Impression ----------------------------------------------------------- */
@media print {
    .navbar, .app-footer, .btn, form, .card-header-pmu .btn-group { display: none !important; }
    .card-pmu { box-shadow: none; border: 1px solid #999; }
    .table-scroll { max-height: none; overflow: visible; }
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 575.98px) {
    .hero { padding: 2.5rem 0; }
    .btn-commencer { width: 100%; padding: .85rem 1rem; }
    .chip { min-width: 1.75rem; height: 1.75rem; font-size: .78rem; }
    .stat-value { font-size: 1.25rem; }
}
