/*
 * Full-page Anticipé route. The feed keeps the same card rhythm as Accueil,
 * but owns its own scroll surface so it never opens a floating layer.
 */

#anticipationViewContainer {
  position: fixed !important;
  inset: calc(var(--cid-layout-header-height, 50px) + env(safe-area-inset-top, 0px))
    0 0 0 !important;
  z-index: 120 !important;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 18px var(--cid-shell-side-padding, 14px)
    calc(112px + env(safe-area-inset-bottom, 0px)) !important;
  box-sizing: border-box;
  background: #ffffff !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

#anticipationViewContainer[hidden] {
  display: none !important;
}

#anticipationViewMount {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

body.anticipation-active {
  background: #ffffff !important;
}

body[data-cid-dedicated-view="anticipe"].anticipation-active .site-plant,
body[data-cid-dedicated-view="anticipe"].anticipation-active
  .cross-date-button,
body[data-cid-dedicated-view="anticipe"].anticipation-active
  #countryButtons,
body[data-cid-dedicated-view="anticipe"].anticipation-active
  #matrixCalcBtn {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.anticipation-feed {
  width: 100%;
  min-height: 220px;
  padding-bottom: 12px;
}

.anticipation-page-header {
  display: grid;
  gap: 5px;
  width: 96%;
  margin: 0 auto 12px;
  padding: 5px 0 3px;
}

