@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&family=Roboto:wght@400;500;700&display=swap');


:root {
    --primary-orange: #216E66;
    --primary-teal: #216E66;
    --light-blue: #F0F0F0;
    --light-green: #E9F4EE;
    --dark-teal: #57D4AA;
    --text-dark: #2F3B40;
    --text-light: #666;
    --border-light: #E0E0E0;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
    --bg-primary: #fff;
    --bg-secondary: #FBFBFB;
    /* Profile aliases */
    --bg-terciary: #FBFBFB;
    --bg-terciary-hover: #F0F0F0;
    --text-color: #424F6E;
    --text-secondary: #64748b;
    --secondary-color: #216E66;
    --border-color: #e2e8f0;
}

html.dark-mode {
    --primary-orange: #F28F19;
    --primary-teal: #FCFCFC;
    --light-blue: #464B5A;
    --light-green: #464B5A;
    --dark-teal: #57D4AA;
    --text-dark: #FCFCFC;
    --text-light: #FCFCFC;
    --border-light: #E0E0E0;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.3);
    --bg-primary: #3C414F;
    --bg-secondary: #353944;
    /* Profile aliases */
    --bg-terciary: #353944;
    --bg-terciary-hover: #464B5A;
    --text-color: #FCFCFC;
    --text-secondary: #BBBFC8;
    --secondary-color: #F28F19;
    --border-color: #555B6A;
}

html, body {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-dark);
    transition: background-color 0.3s ease, color 0.3s ease;
}

header .container {
    max-width: 80rem;
    padding: 0 15px;
}

/* Header */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    padding: 15px 0;
    z-index: 100;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
}

.header .container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.header__nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header__nav-link {
    color: var(--text-dark);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
}

.header__nav-link:hover {
    color: var(--primary-teal);
}

@media (max-width: 640px) {
    .header__nav {
        display: none;
    }
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-dark);
}

.container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 20px;
}

.installateur__title {
  font-weight: 700;
  margin-bottom: 50px;
}

.referencement-page-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 48px;
  margin-bottom: 48px;
}

.referencement-page-actions__button {
  align-items: center;
  border: 1px solid var(--primary-orange);
  border-radius: 50px;
  color: var(--primary-orange);
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 600;
  gap: 16px;
  padding: 12px 24px;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}

.referencement-page-actions__button:hover {
  background-color: var(--primary-orange);
  color: #fff;
  text-decoration: none;
}

.referencement-page-actions__button svg path {
  fill: var(--primary-orange);
}

.referencement-page-actions__button:hover svg path {
  fill: #fff;
}

/* Theme Switch */
.theme-toggle {
    position: relative;
    display: flex;
}

