* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #24272b;
  --panel: #5f6368;
  --panel-dark: #4f5358;
  --header-start: #4c7cff;
  --header-end: #1c3f91;
  --menu: #5a8d3a;
  --text: #ffffff;
  --muted: #d6d9dd;
  --card: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.18);
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at top, #34383e 0%, var(--bg) 58%);
  color: var(--text);
}

button,
select,
input {
  font: inherit;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: linear-gradient(to bottom, var(--header-start), var(--header-end));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

.topbar h1 {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.burger {
  position: absolute;
  left: 18px;
  width: 42px;
  height: 38px;
  padding: 5px 6px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

/* ========================================
   RETOUR PORTFOLIO
======================================== */

.portfolio-return {
  position: absolute;
  right: 18px;
  top: 5px;

  width: 92px;

  display: flex;
  flex-direction: column;
  align-items: center;

  color: white;
  text-decoration: none;

  cursor: pointer;
}


/* Cercle de l'icône */

.portfolio-icon {
  position: relative;

  width: 42px;
  height: 42px;

  border: 3px solid white;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}


/* Corps de la mallette */

.portfolio-briefcase {
  position: relative;

  width: 25px;
  height: 17px;

  border: 3px solid white;
  border-radius: 4px;
}


/* Poignée */

.portfolio-handle {
  position: absolute;

  width: 12px;
  height: 7px;

  top: -9px;
  left: 50%;

  transform: translateX(-50%);

  border: 3px solid white;
  border-bottom: 0;

  border-radius: 4px 4px 0 0;
}


/* Ligne centrale de la mallette */

.portfolio-briefcase::after {
  content: "";

  position: absolute;

  left: -3px;
  right: -3px;

  top: 6px;

  border-top: 3px solid white;
}


/* Fermoir */

.portfolio-clasp {
  position: absolute;

  width: 7px;
  height: 7px;

  left: 50%;
  top: 3px;

  transform: translateX(-50%);

  background: var(--header-end);
  border: 2px solid white;

  z-index: 2;
}


/* Texte sous l'icône */

.portfolio-label {
  margin-top: 2px;

  font-size: 0.62rem;
  font-weight: 700;

  line-height: 1;
  white-space: nowrap;

  text-align: center;
}


/* Interaction */

.portfolio-return:hover .portfolio-icon,
.portfolio-return:focus-visible .portfolio-icon {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.portfolio-return:focus-visible {
  outline: none;
}

.burger:hover,
.burger:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: 2px solid rgba(255, 255, 255, 0.65);
}

.burger span {
  display: block;
  height: 3px;
  margin: 5px 0;
  border-radius: 99px;
  background: #10151d;
}

.sidebar {
  position: fixed;
  top: 0;
  left: -320px;
  width: min(320px, 88vw);
  height: 100vh;
  background: var(--menu);
  transition: left 0.25s ease;
  z-index: 999;
  box-shadow: 12px 0 30px rgba(0, 0, 0, 0.25);
}

.sidebar.open {
  left: 0;
}

.sidebar-inner {
  padding-top: 82px;
}

.sidebar-title {
  padding: 0 20px 20px;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: #101510;
}

.menu {
  display: flex;
  flex-direction: column;
}

.menu-item {
  padding: 18px 20px;
  background: #fff;
  color: #161616;
  text-align: center;
  text-decoration: none;
  border-bottom: 1px solid #d2d2d2;
  transition: background 0.15s ease, transform 0.15s ease;
}

.menu-item:hover,
.menu-item:focus-visible,
.active-link {
  background: #e5e8ea;
}

.menu-item:focus-visible {
  outline: 3px solid #244eae;
  outline-offset: -3px;
}

.main-content,
.graphs-main {
  min-height: 100vh;
  padding: 100px 20px 30px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.content-card,
.graphs-card {
  width: min(1100px, 94vw);
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, #686c71 0%, var(--panel) 100%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.card-heading h2,
.content-card > h2 {
  font-size: clamp(1.7rem, 4vw, 2.25rem);
}

.eyebrow {
  margin-bottom: 7px;
  color: #d7e5ff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #c8cdd3;
  border-radius: 8px;
  background: #fff;
  color: #151515;
}

.qualite-bon { color: #a9ec73 !important; }
.qualite-moyen { color: #ffd86b !important; }
.qualite-degrade { color: #ffb155 !important; }
.qualite-mauvais { color: #ff7b7b !important; }
.qualite-tres-mauvais { color: #d685ff !important; }
.qualite-extremement-mauvais { color: #d6d6d6 !important; }

.air-smiley-svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.20));
}

@media (max-width: 720px) {
  .topbar h1 {
    font-size: 1rem;
  }

  .content-card,
  .graphs-card {
    width: 100%;
    padding: 20px;
    border-radius: 18px;
  }

  .card-heading {
    flex-direction: column;
  }
}
