/* ===== Variables HELMo ===== */
:root {
  --helmo-dark: #1C1C3C;
  --helmo-orange: #EF7C00;
  --helmo-teal: #7CBCB4;
  --helmo-red: #BA354C;
  --accent-color: #e84545;
  --default-color: #212529;
  --text-soft: #697386;
  --shadow-soft: 0 10px 26px rgba(31, 28, 62, 0.06);
  --shadow-card: 0 14px 34px rgba(31, 28, 62, 0.08);

  --helmo-primary: #2a2257;
  --helmo-primary-2: #4e3eb3;
  --helmo-accent: #f08aa0;
  --helmo-accent-2: #7cbcb4;
  --helmo-orange: #ef7c00;
  --helmo-bg: #f6f7fb;
  --helmo-border: #e9ebf3;
  --helmo-text: #23233b;
  --helmo-muted: #677189;
  --helmo-shadow: 0 12px 35px rgba(31, 28, 62, .08);

  --ui-bg: #f6f7fb;
  --ui-surface: #ffffff;
  --ui-border: #e6eaf0;
  --ui-text: #1f2937;
  --ui-muted: #6b7280;
  --ui-primary: #2a2257;
  --ui-accent: #4e3eb3;

  --ui-radius-lg: 18px;
  --ui-radius-md: 12px;

  --ui-shadow-1: 0 10px 25px rgba(0, 0, 0, 0.06);
  --ui-shadow-2: 0 20px 45px rgba(0, 0, 0, 0.10);
}





/* ===== Layout général ===== */
body {
  font-family: "Open Sans", "Segoe UI", Roboto, Arial, sans-serif;
  background-color: #f7f9fc;
  color: #333;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: "Cocogoose Pro", sans-serif;
  color: var(--helmo-dark);
}

h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -0.02em;
}

/* ===== Fond haut ===== */
#fond-haut {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 320px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* ===== En-tête ===== */
header {
  position: relative;
  z-index: 10;
}

body header #logo-application {
  height: 48px;
}

#titre-application {
  font-size: clamp(1.2rem, 3vw, 2rem) !important;
  line-height: 1.1;
  color: #fff !important;
}

/* ===== Contenu principal ===== */
#contenu {
  position: relative;
  z-index: 10;
  margin-top: 1rem;
}

#contenu-haut {
  border-radius: 1rem !important;
  min-height: 60vh;
}

/* ===== Fil d'ariane ===== */
#fil-ariane a {
  color: var(--helmo-dark);
}

#fil-ariane a:hover {
  color: var(--helmo-orange);
}

/* ===== Filtres / Sidebar ===== */
.recherche-cards {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}



#sidebar {
  display: grid;
  gap: 0.9rem;
}

#sidebar h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

#sidebar input[type="text"],
#sidebar select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  font-size: 0.9rem;
  color: #333;
  background-color: #fff;
  transition: border-color 0.15s ease;
}

#sidebar input[type="text"]:focus,
#sidebar select:focus {
  outline: none;
  border-color: var(--helmo-teal);
  box-shadow: 0 0 0 3px rgba(124, 188, 180, 0.2);
}

/* ===== Grille de cartes ===== */
.grille-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

/* ===== Cartes ===== */
.card {
  background: white;
  border-radius: 0.75rem;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid rgba(217, 226, 236, 0.95) !important;
}

.card-img-custom {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 0.75rem 0.75rem 0 0;
}


.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(28, 28, 60, 0.15);
  border-color: var(--helmo-teal);
}

.card a,
.card-link {
  text-decoration: none;
  color: inherit;
}

.card h2 {
  font-size: 1rem;
  margin: 0.5rem 0;
}

.card-content {
  margin: 0.5rem 1rem;
  font-size: 0.85rem;
  color: #666;
}


.filters-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 1.5rem;
}


.filters-state {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #6b7280;
  font-size: 0.84rem;
  line-height: 1;
  white-space: nowrap;
}

.filters-state__dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  flex: 0 0 auto;
  opacity: 0.95;
}



.filter-active {
  border-color: #93c5fd !important;
  background-color: #f8fbff;
  box-shadow: none;
}

.btn-reset-filters {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.93rem;
  font-weight: 600;
  color: #3559b7;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  text-decoration: underline;
  text-underline-offset: 0.16em;
  text-decoration-thickness: 1px;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    color 0.2s ease,
    text-decoration-color 0.2s ease;
}

.btn-reset-filters.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.btn-reset-filters:hover {
  color: #1d3f91;
  text-decoration-color: currentColor;
}

.btn-reset-filters:focus-visible {
  outline: 2px solid #2f6fed;
  outline-offset: 3px;
  border-radius: 0.3rem;
}



.fiche-topbar {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e9ecef;
}

.fiche-header {
  min-width: 0;
}

.fiche-header h1 {
  margin: 0;
  font-size: clamp(1.1rem, 3vw, 2rem);
}