.theme-switch {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-switch-label {
    display: block;
    width: 60px;
    height: 30px;
    background-color: var(--border-light);
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: relative;
}

.theme-switch-label:hover {
    background-color: var(--bg-terciary);
}

.theme-switch-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 26px;
    height: 26px;
    background-color: var(--bg-primary);
    border-radius: 50%;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.theme-switch:checked + .theme-switch-label .theme-switch-slider {
    transform: translateX(30px);
}

.theme-switch:checked + .theme-switch-label {
    background-color: var(--primary-teal);
}

.theme-switch-icon {
    font-size: 14px;
    line-height: 1;
}

.theme-switch:focus + .theme-switch-label {
    outline: 2px solid var(--primary-teal);
    outline-offset: 2px;
}


/* Hero */
.hero {
  position: relative;
  overflow: visible;
}

.hero__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

@media (min-width: 640px) {
    .hero__inner {
        padding: 4rem 2rem 4rem 2rem;
    }
}

.hero__text {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 60px;
  flex-direction: column;
}

.hero__button {
  background: transparent;
  border: 1px solid white;
  color: white;
  padding: 12px 18px;
  border-radius: 999px;
  display: flex;
  gap: 14px;
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1;
  align-items: center;
  width: fit-content;
  transition: gap 200ms ease, background 200ms ease, color 200ms ease;
  text-decoration: none;
}

.hero__button:hover {
  background: rgba(255, 255, 255, 0.185);
  color: white;
  gap: 30px;
  text-decoration: none;
}

.hero__button svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.hero__title {
  color: white;
  font-weight: 800;
  font-size: 1.875rem;
  margin: 0px !important;
}

@media (min-width: 640px) {
    .hero__title {
        font-size: 2.875rem;
    }
}

.hero__desc {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  line-height: 1.625;
  margin: 0;
}

.hero__img {
  display: none;
  flex-shrink: 0;
  width: 28rem;
}

@media (min-width: 640px) {
    .hero__img {
        display: block;
    }
}

/* ResultCardList (list view) */
.result-list-row {
  border-bottom: 1px solid var(--border-light);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  cursor: pointer;
  transition: background-color 150ms;
  position: relative;
}

.result-list-row:last-child {
  border-bottom: none;
  margin-bottom: 0px;
}

.result-list-row:hover {
  background-color: var(--light-blue);
  color: inherit;
  text-decoration: none;
}

.result-list-left {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex: 0.8;
  min-width: 0;
  margin-bottom: 40px;
}

.result-list-logo {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.result-list-logo-img {
  max-height: 2rem;
  max-width: 80%;
  object-fit: contain;
}

.result-list-info {
  min-width: 0;
}

.result-list-name {
  font-weight: 700;
  color: #216e66;
  font-size: 1rem;
  line-height: 1.25;
  margin: 0 0 0.375rem;
}

.dark-mode .result-list-name {
  color: #fff;
}


.result-list-addr-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: 0.125rem;
}

.result-list-typologie {
    margin-top: 30px;
}

.result-list-typologie h4 {
    font-weight: 700;
    font-size: 18px;
}

.result-list-typologie-list {
    margin-top: 20px;
}

.result-list-typologie-list span {
    font-weight: 400;
    font-size: 16px;
}

.result-list-icon {
  flex-shrink: 0;
}

.result-list-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 40px;
}

.result-list-qualifs-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  margin: 0 0 0.5rem;
}

.result-list-qualifs-imgs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.result-list-picto {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  object-fit: cover;
}

.result-list-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--primary-orange);
  font-weight: 600;
  font-size: 0.875rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: gap 200ms;
  position: absolute;
  bottom: 1.25rem;
  right: 1.5rem;
}

.result-list-btn:hover {
  gap: 0.625rem;
}

@media (min-width: 640px) {
  .result-list-row {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 1.5rem 1.25rem 1.5rem;
  }

  .result-list-right {
    align-items: flex-end;
    flex-shrink: 0;
    text-align: right;
  }

  .result-card__name {
    font-size: 1rem;
  }

  .result-list-name {
    font-size: 1.125rem;
  }
}

.results-list {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1rem;
}

/* Results grid */
.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* Results list view */
.results-list-view {
  overflow: hidden;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.page-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--primary-orange);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 150ms;
  color: var(--primary-orange);
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.page-nav-btn:hover {
  background-color: var(--light-blue);
}

.page-nav-btn--disabled {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
  background: none;
  cursor: not-allowed;
  font-family: inherit;
}

.page-ellipsis {
  padding: 0 0.25rem;
  color: var(--text-light);
  font-size: 0.875rem;
}

.page-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
  background: none;
  border: none;
  cursor: pointer;
  transition: background-color 150ms;
  font-family: inherit;
}

.page-btn:hover {
  background-color: var(--light-blue);
}

.page-btn--active {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: var(--primary-orange);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-light);
  font-family: inherit;
}

.hidden-mobile {
  display: none;
}

@media (min-width: 640px) {
  .results-header {
    align-items: center;
  }

  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-nav-btn,
  .page-nav-btn--disabled {
    padding: 0.5rem 1rem;
  }

  .pagination {
    gap: 1.5rem;
  }

  .hidden-mobile {
    display: inline;
  }
}

