/* Bandeau de consentement aux témoins (Loi 25) et pages de politiques.
 * Couleurs du thème : --primary (rouge Sucre Solution), --foreground, --muted-foreground, --border. */

.sso-cc, .sso-cc * { box-sizing: border-box; }

.sso-cc {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 9990;
  max-width: 980px; margin: 0 auto;
  background: hsl(var(--background)); color: hsl(var(--foreground));
  border-top: 4px solid hsl(var(--primary));
  border-radius: calc(var(--radius) * 3);
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .35);
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
  padding: 22px 24px;
  display: flex; gap: 20px 28px; align-items: center; flex-wrap: wrap;
  transform: translateY(16px); opacity: 0; transition: transform .35s cubic-bezier(.22,1,.36,1), opacity .35s;
}
.sso-cc.is-on { transform: none; opacity: 1; }
.sso-cc__txt { flex: 1 1 420px; min-width: 0; }
.sso-cc__titre { font-weight: 700; font-size: 1.05rem; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.sso-cc__titre svg { color: hsl(var(--primary)); flex: none; }
.sso-cc__p { margin: 0; font-size: .9rem; line-height: 1.55; color: hsl(var(--muted-foreground)); }
.sso-cc__p a { color: hsl(var(--primary)); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.sso-cc__btns { display: flex; gap: 10px; flex-wrap: wrap; flex: 0 0 auto; }

.sso-btn {
  appearance: none; cursor: pointer; font: inherit; font-weight: 600; font-size: .9rem;
  padding: 11px 20px; border-radius: var(--radius); border: 2px solid hsl(var(--primary));
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  transition: background-color .2s, color .2s, border-color .2s; white-space: nowrap; line-height: 1.2;
}
.sso-btn:hover { background: hsl(var(--primary-dark)); border-color: hsl(var(--primary-dark)); }
.sso-btn--ligne { background: transparent; color: hsl(var(--primary)); }
.sso-btn--ligne:hover { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: hsl(var(--primary)); }
.sso-btn--lien { background: transparent; border-color: transparent; color: hsl(var(--foreground)); text-decoration: underline; text-underline-offset: 3px; padding-left: 8px; padding-right: 8px; }
.sso-btn--lien:hover { background: transparent; border-color: transparent; color: hsl(var(--primary)); }
.sso-btn:focus-visible, .sso-sw input:focus-visible + span { outline: 3px solid hsl(var(--ring) / .45); outline-offset: 2px; }

/* Fenêtre de personnalisation */
.sso-cc-fond { position: fixed; inset: 0; z-index: 9995; background: rgba(20, 20, 20, .55); display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .25s; }
.sso-cc-fond.is-on { opacity: 1; }
.sso-cc-box {
  width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto;
  background: hsl(var(--background)); color: hsl(var(--foreground));
  border-top: 4px solid hsl(var(--primary)); border-radius: calc(var(--radius) * 3);
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif; padding: 26px 26px 22px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .45);
}
.sso-cc-box h2 { margin: 0 0 8px; font-size: 1.3rem; font-weight: 700; }
.sso-cc-box > p { margin: 0 0 18px; font-size: .9rem; line-height: 1.55; color: hsl(var(--muted-foreground)); }
.sso-cc-box > p a { color: hsl(var(--primary)); font-weight: 600; }
.sso-cat { border: 1px solid hsl(var(--border)); border-radius: calc(var(--radius) * 2); padding: 14px 16px; margin-bottom: 10px; }
.sso-cat__haut { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sso-cat__nom { font-weight: 600; font-size: .95rem; }
.sso-cat__desc { margin: 6px 0 0; font-size: .85rem; line-height: 1.5; color: hsl(var(--muted-foreground)); }
.sso-cat__tjrs { font-size: .78rem; font-weight: 600; color: hsl(var(--primary)); white-space: nowrap; }
.sso-cc-box__btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 18px; }

/* Interrupteur */
.sso-sw { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.sso-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sso-sw span { width: 44px; height: 24px; border-radius: 999px; background: hsl(var(--muted-foreground) / .45); position: relative; transition: background-color .2s; }
.sso-sw span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.sso-sw input:checked + span { background: hsl(var(--primary)); }
.sso-sw input:checked + span::after { transform: translateX(20px); }

/* Liens du pied de page */
.sso-pied-liens { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-top: 8px; }
.sso-pied-liens a, .sso-pied-liens button { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; color: hsl(var(--primary-foreground) / .6); transition: color .2s; text-decoration: none; }
.sso-pied-liens a:hover, .sso-pied-liens button:hover { color: hsl(var(--primary)); }

/* Sous 768 px, la barre fixe « Nous joindre » (cta-mobile, ~66 px) occupe le bas de l'écran. */
@media (max-width: 767px) {
  .sso-cc { bottom: 78px; max-height: calc(100vh - 110px); overflow: auto; }
}
@media (max-width: 640px) {
  .sso-cc { left: 10px; right: 10px; padding: 18px; }
  .sso-cc__btns { width: 100%; }
  .sso-cc__btns .sso-btn { flex: 1 1 auto; }
  .sso-cc__btns .sso-btn--lien { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .sso-cc, .sso-cc-fond { transition: none; } }

/* Pages de politiques */
.sso-politique { padding: 48px 0 80px; }
.sso-politique .sso-pol-wrap { max-width: 820px; margin: 0 auto; padding: 0 1.5rem; font-family: Outfit, ui-sans-serif, system-ui, sans-serif; }
.sso-politique .sso-pol-surtitre { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .25em; color: hsl(var(--primary)); margin: 0 0 14px; }
.sso-politique h1 { font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.1; font-weight: 800; margin: 0 0 12px; color: hsl(var(--foreground)); }
.sso-politique .sso-pol-maj { font-size: .9rem; color: hsl(var(--muted-foreground)); margin: 0 0 36px; padding-bottom: 24px; border-bottom: 1px solid hsl(var(--border)); }
.sso-politique h2 { font-size: 1.35rem; font-weight: 700; margin: 40px 0 12px; color: hsl(var(--foreground)); padding-left: 14px; border-left: 4px solid hsl(var(--primary)); line-height: 1.3; }
.sso-politique h3 { font-size: 1.05rem; font-weight: 700; margin: 24px 0 8px; color: hsl(var(--foreground)); }
.sso-politique p, .sso-politique li { font-size: 1rem; line-height: 1.7; color: hsl(var(--muted-foreground)); }
.sso-politique p { margin: 0 0 14px; }
.sso-politique ul { margin: 0 0 16px; padding-left: 1.25rem; list-style: disc; }
.sso-politique li { margin-bottom: 6px; }
.sso-politique li::marker { color: hsl(var(--primary)); }
.sso-politique a { color: hsl(var(--primary)); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.sso-politique strong { color: hsl(var(--foreground)); }
.sso-politique .sso-pol-table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: .9rem; }
.sso-politique .sso-pol-table th, .sso-politique .sso-pol-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid hsl(var(--border)); color: hsl(var(--muted-foreground)); line-height: 1.5; }
.sso-politique .sso-pol-table th { color: hsl(var(--foreground)); font-weight: 600; background: hsl(var(--secondary)); }
.sso-politique .sso-pol-encadre { background: hsl(var(--secondary)); border-radius: calc(var(--radius) * 3); padding: 20px 22px; margin: 18px 0 22px; }
.sso-politique .sso-pol-encadre p:last-child { margin-bottom: 0; }
.sso-politique .sso-btn { text-decoration: none; display: inline-block; margin-top: 4px; }
@media (max-width: 640px) { .sso-politique .sso-pol-table { display: block; overflow-x: auto; } }

/* Bouton rond flottant pour rouvrir les préférences (après un choix) */
.sso-cc-rond {
  position: fixed; left: 18px; bottom: 18px; z-index: 9980;
  width: 46px; height: 46px; border-radius: 50%; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: hsl(var(--background)); color: hsl(var(--primary));
  border: 2px solid hsl(var(--primary)); box-shadow: 0 6px 18px -6px rgba(0,0,0,.35);
  opacity: 0; transform: scale(.85); pointer-events: none;
  transition: opacity .25s, transform .25s, background-color .2s, color .2s;
}
.sso-cc-rond.is-on { opacity: 1; transform: none; pointer-events: auto; }
.sso-cc-rond:hover { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.sso-cc-rond:focus-visible { outline: 3px solid hsl(var(--ring) / .45); outline-offset: 3px; }
.sso-cc-rond svg { width: 22px; height: 22px; }
@media (max-width: 767px) { .sso-cc-rond { left: 12px; bottom: 82px; width: 42px; height: 42px; } }
@media (prefers-reduced-motion: reduce) { .sso-cc-rond { transition: none; } }
