/* Thème Persée — repris du thème JAWStats historique
 * (palette : fond #aeadab, panneau blanc, accent olive #afb811,
 *  titres Bebas Kai, liens #345678)
 */

@font-face {
  font-family: "Bebas Kai";
  src: url(themes/default/fonts/BebasNeueRegular-webfont.eot);
  src: url(themes/default/fonts/BebasNeueRegular-webfont.eot?#iefix) format("embedded-opentype"),
       url(themes/default/fonts/BebasNeueRegular-webfont.woff2) format("woff2"),
       url(themes/default/fonts/BebasNeueRegular-webfont.woff) format("woff"),
       url(themes/default/fonts/BebasNeueRegular-webfont.ttf) format("truetype"),
       url(themes/default/fonts/BebasNeueRegular-webfont.svg#bebas_neue_regularregular) format("svg");
  font-weight: normal;
  font-style: normal;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #aeadab;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  color: #71716c;
}

#page {
  position: relative;
  margin: 0 auto;
  max-width: 1100px;
  padding: 0 32px 32px;
}

/* Bandeau : bannière Persée + titre */
#banner {
  padding: 10px 0 0;
}
#banner img.bandeau {
  width: 100%;
  max-width: 782px;
  display: block;
}

/* En-tête de page : titre + sélection */
h1 {
  font-family: "Bebas Kai", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #33332d;
  font-size: 28px;
  font-weight: normal;
  margin: 18px 0 4px;
}
h1 span { color: #afb811; }
h2 {
  font-family: "Bebas Kai", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #33332d;
  font-size: 20px;
  font-weight: normal;
  margin: 14px 0 4px;
}
h2 span { color: #345678; font-size: 15px; }

/* Onglets de navigation */
#tabs {
  margin: 12px 0 0;
  padding: 0;
  border-bottom: 2px solid #afb811;
}
#tabs a, #tabs span.tab {
  display: inline-block;
  padding: 6px 14px 5px;
  font-size: 12px;
  color: #71716c;
  text-decoration: none;
  background: #fff;
  border: 1px solid #d7d7d5;
  border-bottom: none;
  margin-right: 4px;
}
#tabs a:hover { color: #000; text-decoration: underline; }
#tabs span.tab, #tabs a.select {
  color: #000;
  font-weight: bold;
  background: #afb811;
  border-color: #afb811;
}

/* Navigation par mois */
#months { margin: 8px 0 4px; font-size: 11px; }
#months a { color: #345678; text-decoration: none; margin-right: 4px; }
#months a:hover { text-decoration: underline; }
#months span { color: #000; font-weight: bold; margin-right: 4px; }
#months span.changedivider { color: #71716c; font-weight: normal; }

/* Sous-vues (calendriers, continents, tops…) */
#subtabs {
  margin: 10px 0 0;
  padding: 0 0 6px;
  border-bottom: 1px solid #d7d7d5;
  font-size: 11px;
}
#subtabs a, #subtabs span.tab {
  display: inline-block;
  padding: 3px 10px;
  color: #345678;
  text-decoration: none;
  border: 1px solid #d7d7d5;
  background: #fff;
  margin-right: 4px;
}
#subtabs a:hover { text-decoration: underline; }
#subtabs span.tab { color: #000; font-weight: bold; background: #FAFBFC; }

/* Contenu */
#content {
  background: #fff;
  border: 1px solid #d7d7d5;
  padding: 18px 20px 24px;
  min-height: 300px;
}

/* Tableaux : style JAWStats (cellules #FAFBFC, bordures pointillées) */
table {
  border-collapse: collapse;
  margin-top: 10px;
  width: auto;
  font-size: 11px;
}
th, td {
  border: 1px dashed #C4D1DE;
  padding: 3px 8px;
  text-align: left;
}
th {
  background: #FAFBFC;
  color: #33332d;
  font-weight: normal;
}
td.nb { text-align: right; font-variant-numeric: tabular-nums; }