@media (min-width: 1024px) {
  .results-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* breadcrumb */
.breadcrumb {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
  background-color: var(--light-blue);
}

.breadcrumb__container {
  max-width: 80rem;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
  padding: 16px 15px;
}

.breadcrumb__separator svg path {
  fill: var(--text-dark);
}

.breadcrumb__link {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 400;
}

.breadcrumb__link:hover {
  color: var(--primary-teal);
}

.breadcrumb__current {
  color: var(--text-dark);
  font-weight: 500;
}

@media (max-width: 1024px) {
  .breadcrumb__container {
    padding: 16px 1.5rem;
  }
}

@media (max-width: 640px) {
  .breadcrumb {
    margin-bottom: 1.5rem;
  }
  .breadcrumb__container {
    gap: 0.5rem;
    font-size: 0.8rem;
    flex-wrap: wrap;
    padding: 10px 1rem;
  }
  .breadcrumb__link,
  .breadcrumb__current {
    white-space: nowrap;
  }
}

/* Liens */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #0056b3;
  text-decoration: none;
}

/* Liens dans nav : animation underline depuis le centre */
nav a {
  position: relative;
  text-decoration: none;
}

nav:not(.referencement-pagination) a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

nav a:hover {
  color: rgb(240, 240, 240);
  text-decoration: none;
}

nav a:hover::after {
  transform: scaleX(1);
}

/* Titres */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Raleway', sans-serif;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* Paragraphes */
p {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Listes */
ul, ol {
  padding-left: 2rem;
}

li {
  margin-bottom: 0.25rem;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
}

/* Profile page */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(-35%);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.profil-page {
    padding: 0;
    background: var(--bg-terciary);
}

.profile {
    max-width: 80rem;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.profile__back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9375rem;
    margin-bottom: 2rem;
    padding: 0;
    transition: color 150ms;
}

.profile__back-btn:hover {
    color: var(--primary-teal);
}

.profile__loading {
    display: flex;
    justify-content: center;
    padding: 5rem 0;
}

.loading-dots {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.loading-dot {
    width: 0.5rem;
    height: 0.5rem;
    background-color: var(--text-secondary);
    border-radius: 50%;
    animation: bounce 1s infinite;
}

.profile__unavailable {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem 0;
}

.profile__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.profile__logo {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.profile__logo-img {
    max-height: 2.5rem;
    max-width: 80%;
    object-fit: contain;
}

.profile__name {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-color);
    margin: 0;
    text-transform: uppercase;
}

.profile__section {
    margin-bottom: 2rem;
}

.profile__section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 2rem;
}

.profile__desc {
    color: var(--text-secondary);
    line-height: 1.625;
    font-size: 0.875rem;
    margin: 0;
}

.profile__id-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 2rem;
}

.profile__id-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 150%;
}

.profile__id-cell--bold {
    font-weight: 500;
}

.profile__id-icon {
    color: var(--text-color);
    flex-shrink: 0;
}

.profile__id-link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 150ms;
}

.profile__id-link:hover {
    text-decoration: underline;
    color: var(--text-color);
}

.profile__work-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.profile__work-item {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
}