.anticipation-eyebrow {
  color: #0962d6;
  font: 900 10px/1.2 'Noto Sans', sans-serif;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.anticipation-page-header h1 {
  margin: 0;
  color: #0a1840;
  font: 900 25px/1.1 'Noto Sans', sans-serif;
}

.anticipation-page-header p {
  margin: 0;
  color: #61748e;
  font: 600 12px/1.45 'Noto Sans', sans-serif;
}

.anticipation-feed {
  display: grid;
  gap: 12px;
}

.anticipation-post {
  width: 96% !important;
  max-width: 800px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid #e1e8f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(10, 24, 64, .06);
}

.anticipation-publication-modal,
.anticipation-unlocked-publication,
.anticipation-tableaux-publication {
  box-sizing: border-box;
  border: 1px solid #e1e8f2;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(10, 24, 64, .07);
}

.anticipation-tableaux-publication {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 8px 8px;
  overflow: hidden;
  --anticipation-tableaux-tint: #1769e0;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--anticipation-tableaux-tint) 7%, #ffffff),
      color-mix(in srgb, var(--anticipation-tableaux-tint) 3%, #ffffff)
    );
}

/*
 * Tableaux are complete programme blocks. Keep the official portfolio and
 * its anticipation control in one visual unit instead of leaving a white
 * gap that makes the action look detached from the publication.
 */
.anticipation-tableaux-publication[data-anticipation-feature="tableaux-intuition"] {
  --anticipation-tableaux-tint: #7c3aed;
}

.anticipation-tableaux-publication[data-anticipation-feature="tableaux-oracle"] {
  --anticipation-tableaux-tint: #ea580c;
}

.anticipation-tableaux-publication[data-anticipation-feature="tableaux-lnb"] {
  --anticipation-tableaux-tint: #16803c;
}

.anticipation-tableaux-publication[data-anticipation-feature="tableaux-balsa"] {
  --anticipation-tableaux-tint: #c58a00;
}

.anticipation-tableaux-publication[data-anticipation-feature="tableaux-standby"] {
  --anticipation-tableaux-tint: #d7a600;
}

.anticipation-tableaux-publication[data-anticipation-feature="tableaux-robot"],
.anticipation-tableaux-publication[data-anticipation-feature="tableaux-created"] {
  --anticipation-tableaux-tint: #0f766e;
}

.anticipation-tableaux-publication > .anticipation-tableaux-scope {
  margin: 0 !important;
  border-radius: 12px !important;
}

.anticipation-tableaux-publication > .anticipation-purchase,
.anticipation-tableaux-publication > .anticipation-access-required,
.anticipation-tableaux-publication > .anticipation-access-meta,
.anticipation-tableaux-publication > .anticipation-muted {
  width: 100%;
  box-sizing: border-box;
  margin: 8px 0 0;
}

.anticipation-tableaux-publication > .anticipation-purchase {
  align-items: center;
  gap: 8px;
  padding: 8px 10px 2px;
  border-top: 1px solid color-mix(
    in srgb,
    var(--anticipation-tableaux-tint) 18%,
    transparent
  );
}

.anticipation-tableaux-publication > .anticipation-purchase
  .anticipation-days-picker {
  min-height: 34px;
}

.anticipation-tableaux-publication > .anticipation-purchase
  .anticipation-unlock-button {
  min-height: 34px !important;
  margin: 0 !important;
}

.anticipation-tableaux-publication > .anticipation-access-required {
  margin-top: 8px;
  border-color: color-mix(
    in srgb,
    var(--anticipation-tableaux-tint) 22%,
    #dbe5f2
  );
  background: color-mix(
    in srgb,
    var(--anticipation-tableaux-tint) 5%,
    #ffffff
  );
}

.anticipation-post > .cid-fb-post,
.anticipation-unlocked-publication > .cid-fb-post {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  animation: none !important;
}

/*
 * Anticipé reuses the official portfolio as its root element. Keep the
 * key/cross pair in the same horizontal composition as the Tableaux route;
 * only the result tables span the full row.
 */
body.anticipation-active .anticipation-tableaux-scope {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

body.anticipation-active .anticipation-tableaux-scope > .container {
  grid-column: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* Only the two official key/cross cards may occupy the first grid row. */
body.anticipation-active
  .anticipation-tableaux-scope
  > .anticipation-tableaux-key-card {
  grid-column: auto !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
}

body.anticipation-active
  .anticipation-tableaux-scope
  > .anticipation-tableaux-key-card:nth-of-type(2) {
  grid-column: 2 !important;
}

body.anticipation-active
  .anticipation-tableaux-scope
  > .anticipation-tableaux-key-card:nth-of-type(1) {
  grid-column: 1 !important;
}

body.anticipation-active
  .anticipation-tableaux-scope
  > .cid-fb-more-button,
body.anticipation-active
  .anticipation-tableaux-scope
  > [data-feed-action^="anticipation:tableaux-"] {
  display: none !important;
}

body.anticipation-active .anticipation-tableaux-scope
  > .table-container,
body.anticipation-active .anticipation-tableaux-scope
  > [class*="valid-numbers"],
body.anticipation-active .anticipation-tableaux-scope
  > [class*="results-container"] {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin-inline: 0 !important;
  padding-inline: 0 !important;
  box-sizing: border-box !important;
}

.anticipation-card-placeholder {
  display: grid;
  align-content: center;
  gap: 9px;
  width: 96%;
  min-height: 210px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
  border: 1px solid #e4ebf4;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(248, 251, 255, .98));
  box-shadow: 0 7px 22px rgba(10, 24, 64, .05);
}

.anticipation-card-placeholder--croix {
  min-height: 390px;
}

.anticipation-card-placeholder--matrice,
.anticipation-card-placeholder--boules-rejetees {
  min-height: 330px;
}

.anticipation-card-placeholder--tableaux-universelle,
.anticipation-card-placeholder--tableaux-intuition,
.anticipation-card-placeholder--tableaux-oracle,
.anticipation-card-placeholder--tableaux-lnb,
.anticipation-card-placeholder--tableaux-balsa,
.anticipation-card-placeholder--tableaux-standby {
  min-height: 520px;
}

.anticipation-placeholder-kicker,
.anticipation-placeholder-date,
.anticipation-placeholder-line {
  display: block;
  border-radius: 999px;
  background: #e7eef7;
}

.anticipation-placeholder-kicker {
  width: 34%;
  height: 10px;
}

.anticipation-placeholder-date {
  width: 48%;
  height: 8px;
}

.anticipation-placeholder-line {
  width: 82%;
  height: 10px;
  margin-top: 12px;
}

.anticipation-placeholder-line--short {
  width: 58%;
  margin-top: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .anticipation-card-placeholder span {
    animation: anticipation-placeholder-pulse 1.35s ease-in-out infinite;
  }
}

@keyframes anticipation-placeholder-pulse {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}

.anticipation-post--croix {
  width: 100% !important;
  max-width: 800px !important;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.anticipation-unlocked-publication {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.anticipation-unlocked-publication > .cid-fb-post {
  width: calc(100% - 16px) !important;
  max-width: calc(100% - 16px) !important;
  margin: 0 8px 16px !important;
}

.anticipation-post--croix .anticipation-post-header {
  padding-inline: 0;
  background: transparent;
}

.anticipation-post--croix .anticipation-post-body {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.anticipation-post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 15px 11px;
}

.anticipation-avatar {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #1877f2, #0a3d98);
  font-weight: 900;
}

.anticipation-post .cid-fb-author {
  display: grid;
  flex: 1;
  gap: 3px;
}

.anticipation-post .cid-fb-page-name {
  color: #172e54;
  font: 900 13px/1.2 'Noto Sans', sans-serif;
}

.anticipation-post .cid-fb-time {
  color: #7b8ba1;
  font: 600 10px/1.2 'Noto Sans', sans-serif;
}

.anticipation-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #7b5b00;
  background: #fff6d8;
  font: 900 10px/1 'Noto Sans', sans-serif;
}

.anticipation-post.is-unlocked .anticipation-status {
  color: #126b46;
  background: #e5f7ee;
}

.anticipation-post .cid-fb-post-copy {
  margin: 0;
  padding: 0 15px 12px;
}

.anticipation-post .cid-fb-post-copy p {
  margin: 0;
  color: #1e3558;
  font: 700 12px/1.45 'Noto Sans', sans-serif;
}

.anticipation-tableaux-publication .cid-fb-more-button,
.anticipation-tableaux-scope .cid-fb-more-button {
  display: none !important;
}

.anticipation-post:not([data-anticipation-feature^="tableaux-"])
  .cid-fb-more-button {
  margin-top: 10px;
}

.anticipation-post-body {
  margin: 0 15px 15px;
  padding: 13px;
  border: 1px solid #e3ebf6;
  border-radius: 11px;
  background: #f8fbff;
}

.anticipation-post-body > .cid-fb-post {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.anticipation-post-body > .cid-fb-post .cid-fb-post-header,
.anticipation-post-body > .cid-fb-post .cid-fb-post-copy {
  padding-inline: 0 !important;
}

.anticipation-post-body > .cid-fb-post .cid-fb-post-copy {
  padding-top: 0 !important;
}

.anticipation-purchase {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.anticipation-action-feedback {
  flex: 1 0 100%;
  min-height: 16px;
  color: #5f7390;
  font: 700 11px/1.35 'Noto Sans', sans-serif;
}

.anticipation-action-feedback.is-error {
  color: #b42318;
}

.anticipation-access-meta {
  display: block;
  flex: 1 0 100%;
  margin-top: 2px;
  color: #61748e;
  font: 700 11px/1.35 'Noto Sans', sans-serif;
}

.anticipation-access-required {
  display: grid;
  gap: 6px;
  width: min(100%, 520px);
  margin: 10px auto 14px;
  padding: 12px 14px;
  border: 1px solid #f1d59a;
  border-radius: 12px;
  background: #fffaf0;
  color: #694c18;
  font: 700 11px/1.4 'Noto Sans', sans-serif;
  text-align: left;
}

.anticipation-access-required strong {
  color: #5c3c00;
  font-size: 12px;
}

.anticipation-access-ready {
  background: #f1fbf5;
  border-color: #86c79d;
}

.anticipation-access-ready strong {
  color: #1c6b3a;
}

.anticipation-access-required span {
  color: #80652e;
}

.anticipation-access-ready span {
  color: #416b50;
}

.anticipation-access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}

.anticipation-access-button {
  justify-self: start;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #b97800;
  border-radius: 8px;
  background: #b97800;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  text-align: center;
}

.anticipation-access-button--collective {
  border-color: #d7b979;
  background: #fff;
  color: #805d1f;
}

.anticipation-access-button:hover,
.anticipation-access-button:focus-visible {
  border-color: #8d5b00;
  background: #8d5b00;
  outline: 0;
}

.anticipation-access-ready .anticipation-access-button {
  border-color: #25834a;
  background: #25834a;
}

.anticipation-access-ready .anticipation-access-button:hover,
.anticipation-access-ready .anticipation-access-button:focus-visible {
  border-color: #176435;
  background: #176435;
}

.anticipation-access-button:disabled {
  cursor: wait;
  opacity: .65;
}

.anticipation-access-button--collective:hover,
.anticipation-access-button--collective:focus-visible {
  border-color: #a9874b;
  background: #fff8e8;
  color: #694c18;
}

.anticipation-tableaux-publication > .anticipation-access-meta {
  width: min(100% - 24px, 800px);
  margin: 8px auto 12px;
  text-align: center;
}

.anticipation-days-picker {
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid #c9dbf4;
  border-radius: 9px;
  color: #16345d;
  background: #fff;
  font: 700 12px/1.2 'Noto Sans', sans-serif;
}

.anticipation-unlock-button,
.anticipation-open-button {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  min-height: 38px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.anticipation-tableaux-publication .anticipation-unlock-button {
  border-color: var(--tableaux-action-color, #1464d2) !important;
  background: var(--tableaux-action-color, #1464d2) !important;
  color: var(--tableaux-action-contrast, #fff) !important;
}

.anticipation-tableaux-publication
  .anticipation-unlock-button:hover:not(:disabled) {
  border-color: var(--tableaux-action-color-strong, #0d4fae) !important;
  background: var(--tableaux-action-color-strong, #0d4fae) !important;
}

.anticipation-unlock-button:disabled {
  cursor: wait;
  opacity: .55;
}

.anticipation-open-button {
  margin-top: 10px;
  color: #0962d6;
  border: 1px solid #c9dbf4;
  background: #fff;
}

.anticipation-real-media {
  overflow: hidden;
  border: 1px solid #e3ebf6;
  border-radius: 10px;
  background: #fff;
}

.anticipation-result-details {
  overflow: hidden;
  margin: 0 12px 12px;
  border: 1px solid #e3ebf6;
  border-radius: 10px;
  background: #fff;
}

.anticipation-result-details[hidden] {
  display: none !important;
}

.anticipation-result-details-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #e5edf7;
  color: #17345d;
  font: 900 11px/1.25 'Noto Sans', sans-serif;
}

.anticipation-result-details-heading span {
  color: #74869d;
  font-size: 10px;
  text-align: right;
}

.anticipation-result-details .anticipation-data-list {
  padding-bottom: 8px;
}

.anticipation-image-media {
  padding: 0;
  background: #eef3fb;
}

.anticipation-real-image {
  display: block;
  width: 100%;
  max-height: min(62vw, 420px);
  object-fit: cover;
  object-position: center;
}

.anticipation-image-missing {
  min-height: 150px;
  display: grid;
  place-items: center;
  color: #62708a;
  background:
    linear-gradient(135deg, rgba(24, 119, 242, .08), rgba(24, 119, 242, .02)),
    #f4f7fc;
}

.anticipation-image-missing-label {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.anticipation-real-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #e5edf7;
  color: #17345d;
  font: 900 11px/1.25 'Noto Sans', sans-serif;
}

.anticipation-real-heading strong {
  color: #74869d;
  font-size: 10px;
  text-align: right;
}

.anticipation-cross-canonical-slot {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: 0;
  box-sizing: border-box;
  background: transparent;
}

.anticipation-cross-canonical-shell {
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
}

.anticipation-cross-canonical-slot > #redCross {
  flex: 0 1 auto;
  margin: 0 auto !important;
}

.anticipation-data-list {
  display: grid;
  gap: 0;
  padding: 4px 12px 8px;
}

.anticipation-data-row {
  display: grid;
  grid-template-columns: minmax(90px, .6fr) 1fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #edf2f8;
  color: #1e3558;
  font: 700 11px/1.35 'Noto Sans', sans-serif;
}

.anticipation-data-row:last-child {
  border-bottom: 0;
}

.anticipation-data-row span {
  color: #1769e0;
  font-weight: 900;
}

.anticipation-data-empty,
.anticipation-fallback-publication {
  margin: 0;
  padding: 12px;
  color: #687b95;
  font: 700 11px/1.45 'Noto Sans', sans-serif;
}

.anticipation-number-row span {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.anticipation-number-row b {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #cfe0f8;
  border-radius: 50%;
  color: #1769e0;
  background: #fff;
  font-size: 10px;
}

.anticipation-zero-row span,
.anticipation-number-row b {
  color: #8793a8;
}

.anticipation-cross-visual {
  position: relative;
  width: min(100%, 280px);
  aspect-ratio: 1;
  margin: 12px auto 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, #1769e0, #0d4db7);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

.anticipation-cross-visual::before,
.anticipation-cross-visual::after {
  position: absolute;
  content: "";
  background: rgba(255, 255, 255, .18);
}

.anticipation-cross-visual::before {
  top: 12%;
  bottom: 12%;
  left: calc(50% - 1px);
  width: 2px;
}

.anticipation-cross-visual::after {
  top: calc(50% - 1px);
  right: 12%;
  left: 12%;
  height: 2px;
}

.anticipation-cross-number {
  position: absolute;
  z-index: 1;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, .82);
  border-radius: 50%;
  background: rgba(8, 37, 91, .26);
  font: 900 18px/1 'Noto Sans', sans-serif;
}

.anticipation-cross-number--top { top: 12%; left: calc(50% - 21px); }
.anticipation-cross-number--right { top: calc(50% - 21px); right: 12%; }
.anticipation-cross-number--bottom { bottom: 12%; left: calc(50% - 21px); }
.anticipation-cross-number--left { top: calc(50% - 21px); left: 12%; }

.anticipation-cross-term {
  position: absolute;
  right: 0;
  bottom: 7%;
  left: 0;
  color: rgba(255, 255, 255, .9);
  font: 800 11px/1.2 'Noto Sans', sans-serif;
  text-align: center;
}

.anticipation-result-list,
.anticipation-number-groups {
  display: grid;
  gap: 7px;
}

.anticipation-result-row,
.anticipation-number-group {
  display: grid;
  gap: 3px;
  color: #1e3558;
  font: 700 11px/1.35 'Noto Sans', sans-serif;
}

.anticipation-result-row {
  grid-template-columns: minmax(100px, .6fr) 1fr;
  padding-bottom: 6px;
  border-bottom: 1px solid #e4edf8;
}

.anticipation-result-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.anticipation-result-row span {
  color: #0962d6;
  font-weight: 800;
}

.anticipation-number-group span {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.anticipation-number-group b {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #cfe0f8;
  border-radius: 50%;
  color: #0962d6;
  background: #fff;
  font-size: 10px;
}

.anticipation-loading,
.anticipation-muted,
.anticipation-empty {
  margin: 0;
  color: #687b95;
  font: 700 12px/1.45 'Noto Sans', sans-serif;
}

.anticipation-empty {
  width: 96%;
  margin: 12px auto;
  padding: 22px 15px;
  border: 1px dashed #c8d8ec;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

@media (max-width: 520px) {
  #anticipationViewContainer {
    padding-inline: 8px !important;
  }

  .anticipation-post-header {
    align-items: flex-start;
  }

  .anticipation-status {
    font-size: 9px;
  }

  .anticipation-result-row {
    grid-template-columns: 1fr;
  }

  .anticipation-data-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .anticipation-purchase {
    align-items: flex-start;
    flex-direction: column;
  }
}