/* Graphes SVG */
svg.chart { margin-top: 8px; }
svg.chart rect { fill: #345678; }
svg.chart rect:hover { fill: #afb811; }
svg.chart text { fill: #71716c; font-size: 10px; }
svg.chart .axis { stroke: #C4D1DE; }

.muted { color: #999; font-size: 11px; }
a { color: #345678; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Drapeaux (vue pays) */
td.drapeau { padding: 3px 2px 1px; }
img.flag { vertical-align: middle; display: block; }

/* Calendriers mensuels */
table.calendrier { width: 100%; }
table.calendrier td.jour { vertical-align: top; min-width: 68px; }
table.calendrier td.vide { background: #FAFBFC; }
table.calendrier .quantieme { display: block; color: #999; font-size: 10px; }
table.calendrier td.total, tr.total td { font-weight: bold; background: #FAFBFC; }
tr.moyenne td { font-style: italic; }

/* URLs des référents (sans débordement) */
td.url { max-width: 420px; overflow-wrap: anywhere; }

/* Présentation du site public Persée (thème 2015). */
* { box-sizing: border-box; }
html, body { background: #aeadab; color: #333; }
body { font-family: Verdana, Arial, sans-serif; }
#sidebar { position: fixed; inset: 0 auto 0 0; width: 32px; background: #afb811 url('/themes/default/images/onglet.png') no-repeat left bottom / 100% auto; }
#page { margin: 0 1% 0 32px; max-width: none; min-height: 100vh; padding: 0 15px 30px; background: #fff; }
#banner { position: relative; height: 150px; padding: 10px 0 0; }
#banner img { width: 110px; height: 110px; }
#sitename { position: absolute; right: 11%; top: 76px; font: bold 36px 'Bebas Kai', sans-serif; color: #000; }
#sitename span { color: #afb811; }
.navigation { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
#months { display: flex; align-items: center; gap: 2px; margin: 0; white-space: nowrap; }
#months a, #months .disabled { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; padding: 3px 4px; margin: 0; text-decoration: none; }
#months img { display: block; width: 13px; height: 13px; }
#months a:hover img { opacity: .7; }
#months .disabled img { opacity: .6; }
#month-toggle { border: 0; padding: 4px 2px; background: transparent; color: #000; cursor: pointer; font: 14px Verdana, sans-serif; }
#tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; border: 0; }
#tabs a, #tabs span.tab { display: block; margin: 0; padding: 7px 15px 3px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #000; font-size: 14px; font-weight: normal; }
#tabs span.tab { border-bottom-color: #afb811; font-weight: bold; }
#tabs a:hover { color: #000; border-bottom-color: #afb811; text-decoration: none; }
.summary { margin: 12px 0 0; color: grey; font-size: 11px; }
.summary-stats { margin-top: 2px; }
#content { max-width: 970px; min-height: 350px; margin: 45px auto 0; padding: 0; border: 0; background: #fff; }
#content h2 { font: normal 20px Verdana, sans-serif; color: #33332d; margin: 0 0 2px; }
#content h2:not(.page-title) { margin-top: 16px; }
#subtabs { margin: 0 0 20px; padding: 0; border: 0; font-size: 12px; }
#subtabs a, #subtabs span.tab { display: inline; padding: 0; margin: 0; border: 0; background: transparent; color: #000; font-size: 12px; }
#subtabs a + a::before, #subtabs a + span::before, #subtabs span + a::before { content: '|'; display: inline-block; padding: 0 6px; color: #777; font-weight: normal; text-decoration: none; }
#subtabs span.tab { font-weight: bold; text-decoration: underline; text-decoration-color: #afb811; text-decoration-thickness: 2px; text-underline-offset: 3px; }
#content table { width: 100%; margin: 18px 0 0; border: 4px solid #fff; outline: 1px solid #9e9e7d; border-collapse: collapse; font: 12px Arial, sans-serif; }
#content th { background: #3f3e40; color: #eee; border: 1px solid #fff; padding: 7px; font-size: 14px; text-align: left; }
#content td { background: #fff; border: 1px solid #eee; padding: 5px; color: #333; }
#content tr:nth-child(odd) td { background: #eaebe9; }
#content tr.total td { background: #505050; color: #eee; font-weight: bold; }
#content tr.weekend td { background: #bfc0bd; }
#content th.sorted { background: #a9b938; }
#content th:has([aria-sort]), #content th[aria-sort] { background: #a9b938; }
.sort-button { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.sort-button::after { content: '↕'; color: #aaa; font-size: 11px; }
th[aria-sort="ascending"] .sort-button::after { content: '▲'; color: white; }
th[aria-sort="descending"] .sort-button::after { content: '▼'; color: white; }
.sort-button:focus-visible, .table-filters summary:focus-visible { outline: 2px solid #afb811; outline-offset: 3px; }
.table-filters { margin: 12px 0 0; color: #555; font: 12px Verdana, sans-serif; }
.table-filters summary { display: inline-block; cursor: pointer; text-decoration: underline; text-decoration-color: #afb811; }
.filter-fields { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.filter-fields label { display: flex; flex-direction: column; gap: 3px; }
.filter-fields fieldset { display: flex; gap: 5px; margin: 0; padding: 0; border: 0; }
.filter-fields legend { padding: 0 0 3px; }
.filter-fields fieldset label { color: #666; font-size: 11px; }
.filter-fields input { width: 130px; padding: 4px; border: 1px solid #aaa; font: inherit; }
.filter-fields input[aria-invalid="true"] { border-color: #b22; }
.filter-count { margin: 7px 0; color: #777; }
.counter-logo { display: block; max-width: 100%; height: auto; margin: 20px 0; }
.counter-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 22px; font-size: 12px; }
.counter-form label, .counter-form select { display: block; margin-bottom: 10px; }
.counter-form select { width: 100%; max-width: 440px; padding: 5px; font: 12px Verdana, sans-serif; }
.counter-form button { padding: 5px 14px; cursor: pointer; }
.counter-list h3 { margin: 0 0 12px; font-size: 14px; }
.counter-list details { margin: 5px 0 5px 12px; }
.counter-list summary { cursor: pointer; }
.counter-list ul { margin: 6px 0; padding-left: 22px; }
.counter-list li { margin: 4px 0; }
.counter-info { margin-top: 30px; font-size: 12px; }
#content[hidden] { display: none; }
#content td.nb { text-align: right; }
#content.vue-pays table, #content.vue-referents table, #content.vue-revues table, #content.vue-articles table { width: 75%; margin-left: auto; }
#content .repartition { float: left; width: 21%; margin: 20px 1% 0 0; color: #777; font-size: 11px; text-align: center; }
#content .repartition svg { display: block; width: 100%; max-height: 200px; }
#content.vue-cemois.sous-survol table { margin-top: 180px; }
#content table.calendrier { width: 100%; }
#content table.calendrier td.jour { min-width: 65px; }
#content table.calendrier { table-layout: fixed; border-collapse: separate; border-spacing: 2px; }
#content table.calendrier th, #content table.calendrier td { border: 0; }
#content table.calendrier th { padding: 3px 2px; background: #fff; color: #999; font: 11px Verdana, sans-serif; text-align: center; }
#content table.calendrier .libelle-semaine { width: 8%; padding-right: 4px; text-align: right; vertical-align: middle; }
#content table.calendrier td.jour { height: 52px; padding: 0 2px; background: #fbfbf9; vertical-align: top; }
#content table.calendrier td.jour.rempli { background: #eaebe9; }
#content table.calendrier td.vide, #content table.calendrier td.espace { background: #fff; }
#content table.calendrier .espace { width: 2%; }
#content table.calendrier .quantieme { color: #bbb; font: bold 15px Verdana, sans-serif; }
#content table.calendrier .valeur { display: block; color: #333; font: bold 15px Verdana, sans-serif; text-align: center; overflow-wrap: anywhere; }
#content table.calendrier td.cal-total, #content table.calendrier td.cal-moyenne { padding: 5px 2px; color: #333; background: #cdd593; font: bold 15px Verdana, sans-serif; text-align: center; vertical-align: middle; overflow-wrap: anywhere; }
#content table.calendrier td.cal-moyenne { background: #e8ebcd; }
#content table.calendrier small { font: 11px Verdana, sans-serif; }
#content table.calendrier .cal-spacer td { height: 130px; background: #fff; }
#content svg.chart { display: block; max-height: 180px; margin: 18px auto; }
#footer { padding: 70px 0 0; color: #888; font-size: 12px; }
#footer a { color: #888; }
.tutelles { display: flex; justify-content: flex-end; align-items: center; gap: 40px; }
.tutelles img { max-height: 54px; width: auto; }
#month-picker { position: relative; z-index: 2; max-width: 970px; margin: 10px auto; padding: 15px; border: 2px solid #888; background: #fff; }
#month-picker[hidden] { display: none; }
#month-picker h2 { margin: 0; font: 22px 'Bebas Kai', sans-serif; color: #111; }
#month-close { border: 0; background: transparent; cursor: pointer; font: 11px Verdana, sans-serif; }
#month-picker table { width: 100%; margin: 0; border: 0; font: 12px Verdana, sans-serif; }
#month-picker th, #month-picker td { border: 0; border-top: 1px solid #aab9d3; padding: 9px 4px; text-align: center; background: #fff; color: #444; font-weight: normal; }
#month-picker tr:first-child th, #month-picker tr:first-child td { border-top: 0; }
#month-picker td span { color: #a0acba; }
#month-picker td.selected { background: #dee5ed; }
@media (max-width: 750px) {
  .counter-layout { grid-template-columns: 1fr; }
  #sidebar { width: 10px; }
  #page { margin: 0 0 0 10px; padding: 0 14px 25px; }
  #banner { height: 120px; }
  #banner img { width: 80px; height: 80px; }
  #sitename { top: 40px; right: 0; max-width: 70%; font-size: 25px; text-align: right; }
  .navigation { gap: 8px; }
  #tabs { gap: 0; }
  #tabs a, #tabs span.tab { padding: 8px; font-size: 12px; }
  #content { margin-top: 35px; overflow-x: auto; }
  #content.vue-pays table, #content.vue-referents table, #content.vue-revues table, #content.vue-articles table { width: 100%; }
  #content .repartition { float: none; width: 180px; margin: 15px auto; }
  #content.vue-cemois.sous-survol table { margin-top: 45px; }
  #month-picker { overflow-x: auto; }
  #month-picker table { min-width: 760px; }
}