.profile__work-picto {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.profile__work-content {
    flex: 1;
}

.profile__work-header {
    display: flex;
    gap: 0.875rem;
    align-items: center;
}

.profile__work-name {
    font-weight: 700;
    color: #4CBF98;
    font-size: 1.2rem;
    margin: 0;
}

.profile__work-desc {
    color: var(--text-color);
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
    font-weight: 400;
}

.profile__quals-list {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
}

.profile__table {
    width: 100%;
    font-size: 0.875rem;
    border-collapse: collapse;
}

.profile__table thead tr {
    background-color: #4da99b;
    color: white;
}

.profile__th {
    text-align: left;
    padding: 0.875rem 1rem;
    font-weight: 600;
    vertical-align: middle;
}

.profile__th--center {
    text-align: center;
    padding: 0.875rem 1rem;
    font-weight: 600;
}

.profile__th-picto {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.25rem;
    object-fit: cover;
    flex-shrink: 0;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.profile__table th:first-child,
.profile__table td:first-child {
    width: 60%;
}

.profile__table th:nth-child(2),
.profile__table td:nth-child(2),
.profile__table th:nth-child(3),
.profile__table td:nth-child(3) {
    width: 20%;
}

/* Family header row */
.profile__family-row {
    background-color: var(--bg-terciary);
    border-top: 2px solid var(--border-color);
}

.profile__family-row:first-of-type {
    border-top: none;
}

.profile__family-cell {
    padding: 0.75rem 1rem;
    background-color: var(--bg-terciary-hover);
}

.profile__family-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9375rem;
}

/* Qualification rows */
.profile__qual-row {
    border-top: 1px solid var(--border-color);
    transition: background-color 150ms;
}

.profile__qual-row:hover {
    background-color: var(--bg-terciary-hover);
}

.profile__td {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
}

.profile__td--muted {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    white-space: nowrap;
    text-align: center;
}

.profile__td--center {
    padding: 0.75rem 1rem;
    text-align: center;
}

.profile__download-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--secondary-color);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.profile__download-link:hover {
    text-decoration: underline;
    color: var(--secondary-color);
}

/* Mobile — date + bouton passent sous le nom */
@media (max-width: 640px) {
    .profile__table thead th:nth-child(2),
    .profile__table thead th:nth-child(3) {
        display: none;
    }

    .profile__qual-row {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }

    .profile__qual-row td:nth-child(1) {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .profile__qual-row td:nth-child(2) {
        grid-column: 1;
        grid-row: 2;
        padding-top: 0;
        text-align: left;
        font-size: 0.8125rem;
    }

    .profile__qual-row td:nth-child(3) {
        grid-column: 2;
        grid-row: 2;
        padding-top: 0;
        text-align: right;
    }

    .profile__table th:first-child,
    .profile__table td:first-child {
        width: 100%;
    }
}

@media (min-width: 640px) {
    .profile {
        padding: 2rem 1.5rem;
    }
    .profile__name {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .profile__work-grid {
        grid-template-columns: 1fr;
    }
    .profile__id-grid {
        grid-template-columns: 1fr;
    }
}

/* Departement list */
.departement-list {
    padding: 0px 0 80px;
    background-color: var(--bg-primary);
}

.departement-list__title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 48px;
}

.departement-list__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (min-width: 768px) {
    .departement-list__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.departement-list__grid--columns {
    column-count: 2;
    column-gap: 32px;
    display: block;
}

@media (min-width: 768px) {
    .departement-list__grid--columns {
        column-count: 4;
    }
}

.departement-list__item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.departement-list__grid--columns .departement-list__item {
    break-inside: avoid;
    margin-bottom: 4px;
    padding: 4px 0;
}

.departement-list__item:hover {
    background-color: var(--light-blue);
    border-color: var(--dark-teal);
    color: var(--primary-teal);
    text-decoration: none;
}

.departement-list__num {
    font-weight: 400;
    font-size: 1;
    color: var(--primary-teal);
    min-width: 22px;
    flex-shrink: 0;
}

.departement-list__name {
    font-size: 1rem;
    color: var(--primary-teal);
    font-weight: 400;
}

.commune-list {
    padding-top: 24px;
}

.commune-list .departement-list__grid--columns {
    column-gap: 72px;
}

.commune-list__item {
    line-height: 1.2;
    margin-bottom: 0;
    padding: 1px 0;
}

.commune-list__item--new-letter {
    margin-top: 38px;
}

.commune-list__item--new-letter:first-child {
    margin-top: 0;
}

.commune-list__item:hover {
    background: transparent;
}

.commune-list__name {
    color: var(--primary-teal);
    font-size: 1rem;
    font-weight: 400;
}

/* Activities */
.activities {
    background-color: var(--light-green);
    padding: 40px 0 40px;
}

.activities__title {
    text-align: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0;
    margin-bottom: 35px;
}

.activities__subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 48px;
}

.activities__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (min-width: 640px) {
    .activities__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.activities__card {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 10px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-light);
    text-decoration: none;
    transition: transform 150ms ease, box-shadow 150ms ease;
    cursor: pointer;
    justify-content: center;
}

.activities__card:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.activities__card img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.activities__card span {
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary-teal);
    text-align: center;
}

