﻿:root {
  --pad: clamp(12px, 2vw, 28px);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(15, 23, 42, 0.06);
  --bg: #f0f3f9;
  --bg-soft: #eef2f8;
  --card: rgba(255, 255, 255, 0.82);
  --text: #1f2328;
  --muted: #4f5d70;
  --line: #cbd5e5;
  --line-strong: #b8c5d8;
  --accent: #0a64c7;
  --accent-hover: #0957ad;
  --danger: #d13438;
  --danger-bg: #fde7e9;
}
* {
  box-sizing: border-box;
}
::selection {
    background: var(--line-strong);
    color: var(--text) ;
    
  }
/* Global (optionnel) */
html {
  -webkit-tap-highlight-color: transparent;
}

button,
a,
.burger,
details,
.burger * {
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  min-height: 100%;
}
body {
  margin: 0;
  font-family:
    "Segoe UI Variable Text",
    "Segoe UI",
    system-ui,
    -apple-system,
    Arial,
    sans-serif;
  background:
    radial-gradient(
      1200px 700px at -5% -15%,
      rgba(74, 136, 219, 0.18),
      transparent 60%
    ),
    radial-gradient(
      900px 500px at 105% 25%,
      rgba(120, 175, 237, 0.14),
      transparent 62%
    ),
    linear-gradient(180deg, #f8faff 0%, var(--bg) 100%);
  color: var(--text);
}
.wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: var(--pad);
  min-height: 100lvh;
}
.top h1 {
  font-size: clamp(1.9rem, 2.5vw, 3.2rem);
  margin: 0 0 0.35rem;
}
.muted {
  color: var(--muted);
}
.nav,
.card,
.item,
.modal__panel {
  position: relative;
  isolation: isolate;
}
.nav {
  padding: 0.78rem 0.9rem;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95),
    rgba(246, 250, 255, 0.86)
  );
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  backdrop-filter: blur(14px) saturate(130%);
}
.nav-main .nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.nav__brand {
  text-decoration: none;
  color: #0a4f8d;
  font-weight: 700;
  font-size: clamp(1rem, 1.1vw, 1.2rem);
  letter-spacing: 0.01em;
  padding: 0.42rem 0.6rem;
  border-radius: 10px;
  transition: 0.16s ease;
}
.nav__brand:hover {
  background: #eaf2fd;
  color: #084479;
}
.nav-main .nav__links {
  margin-top: 0.56rem;
}
.nav-main .nav__links-inner {
  display: flex;
  gap: 0.56rem;
  flex-wrap: wrap;
}
.nav::before,
.card::before,
.item::before,
.modal__panel::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius) - 1px);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.55);
}
.nav-main .nav__links a {
  text-decoration: none;
  color: var(--text);
  padding: 0.52rem 0.86rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: 0.12s ease;
}
.nav-main .nav__links a:hover {
  background: #f3f7fd;
  border-color: #d4ddee;
}
.nav-main .nav__links a.active {
  border-color: #c3d2e8;
  background: #e8f1fc;
  color: #0b5ea8;
  font-weight: 600;
}
.nav__burger {
  width: 42px;
  height: 42px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border-radius: 10px;
  border: 1px solid #bfd0e6;
  background: linear-gradient(180deg, #fff, #ecf3fc);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 3px 8px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: 0.16s ease;
}
.nav__burger:hover {
  border-color: #9fb8d8;
  background: linear-gradient(180deg, #fff, #e5eefb);
}
.nav__burger-line {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #23598e;
  transition:
    transform 0.22s ease,
    opacity 0.22s ease,
    width 0.22s ease;
}
.nav-main.is-open .nav__burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-main.is-open .nav__burger-line:nth-child(2) {
  opacity: 0;
  width: 0;
}
.nav-main.is-open .nav__burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
@media (max-width: 860px) {
  .nav-main {
    padding: 0.65rem 0.72rem;
  }
  .nav-main.is-ready .nav__burger {
    display: flex;
  }
  .nav-main.is-ready .nav__links {
    margin-top: 0.4rem;
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition:
      grid-template-rows 0.28s ease,
      opacity 0.24s ease,
      margin 0.24s ease;
  }
  .nav-main.is-ready .nav__links-inner {
    min-height: 0;
    overflow: hidden;
    display: grid;
    gap: 0.45rem;
  }
  .nav-main.is-ready .nav__links a {
    display: block;
    width: 100%;
  }
  .nav-main.is-ready.is-open .nav__links {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 0.72rem;
  }
}
.card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96),
    rgba(252, 254, 255, 0.88)
  );
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px) saturate(120%);
}
label {
  display: block;
  margin: 0.8rem 0 0.35rem;
  color: var(--muted);
}
input,
select,
textarea {
  width: 100%;
  padding: 0.78rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #fff, #fafcff);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.03);
}
input:hover,
select:hover,
textarea:hover {
  border-color: #aebfd7;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #8fb7e2;
  box-shadow: 0 0 0 3px rgba(10, 100, 199, 0.18);
}
input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: #fff;
  box-shadow: none;
  accent-color: var(--accent);
}
.checkline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.9rem 0 1rem;
  color: var(--text);
}
.checkline span {
  line-height: 1.3;
}
textarea {
  resize: vertical;
}
.row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.68rem 0.98rem;
  border-radius: 8px;
  border: 1px solid #b7c6dc;
  background: linear-gradient(180deg, #ffffff, #f3f7fd);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: 0.12s ease;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 1px 3px rgba(15, 23, 42, 0.06);
}
.btn:hover {
  background: linear-gradient(180deg, #ffffff, #edf3fc);
  border-color: #9cb2ce;
}
.btn.small {
  padding: 0.5rem 0.8rem;
  font-size: 0.94rem;
}
.btn.ghost {
  background: linear-gradient(180deg, #f8fbff, #edf3fb);
  border-color: #c2d0e3;
}
.btn.ghost:hover {
  background: linear-gradient(180deg, #ffffff, #e8f0fb);
}
.btn.danger {
  border-color: #efc3c5;
  background: var(--danger-bg);
  color: #a4262c;
}
.btn.danger:hover {
  background: #f9d7db;
}
.flash {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #f7fbff);
  overflow: hidden;
  transition:
    opacity 0.26s ease,
    height 0.26s ease,
    margin 0.26s ease,
    padding 0.26s ease,
    border-width 0.26s ease;
}
.flash.is-hiding {
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top-width: 0;
  border-bottom-width: 0;
}
.flash.success {
  border-color: #9fd6b4;
  background: #ecf7f0;
}
.flash.error {
  border-color: #efc3c5;
  background: #fff0f1;
}
.flash.warn {
  border-color: #f1d7a3;
  background: #fff8e8;
}
.filters {
  display: grid;
  grid-template-columns: 2fr 1.1fr 1.1fr 1.1fr 1.1fr 1.1fr auto;
  gap: 0.8rem;
  align-items: end;
}
.filters-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.filters-actions .btn {
  white-space: nowrap;
}
@media (max-width: 980px) {
  .filters {
    grid-template-columns: 1fr;
  }
}
.grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 1rem;
}
.item {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.97),
    rgba(248, 252, 255, 0.9)
  );
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px) saturate(120%);
}
.item h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.1rem, 1.4vw, 1.45rem);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.pill {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid #c5d3e6;
  border-radius: 999px;
  background: #eef4fc;
  color: #314258;
  word-break: break-all;
}
.sep {
  border: none;
  border-top: 1px solid var(--line);
  margin: 1rem 0;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.pager-top {
  margin: 1rem 0 0.65rem;
  scroll-margin-top: 12px;/* pour ancrage avec header fixe */
}
.pager-bottom {
  margin: 1rem 0 0;
}
.pager__token,
.pager__current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0.2rem 0.52rem;
  border-radius: 8px;
  border: 1px solid #c5d4e8;
  font-weight: 600;
  line-height: 1;
}
.pager__token {
  text-decoration: none;
  color: #1f3f65;
  background: #f3f8ff;
  transition: 0.12s ease;
}
.pager__token:hover {
  background: #eaf2fc;
  border-color: #afc3de;
}
.pager__token--arrow {
  min-width: 32px;
}
.pager__token.is-disabled {
  color: #7789a2;
  background: #f5f8fc;
  border-color: #d8e2ef;
  pointer-events: none;
}
.pager__current {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.tree {
  margin-top: 1rem;
  padding-left: 0;
  list-style: none;
}
.tree li {
  padding: 0.35rem 0 0.35rem 0.2rem;
  border-left: 1px solid #d6dfeb;
  margin-left: 0.6rem;
}
.tree .line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding-left: 0.6rem;
}
.badge {
  font-size: 0.82rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #c8d5e6;
  color: #456083;
  background: #f3f7fc;
}
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: min(4rem, 6%);
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(6px);
  z-index: 9999;
}
.modal.is-open {
  display: flex;
}
.modal__panel {
  width: min(560px, 100%);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96),
    rgba(250, 253, 255, 0.9)
  );
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}
.modal__panel h3 {
  margin: 0.2rem 0 0.6rem;
  font-size: clamp(1.2rem, 1.6vw, 1.55rem);
}
.modal__panel p {
  color: var(--muted);
}
.hint {
  margin: 0.6rem 0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid #c8d5e6;
  background: #f3f7fc;
  color: var(--muted);
}
[data-fav-id].is-dragging {
  opacity: 0.6;
  outline: 2px dashed #88aed9;
}
[data-fav-id].is-over {
  outline: 2px solid #5f97d5;
}
.btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: none;
}
.btn.active:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.site-footer {
  margin: 0 var(--pad) var(--pad);
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95),
    rgba(246, 250, 255, 0.86)
  );
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px) saturate(120%);
}
.site-footer__copy {
  color: var(--muted);
}
.site-footer__links {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.site-footer__links a {
  text-decoration: none;
  color: var(--text);
  padding: 0.45rem 0.66rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: 0.12s ease;
}
.site-footer__links a:hover {
  background: #f3f7fd;
  border-color: #d4ddee;
}
.site-footer__links a.active {
  border-color: #c3d2e8;
  background: #e8f1fc;
  color: #0b5ea8;
  font-weight: 600;
}
a {
  color: #0b5ea8;
}
a:hover {
  color: #0a4f8d;
}