/* ===== Fond bas ===== */
#fond-bas {
  height: 130px;
  pointer-events: none;
}

/* ===== Footer ===== */
#footer {
  background-color: #323237;
}

#footer a {
  color: #fff;
}

#footer a:hover {
  opacity: 0.8;
}

.reseau-social {
  transition: opacity 0.2s;
}

.reseau-social:hover {
  opacity: 0.7;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {

  .recherche-logiciels,
  .fiche-logiciel {
    grid-template-columns: 1fr;
  }

  #fond-haut {
    height: 200px;
  }

  #contenu {
    margin-top: 0.5rem;
  }

  #sidebar {
    flex-direction: row;
    flex-wrap: wrap;

    padding: 1rem;
    border: 1px solid #e5eaf2;
    border-radius: 1.25rem;
    background: linear-gradient(180deg, #ffffff, #fcfdff);
  }

  #sidebar input,
  #sidebar select {
    flex: 1 1 45%;
  }
}

@media (max-width: 576px) {
  #titre-application {
    font-size: 1.4rem !important;
  }

  #contenu-haut {
    border-radius: 0.5rem !important;
  }
}

/* ===== Navbar application ===== */
.app-nav {
  flex-shrink: 0;
}

.app-nav-link {
  font-size: 0.85rem;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.35em 0.9em;
  border-radius: 20px;
  transition: background 0.2s;
  white-space: nowrap;
}

.app-nav-link:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}



/* ===== Page d'accueil ===== */
.accueil {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.accueil-intro {
  text-align: center;
  padding: 2rem 1rem 1rem;
}

.accueil-titre {
  font-family: "Cocogoose Pro", sans-serif;
  color: var(--helmo-dark);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

.accueil-description {
  color: #555;
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.btn-accueil-primary {
  display: inline-flex;
  align-items: center;
  background-color: var(--helmo-dark);
  color: white !important;
  padding: 0.8rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none !important;
  transition: background-color 0.2s, transform 0.1s;
  gap: 0.5rem;
}

.btn-accueil-primary:hover {
  background-color: var(--helmo-orange);
  transform: translateY(-2px);
}

.accueil-compteur {
  font-weight: 400;
  opacity: 0.75;
  font-size: 0.9em;
}

.accueil-section-titre {
  font-family: "Cocogoose Pro", sans-serif;
  color: var(--helmo-dark);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--helmo-orange);
  display: inline-block;
}

.accueil-liens {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.accueil-lien-carte {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 1rem;
  color: var(--helmo-dark) !important;
  text-decoration: none !important;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
  gap: 0.5rem;
}

.accueil-lien-carte:hover {
  background-color: #eef2ff;
  border-color: #c7d2fe;
  transform: translateY(-3px);
}

.accueil-lien-carte i {
  color: var(--helmo-orange);
}

.accueil-lien-carte strong {
  font-size: 1rem;
  font-family: "Cocogoose Pro", sans-serif;
}

.accueil-lien-carte span {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.4;
}





/***********meta-bottom **************/
.meta-bottom {
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.meta-bottom i {
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  display: inline;
}

.meta-bottom a {
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  transition: 0.3s;
}

.meta-bottom a:hover {
  color: var(--accent-color);
}

.meta-bottom .cats {
  list-style: none;
  display: inline;
  padding: 0 20px 0 0;
  font-size: 14px;
}

.meta-bottom .cats li {
  display: inline-block;
}

.meta-bottom .tags {
  list-style: none;
  display: inline;
  padding: 0;
  font-size: 14px;
}

.tags li {
  display: inline-block;
}


.breadcrumb li::after {
  content: " /";
  margin: 0 0.5rem;
}

.breadcrumb li:last-of-type::after {
  content: "";
}

/********************/
.back-to-top {
  position: fixed;
  right: 2.5rem;
  bottom: 2.5rem;
  z-index: 900;

  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;

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

  background: #ae2d78;
  color: #fff;
  box-shadow: 0 10px 24px rgba(31, 28, 62, 0.18);

  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.96);

  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.back-to-top span {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  background: linear-gradient(135deg, var(--helmo-orange, #ef7c00), var(--helmo-accent, #f08aa0));
  box-shadow: 0 14px 30px rgba(31, 28, 62, 0.24);
}

.back-to-top:focus-visible {
  outline: 3px solid rgba(124, 188, 180, 0.45);
  outline-offset: 3px;
}

@media (max-width: 767px) {
  .back-to-top {
    right: 1rem;
    bottom: 1rem;
    width: 48px;
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }
}

/***********************/
#footer .heart {
  display: inline-block;
  color: var(--helmo-accent, #f08aa0);
  margin: 0 0.2rem;
  transform: scale(1.5);

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

#footer:hover .heart {
  transform: scale(2.2);
  color: var(--helmo-orange, #ef7c00);
}