/* Scroll to top */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    border-radius: 100px;
    padding: 1rem;
    background-color: #216E66;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(242, 143, 25, 0.2);
    z-index: 999;
    opacity: 0;
    transform: translateX(80px);
    transition: opacity 300ms ease, transform 300ms ease, box-shadow 150ms ease, padding 150ms ease;
    pointer-events: none;
}

.logo img {
    display: block;
    height: 44px;
    width: auto;
}

.hero--referencement {
    background-color: #216E66;
}

.installateur__title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

.result-list-empty {
    color: var(--text-light);
    font-size: 1rem;
    padding: 2rem 1rem;
    text-align: center;
    width: 100%;
}

.departement-list__grid > .result-list-empty {
    grid-column: 1 / -1;
}

.referencement-pagination {
    align-items: center;
    display: flex;
    gap: 28px;
    justify-content: center;
    margin: 32px auto 80px;
    max-width: 80rem;
    padding: 0 20px;
}

.referencement-pagination__nav,
.referencement-pagination__page {
    align-items: center;
    color: var(--primary-teal);
    display: inline-flex;
    font-weight: 600;
    justify-content: center;
    text-decoration: none;
}

.referencement-pagination__nav {
    border: 1px solid var(--border-light);
    border-radius: 999px;
    gap: 8px;
    padding: 0.5rem 1rem;
}

.referencement-pagination__nav:hover {
    background-color: #fff7ed;
}

.referencement-pagination__nav--next {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
}

.referencement-pagination__nav--disabled {
    color: var(--text-light);
    opacity: 0.55;
}

.referencement-pagination__page {
    border-radius: 999px;
    min-width: 2.25rem;
    height: 2.25rem;
}

.referencement-pagination__page--active {
    background: var(--primary-orange);
    color: #fff;
}

.referencement-pagination__ellipsis {
    color: var(--text-light);
    font-weight: 700;
}

@media (max-width: 640px) {
    .referencement-pagination {
        gap: 10px;
    }

    .referencement-pagination__nav {
        padding: 0 12px;
    }
}


.scroll-top-btn.visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.scroll-top-btn.visible:hover {
    transform: scale(0.95);
    background-color: #1c645d;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.banner {
    background: linear-gradient(90deg, #4CBF98 0%, #3BB19B 29.33%, #3BB19B 61.54%, #4CBF98 100%);
    padding: 10px 0;
    text-align: center;
    color: white !important;
}

.banner p {
    margin: 0;
}

/* Footer */
.footer {
    background: #0D6B63;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-content.links {
    margin-top: 60px;
    justify-items: center;
}

.footer-content.links a {
    width: fit-content;
}

.footer-logo {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #F28F19;
}

.footer-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-section h4 {
    font-size: 16px;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-section p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-section a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
}

.footer-bottom p {
    margin-bottom: 8px;
    color: #FBFBFB;
    font-weight: 400;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 24px;
    }


    .section-title {
        font-size: 24px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .cta-section .container {
        grid-template-columns: 1fr;
    }

    .cta-graphic {
        height: auto;
        max-height: 250px;
    }

    .cta-graphic img {
        width: 100%;
        height: auto;
        max-height: 250px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section {
        text-align: center;
    }

    .footer-section a {
        justify-content: center;
    }

    .footer-logo {
        display: flex;
        justify-content: center;
    }

    .footer-bottom {
        text-align: center;
    }
    
    .activities__card {
        flex-direction: column;
    }
}


