/* ============================================================
   Affiche de match (style des affiches Turonorum Guardians)
   Tout est proportionnel à la largeur (unités cqw) : l'affiche
   garde la même allure en miniature comme en grand.
   ============================================================ */
.aff {
  container-type: inline-size; position: relative; width: 100%; aspect-ratio: 3 / 2; overflow: hidden;
  background: #06142e; color: #fff; isolation: isolate; text-transform: uppercase;
  font-family: "Montserrat", "Inter", sans-serif;
}
.aff__fond {
  position: absolute; inset: -4%; z-index: -1;
  background:
    linear-gradient(180deg, rgba(6,22,52,.82), rgba(4,12,30,.9) 70%, rgba(2,6,16,.96)),
    url("https://cdn.eu.yapla.com/company/CPY2t8dYJs0UpXGh31B5SEzgD/website/article/74148/images/messenger_creation_9483f79b-017a-46d8-97d7-2e62d56fc7d5-1751455730.jpeg") center 40% / cover;
  filter: blur(.25cqw) saturate(.6);
  animation: aff-fond 20s ease-in-out infinite alternate;
}
@keyframes aff-fond { to { transform: scale(1.08); } }

/* --- Bandeau du haut --- */
.aff__haut { position: absolute; left: 6.5%; right: 6%; top: 5.5%; height: 13.5%; display: flex; align-items: center; }
.aff__bande {
  position: absolute; left: 1%; right: 0; top: 23%; height: 56%; z-index: -1;
  display: flex; justify-content: space-between; align-items: center; padding: 0 9.5% 0 10%;
  background: linear-gradient(90deg, rgba(150,165,190,.45), rgba(150,165,190,.32));
  clip-path: polygon(1.2% 0, 100% 0, 98.8% 100%, 0 100%);
  animation: aff-glisse-h .8s cubic-bezier(.2,.8,.2,1) both;
}
.aff__compet, .aff__date { display: flex; flex-direction: column; line-height: 1.02; font-family: "Orbitron", "Montserrat", sans-serif; letter-spacing: .04em; }
.aff__date { text-align: right; }
.aff__compet b, .aff__date b { font-weight: 800; font-size: 1.85cqw; white-space: nowrap; }
.aff__compet span, .aff__date span { font-weight: 400; font-size: 1.85cqw; white-space: nowrap; }
.aff__badge { position: relative; z-index: 2; height: 100%; flex-shrink: 0; animation: aff-pop .7s .3s cubic-bezier(.2,1.6,.4,1) both; }
.aff__badge--img { width: auto; max-width: 9cqw; object-fit: contain; background: #fff; padding: .4cqw; border-radius: .6cqw; height: 82%; }
.aff__badge--d1 {
  display: grid; place-items: center; aspect-ratio: .86;
  background: #c8102e; clip-path: polygon(50% 100%, 0 70%, 0 8%, 50% 0, 100% 8%, 100% 70%);
  filter: drop-shadow(0 .3cqw .6cqw rgba(0,0,0,.5));
}
.aff__badge--d1 span {
  display: grid; place-items: center; width: 82%; height: 84%; margin-top: -4%;
  background: linear-gradient(160deg, #2c4fa6, #1a3479); clip-path: inherit;
  font-family: "Orbitron", sans-serif; font-weight: 900; font-size: 3.1cqw; letter-spacing: -.05em; color: #e9eef9;
}
.aff__chevalier { position: absolute; right: -2.5%; top: 0; height: 115%; width: auto; border-radius: 50%; animation: aff-pop .7s .45s cubic-bezier(.2,1.6,.4,1) both; }

/* --- Panneaux logos --- */
.aff__panneaux { position: absolute; left: 0; right: 0; top: 22.6%; height: 45.4%; display: grid; grid-template-columns: 48.5% 48.1%; justify-content: space-between; }
.aff__pan {
  position: relative; display: grid; place-items: center; overflow: hidden;
  background: color-mix(in srgb, var(--c) 62%, transparent);
  border: .2cqw solid rgba(255,255,255,.28); border-bottom: 0;
  animation: aff-glisse-g .9s .1s cubic-bezier(.2,.8,.2,1) both;
}
.aff__pan--g { border-left: 0; }
.aff__pan--d { border-right: 0; animation-name: aff-glisse-d; }
.aff__pan img { max-width: 52%; max-height: 80%; object-fit: contain; filter: drop-shadow(0 .6cqw 1.2cqw rgba(0,0,0,.45)); animation: aff-logo .9s .5s cubic-bezier(.2,1.4,.4,1) both; }
.aff__initiale { font-family: "Montserrat", sans-serif; font-weight: 900; font-size: 13cqw; opacity: .85; }

/* --- Bandeaux noms + VS --- */
.aff__noms { position: absolute; left: 0; right: 0; top: 68.2%; height: 13.6%; display: grid; grid-template-columns: 1fr 1fr; }
.aff__nom {
  display: flex; flex-direction: column; justify-content: center; align-items: center; line-height: 1.05;
  background: var(--c); border-block: .25cqw solid #fff; text-align: center; padding: 0 5%;
  animation: aff-glisse-g .9s .2s cubic-bezier(.2,.8,.2,1) both;
}
.aff__nom--g { clip-path: polygon(0 0, 100% 0, 96.5% 100%, 0 100%); margin-right: -1.6%; padding-right: 7%; }
.aff__nom--d { clip-path: polygon(3.5% 0, 100% 0, 100% 100%, 0 100%); margin-left: -1.6%; padding-left: 7%; animation-name: aff-glisse-d; }
.aff__nom b { font-weight: 800; font-size: 3.5cqw; letter-spacing: .01em; }
.aff__nom span { font-weight: 400; font-size: 3.5cqw; }
.aff__nom b, .aff__nom span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aff__vs {
  position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -50%) skewX(-12deg);
  font-family: "Montserrat", sans-serif; font-weight: 900; font-style: italic; font-size: 5.4cqw; letter-spacing: -.06em; color: #fff;
  text-shadow: 0 0 1.2cqw rgba(0,0,0,.6); animation: aff-vs .6s .6s cubic-bezier(.2,1.8,.4,1) both;
}
.aff__vs::before {
  content: ""; position: absolute; left: 50%; top: -55%; width: .25cqw; height: 210%; background: #fff;
  transform: translateX(-50%) rotate(28deg); box-shadow: 0 0 .8cqw rgba(255,255,255,.8); z-index: -1;
}

/* --- Signature --- */
.aff__pied { position: absolute; left: 0; right: 0; bottom: 4.5%; display: flex; justify-content: center; align-items: center; gap: 1.1cqw;
  font-family: "Orbitron", sans-serif; font-weight: 700; font-size: 1.05cqw; letter-spacing: .3em; opacity: .92; }
.aff__pied img { height: 4.6cqw; border-radius: 50%; }

@keyframes aff-glisse-g { from { opacity: 0; transform: translateX(-12%); } to { opacity: 1; transform: none; } }
@keyframes aff-glisse-d { from { opacity: 0; transform: translateX(12%); } to { opacity: 1; transform: none; } }
@keyframes aff-glisse-h { from { opacity: 0; transform: translateY(-40%); } to { opacity: 1; transform: none; } }
@keyframes aff-pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
@keyframes aff-logo { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes aff-vs { from { opacity: 0; transform: translate(-50%, -50%) skewX(-12deg) scale(2.2); } to { opacity: 1; transform: translate(-50%, -50%) skewX(-12deg); } }
@media (prefers-reduced-motion: reduce) { .aff *, .aff__fond { animation: none !important; } }

/* Intégration (Mon espace / admin) */
.match__affiche--auto { cursor: default; }
.apercu-aff { margin-bottom: 2rem; padding: 1rem; background: rgba(5,7,13,.5); border: 1px solid rgba(138,164,207,.2); }
.apercu-aff .label { margin-bottom: .8rem; }
.autre-club { padding: 1rem; border: 1px dashed rgba(138,164,207,.35); display: flex; flex-direction: column; gap: 1rem; }
.autre-club[hidden], .logo-perso[hidden] { display: none; }
.field input[type=color] { height: 46px; padding: .3rem; cursor: pointer; }
.thumb--logo img, .ligne__img--logo img { object-fit: contain !important; background: rgba(255,255,255,.06); }

/* Recherche automatique du logo (admin) */
.logo-recherche { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.logo-recherche__etat { color: var(--acier); font-size: .88rem; }
.logo-choix { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: .8rem; }
.logo-choix:empty { display: none; }
.logo-choix button {
  width: 110px; padding: .5rem; display: flex; flex-direction: column; align-items: center; gap: .3rem; cursor: pointer;
  background: rgba(255,255,255,.06); border: 2px solid rgba(138,164,207,.25); color: var(--acier); font-size: .7rem; transition: .25s;
}
.logo-choix button img { width: 70px; height: 70px; object-fit: contain; }
.logo-choix button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo-choix button:hover, .logo-choix button.on { border-color: var(--glace); color: var(--blanc); background: rgba(207,227,255,.1); }

/* Bandeau des vignettes : logo VS logo */
.bandeau {
  container-type: inline-size; position: relative; aspect-ratio: 3 / 1; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr;
  background: linear-gradient(180deg, #04122b, #071d3d 50%, #02060f);
}
.bandeau__cote { position: relative; display: flex; align-items: center; min-width: 0; min-height: 0; }
.bandeau__cote::before {
  content: ""; position: absolute; left: 0; right: 0; top: 24%; bottom: 24%;
  background: var(--c); border-block: 1px solid rgba(255,255,255,.35);
}
.bandeau__cote:first-child { justify-content: flex-end; padding-right: 9cqw; }
.bandeau__cote:nth-child(2) { justify-content: flex-start; padding-left: 9cqw; }
.bandeau__cote img { position: relative; width: 27cqw; height: 28cqw; object-fit: contain; filter: drop-shadow(0 2px 5px rgba(0,0,0,.55)); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.bandeau__cote b { position: relative; width: 27cqw; text-align: center; font: 900 17cqw "Montserrat", sans-serif; }
.mcarte:hover .bandeau__cote img { transform: scale(1.08); }
.bandeau__vs {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) skewX(-12deg);
  font: italic 900 9cqw "Montserrat", sans-serif; letter-spacing: -.06em; text-shadow: 0 0 8px #000;
}
