:root {
    /* NOUVELLE PALETTE "FLOBESSET TRAINING" */
    --bg-color: #000000;
    --card-bg: #1c1c1e;
    --text-color: #ffffff;
    
    /* Le fameux dégradé Orange/Jaune Sport */
    --primary: #f09433; 
    --primary-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 50%, #dc2743 100%);
    
    --accent: #f1c40f; /* Jaune électrique pour les petits détails */
    --danger: #ff453a;
    --success: #30d158;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased; /* Pour un rendu net sur iPhone */
}

/* POLICE SPORTIVE POUR LES TITRES */
h1, h2, h3 {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 800; /* Très gras */
    font-style: italic; /* Italique comme sur la Story */
    text-transform: uppercase;
    letter-spacing: -0.5px;
    margin-top: 0;
}

a { text-decoration: none; color: inherit; }

.app-shell {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    padding: 20px;
    padding-top: max(20px, env(safe-area-inset-top)); /* Safe area iPhone */
    padding-bottom: 90px; /* Place pour la nav du bas */
    box-sizing: border-box;
}

/* CARTES (Liste exos, Stats...) */
.card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05); /* Légère bordure subtile */
}

/* BOUTONS PRINCIPAUX */
.btn-primary {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--primary-gradient); /* Le dégradé ! */
    color: white;
    text-align: center;
    border-radius: 14px;
    font-weight: 800; /* Gras */
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: transform 0.1s;
    box-shadow: 0 4px 15px rgba(240, 148, 51, 0.4); /* Ombre colorée */
}
.btn-primary:active { transform: scale(0.98); opacity: 0.9; }

/* INPUTS (Poids, Reps...) */
input, select {
    background: #2c2c2e;
    border: 1px solid #3a3a3c;
    color: white;
    padding: 12px;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    outline: none;
}
input:focus { border-color: var(--primary); }

/* LISTE DES EXOS (Active Session) */
.exercise-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 12px;
    border-left: 4px solid var(--primary); /* Petite barre orange à gauche */
}

/* BOTTOM NAV (Barre du bas) */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(28, 28, 30, 0.95); /* Semi-transparent */
    backdrop-filter: blur(20px); /* Effet flou iOS */
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 1000;
}
.nav-item {
    display: flex; flex-direction: column; align-items: center;
    color: #888; font-size: 0.7rem;
}
.nav-item.active { color: var(--primary); } /* L'icone active devient Orange */
.nav-icon { font-size: 1.4rem; margin-bottom: 4px; }

/* GRID DASHBOARD */
.dashboard-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 20px;
}
.tile-big { grid-column: span 2; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }

/* STATUS (Badge en cours/terminé) */
.status-badge {
    font-size: 0.75rem; padding: 4px 8px; border-radius: 6px; text-transform: uppercase; font-weight: bold;
}
.status-active { background: rgba(240, 148, 51, 0.2); color: var(--primary); border: 1px solid var(--primary); }
.status-completed { background: rgba(48, 209, 88, 0.2); color: var(--success); }

/* TIMER OVERLAY */
#rest-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.timer-display { font-size: 6rem; font-weight: bold; font-variant-numeric: tabular-nums; color: var(--primary); text-shadow: 0 0 30px rgba(240, 148, 51, 0.5); }
.btn-go {
    background: transparent; border: 2px solid white; color: white;
    padding: 15px 40px; border-radius: 30px; font-size: 1.2rem; margin-top: 30px; font-weight: bold;
}