/* -------------------- Material 3 Expressive Theme -------------------- */
/* Palette expressive basée sur Material You (source Google Material Design 3) */

:root {
  /* Couleurs de base */
  --md-sys-color-primary: #6750A4;
  --md-sys-color-on-primary: #FFFFFF;
  --md-sys-color-secondary: #625B71;
  --md-sys-color-on-secondary: #FFFFFF;
  --md-sys-color-tertiary: #7D5260;
  --md-sys-color-on-tertiary: #FFFFFF;

  /* Arrière-plan et surfaces */
  --md-sys-color-background: #FDF8FD;
  --md-sys-color-surface: #FEF7FF;
  --md-sys-color-on-surface: #1C1B1F;

  /* Variantes expressives */
  --md-sys-color-primary-container: #EADDFF;
  --md-sys-color-on-primary-container: #21005D;
  --md-sys-color-surface-variant: #E7E0EC;
  --md-sys-color-outline: #79747E;

  /* Typographie */
  --md-sys-typescale-body: 'Montserrat', sans-serif;
  --md-sys-typescale-title: 'Poppins', sans-serif;
}

/* Mode sombre automatique */
@media (prefers-color-scheme: dark) {
  :root {
    --md-sys-color-primary: #D0BCFF;
    --md-sys-color-on-primary: #381E72;
    --md-sys-color-background: #1C1B1F;
    --md-sys-color-surface: #1C1B1F;
    --md-sys-color-on-surface: #E6E1E5;
    --md-sys-color-surface-variant: #49454F;
    --md-sys-color-outline: #938F99;
  }
}

/* -------------------- Table Responsive -------------------------------*/
@import "https://fonts.googleapis.com/css?family=Montserrat:300,400,700";

.rwd-table {
  margin: 1em 1em;
  min-width: 300px;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid var(--md-sys-color-outline);
  overflow: hidden;
}

.rwd-table tr {
  border-top: 1px solid var(--md-sys-color-surface-variant);
  border-bottom: 1px solid var(--md-sys-color-surface-variant);
}
.rwd-table th {
  display: none;
}
.rwd-table td {
  display: block;
}
.rwd-table td:first-child {
  padding-top: .5em;
}
.rwd-table td:last-child {
  padding-bottom: .5em;
}
.rwd-table td:before {
  content: attr(data-th) " : ";
  font-weight: bold;
  width: 6.5em;
  display: inline-block;
  color: var(--md-sys-color-primary);
}
@media (min-width: 480px) {
  .rwd-table td:before {
    display: none;
  }
}
.rwd-table th, .rwd-table td {
  text-align: left;
}

@media (min-width: 480px) {
  .rwd-table th, .rwd-table td {
    display: table-cell;
    padding: 1em;
  }
}

.rwd-table tr:hover {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

/*------------------------- Main CSS ---------------------------------------*/
body {
  padding: 0;
  font-family: var(--md-sys-typescale-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-background);
  transition: background 0.3s ease, color 0.3s ease;
}

h1 {
  font-weight: normal;
  letter-spacing: -1px;
  color: var(--md-sys-color-primary);
}

.rwd-table th, .rwd-table td {
  margin: .5em 1em;
}

/* ---------------------- iframe Strava ------------------------------ */
#iframe_strava {
  margin: 0em 1em;
  border-radius: .8em;
  border: 1px solid var(--md-sys-color-outline);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/*------------------------ Highcharts figure ---------------------------*/
/*.highcharts-figure,
.highcharts-data-table table {
  min-width: 310px;
  max-width: 800px;
  margin: 1em auto;
}

#container {
  height: 400px;
}

.highcharts-data-table table {
  font-family: var(--md-sys-typescale-body);
  border-collapse: collapse;
  border: 1px solid var(--md-sys-color-outline);
  margin: 10px auto;
  text-align: center;
  width: 100%;
  max-width: 500px;
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface);
}

.highcharts-data-table caption {
  padding: 1em 0;
  font-size: 1.2em;
  color: var(--md-sys-color-primary);
}

.highcharts-data-table th {
  font-weight: 600;
  padding: 0.5em;
}

.highcharts-data-table td,
.highcharts-data-table th,
.highcharts-data-table caption {
  padding: 0.5em;
}

.highcharts-data-table thead tr,
.highcharts-data-table tr:nth-child(even) {
  background: var(--md-sys-color-surface-variant);
}

.highcharts-data-table tr:hover {
  background: var(--md-sys-color-primary-container);
}*/

/*---------------------- Fieldset --------------------*/
fieldset {
  width: max-content;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 8px;
  padding: 1em;
  background: var(--md-sys-color-surface);
}
