/*
 * Goweb.Consent - feuille de style du bandeau, du panneau, de l'icône et des encarts.
 * Aucune valeur propre à un site : le site hôte surcharge les variables ci-dessous.
 */

:root {
  --gc-primary: #1032cf;
  --gc-primary-contrast: #fff;
  --gc-text: #141414;
  --gc-text-muted: #555;
  --gc-bg: #fff;
  --gc-bg-muted: #f4f4f4;
  --gc-border: #d6d6d6;
  --gc-radius: 8px;
  --gc-font: inherit;
  --gc-font-size: 15px;
  --gc-z-index: 2147483000;
  --gc-max-width: 1280px;
  --gc-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
  --gc-focus: 0 0 0 3px rgba(0, 0, 0, 0.6);
}

/* ---- Base ------------------------------------------------------------- */

.gc-root,
.gc-root *,
.gc-placeholder,
.gc-placeholder *,
.gc-widget {
  box-sizing: border-box;
}

.gc-root,
.gc-placeholder,
.gc-widget {
  font-family: var(--gc-font);
  font-size: var(--gc-font-size);
  line-height: 1.5;
  color: var(--gc-text);
}

.gc-root [hidden] {
  display: none !important;
}

.gc-root a,
.gc-placeholder a {
  color: inherit;
  text-decoration: underline;
}

.gc-root :focus-visible,
.gc-placeholder :focus-visible,
.gc-widget:focus-visible {
  outline: 2px solid var(--gc-text);
  outline-offset: 2px;
  box-shadow: var(--gc-focus);
}

.gc-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Boutons ---------------------------------------------------------- */

.gc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  min-height: 44px;
  padding: 0.5em 1.25em;
  border: 2px solid var(--gc-primary);
  border-radius: 4px;
  background: var(--gc-bg);
  color: var(--gc-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.gc-btn:hover {
  opacity: 0.85;
}

.gc-btn--primary {
  background: var(--gc-primary);
  color: var(--gc-primary-contrast);
}

.gc-link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .gc-root,
  .gc-root *,
  .gc-widget {
    transition: none !important;
    animation: none !important;
  }
}

/* ---- Bandeau (disposition Cookiebot « barre en bas ») ------------------ */

.gc-banner {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--gc-z-index);
  display: flex;
  justify-content: center;
  padding: 0 16px 16px;
  pointer-events: none;
}

.gc-banner__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px 32px;
  align-items: start;
  width: 100%;
  max-width: var(--gc-max-width);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 24px 32px;
  border-radius: var(--gc-radius);
  background: var(--gc-bg);
  box-shadow: var(--gc-shadow);
  pointer-events: auto;
}

.gc-banner__logo {
  display: flex;
  align-items: center;
  align-self: center;
  width: 96px;
}

.gc-banner__logo img {
  display: block;
  max-width: 100%;
  height: auto;
}

.gc-banner__title {
  margin: 0 0 4px;
  font-size: 1em;
  font-weight: 700;
  line-height: 1.4;
  color: var(--gc-text);
}

.gc-banner__title:focus {
  outline: none;
}

.gc-banner__body {
  margin: 0 0 16px;
  font-size: 0.875em;
}

.gc-banner__switches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  font-size: 0.875em;
}

.gc-banner__details-toggle {
  color: var(--gc-primary);
  font-weight: 600;
  text-decoration: none;
}

.gc-banner__details-toggle::after {
  content: "\203A";
  display: inline-block;
  margin-left: 0.5em;
  transition: transform 0.2s ease;
}

.gc-banner__details-toggle[aria-expanded="true"]::after {
  transform: rotate(90deg);
}

.gc-banner__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: center;
}

/* ---- Interrupteurs ---------------------------------------------------- */

.gc-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.gc-switch__control {
  position: relative;
  flex: none;
  width: 32px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: var(--gc-text);
  cursor: pointer;
  transition: background 0.2s ease;
}

.gc-switch__control::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gc-bg);
  transition: transform 0.2s ease;
}

.gc-switch__control[aria-checked="true"] {
  background: var(--gc-primary);
}

.gc-switch__control[aria-checked="true"]::after {
  transform: translateX(14px);
}

.gc-switch__control[aria-disabled="true"] {
  cursor: not-allowed;
}

@media (max-width: 767px) {
  .gc-banner {
    padding: 0;
  }

  .gc-banner__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 20px 16px;
    border-radius: var(--gc-radius) var(--gc-radius) 0 0;
  }

  .gc-banner__logo {
    display: none;
  }

  .gc-btn {
    width: 100%;
    min-width: 0;
  }
}

/* ---- Encart de contenu bloqué ------------------------------------------ */

.gc-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-height: 200px;
  padding: 24px;
  border: 1px solid var(--gc-border);
  border-radius: var(--gc-radius);
  background: var(--gc-bg-muted);
  text-align: center;
}

.gc-placeholder__message {
  max-width: 36em;
  margin: 0;
  font-size: 0.9375em;
}

.gc-placeholder__external {
  font-size: 0.875em;
}

@media (max-width: 767px) {
  .gc-placeholder {
    aspect-ratio: auto !important;
    padding: 16px;
  }
}

/* ---- Détails du consentement ------------------------------------------ */

.gc-details {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--gc-border);
  font-size: 0.875em;
}

.gc-details__intro p {
  margin: 0 0 8px;
}

.gc-details__intro .gc-link-button,
.gc-details__intro a {
  color: var(--gc-primary);
  font-weight: 600;
}

.gc-details__categories-title {
  margin: 20px 0 8px;
  font-size: 1em;
  font-weight: 700;
}

.gc-details__categories-title:focus {
  outline: none;
}

.gc-category {
  border-bottom: 1px solid var(--gc-border);
}

.gc-category__title {
  padding: 12px 0;
  font-weight: 600;
  cursor: pointer;
}

.gc-category__description {
  margin: 0 0 12px;
  color: var(--gc-text-muted);
}

.gc-table-wrapper {
  margin-bottom: 16px;
  overflow-x: auto;
}

.gc-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.gc-table th,
.gc-table td {
  padding: 8px;
  border-bottom: 1px solid var(--gc-border);
  text-align: left;
  vertical-align: top;
}

.gc-table th {
  background: var(--gc-bg-muted);
  font-weight: 600;
}

.gc-table td:first-child,
.gc-table th:first-child {
  min-width: 150px;
  overflow-wrap: anywhere;
}

.gc-details__state {
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--gc-radius);
  background: var(--gc-bg-muted);
}

.gc-details__state-lines p {
  margin: 0 0 4px;
}

.gc-details__state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

/* ---- Icône de gestion des cookies ------------------------------------- */

.gc-widget {
  position: fixed;
  bottom: 16px;
  z-index: var(--gc-z-index);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--gc-primary);
  color: var(--gc-primary-contrast);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.gc-widget:hover {
  transform: scale(1.08);
}

.gc-widget--bottom-left {
  left: 16px;
}

.gc-widget--bottom-right {
  right: 16px;
}

@media print {
  .gc-banner,
  .gc-widget {
    display: none !important;
  }
}

.gc-table td:last-child,
.gc-table th:last-child {
  white-space: nowrap;
}

/* Détails dépliés : logo et boutons restent en haut plutôt qu'au milieu d'un long panneau. */
.gc-banner__inner:has(.gc-details:not([hidden])) .gc-banner__logo,
.gc-banner__inner:has(.gc-details:not([hidden])) .gc-banner__actions {
  position: sticky;
  top: 0;
  align-self: start;
}
