/* LAME — cartes de l'accueil et des sous-pages de rubrique (index.html, competition.html) */

/* ── Bruit de fond (opacité plus marquée sur ces pages) ── */
body::before { opacity: 0.028; }

/* ── Logotype LAME de l'en-tête (index.html) : dégradé or, plus foncé en mode clair ── */
.brand-logo { line-height: 0; }
.brand-logo svg { display: block; margin: 0 auto; width: clamp(190px, 56vw, 280px); height: auto; overflow: visible; }
.brand-logo stop:nth-child(1) { stop-color: #f0d080; }
.brand-logo stop:nth-child(2) { stop-color: #d4a94e; }
.brand-logo stop:nth-child(3) { stop-color: #b8923a; }
html[data-theme="light"] .brand-logo stop:nth-child(1) { stop-color: #c9a43a; }
html[data-theme="light"] .brand-logo stop:nth-child(2) { stop-color: #a8811f; }
html[data-theme="light"] .brand-logo stop:nth-child(3) { stop-color: #8a6a14; }

/* ── Carte outil ── */
.tool-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 22px 20px;
  margin-bottom: 12px;
  position: relative; overflow: hidden; cursor: pointer;
  transition: transform var(--t-spring), box-shadow var(--t-base), border-color var(--t-base);
  -webkit-tap-highlight-color: transparent;
}
.tool-card:active { transform: scale(.978); }
.tool-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(var(--wash),0.03) 0%, transparent 60%);
  pointer-events: none;
}
/* Bande latérale colorée */
.tool-card::after {
  content: ''; position: absolute; left: 0; top: 16px; bottom: 16px;
  width: 3px; border-radius: 2px;
}
.card-blue::after { background: var(--blue); }
.card-gold::after { background: var(--gold); }
.card-red::after  { background: var(--red); }

/* Hover */
.tool-card:hover  { transform: translateY(-3px); border-color: rgba(var(--wash),0.16); }
.card-blue:hover { box-shadow: var(--sh-blue); }
.card-gold:hover { box-shadow: var(--sh-gold); }
.card-red:hover  { box-shadow: 0 8px 32px rgba(224,90,74,0.22); }
.card-green::after { background: #5abe6a; }
.icon-green { background: rgba(90,190,106,0.12); border: 1px solid rgba(90,190,106,0.30); }
.card-green .card-title { color: #5abe6a; }
.card-green:hover { box-shadow: 0 8px 32px rgba(90,190,106,0.22); }
.card-orange::after { background: #ec871b; }
.icon-orange { background: rgba(236,135,27,0.12); border: 1px solid rgba(236,135,27,0.32); }
.card-orange .card-title { color: #ec871b; }
.card-orange:hover { box-shadow: 0 8px 32px rgba(236,135,27,0.22); }
.tag-orange { background: rgba(236,135,27,.13); color: #ec871b; border-color: rgba(236,135,27,.3); }
.card-purple::after { background: var(--purple); }
.icon-purple { background: var(--purple-dim); border: 1px solid var(--purple-b); }
.card-purple .card-title { color: #c08ae0; }
.card-purple .compound-item-iw { background: var(--purple-dim); border-color: var(--purple-b); }
.card-purple .compound-item:active { background: rgba(155,89,182,.08); }

/* Motif déco texte en fond */
.card-deco {
  position: absolute; right: -10px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 80px; letter-spacing: -2px; line-height: 1;
  opacity: .045; pointer-events: none; user-select: none;
}

/* Contenu de la carte */
.card-inner { display: flex; align-items: center; gap: 16px; }
.card-icon-wrap {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: transform var(--t-base);
}
.card-icon-wrap svg { width: 26px; height: 26px; }
.tool-card:hover .card-icon-wrap { transform: scale(1.08); }
.icon-blue { background: var(--blue-dim);  border: 1px solid var(--blue-b); }
.icon-gold { background: var(--gold-pale); border: 1px solid var(--border-gold); }
.icon-red  { background: rgba(224,90,74,0.12); border: 1px solid rgba(224,90,74,0.30); }

.card-text { flex: 1; min-width: 0; }
.card-title {
  font-family: var(--font-display);
  font-size: 22px; letter-spacing: 0.04em; line-height: 1;
  margin-bottom: 5px;
}
.card-blue .card-title { color: var(--blue); }
.card-gold .card-title { color: var(--gold); }
.card-red  .card-title { color: var(--red); }
.card-desc { font-size: 12px; color: var(--text-dim); line-height: 1.48; }
.card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.tag-green { background: rgba(90,190,106,.13); color: #5abe6a; border-color: rgba(90,190,106,.3); }

.card-arrow {
  flex-shrink: 0; font-size: 18px; color: var(--text-faint);
  transition: transform var(--t-base), color var(--t-base); margin-left: 4px;
}
.tool-card:hover .card-arrow { transform: translateX(3px); color: var(--text-dim); }

/* Carte "À venir" */
.card-soon {
  background: var(--surface); border: 1px dashed var(--border);
  border-radius: 14px; padding: 22px 20px; margin-bottom: 12px;
  position: relative; overflow: hidden; opacity: .52;
}
.card-soon-badge {
  position: absolute; top: 12px; right: 12px;
  font-size: 8px; letter-spacing: .18em; font-weight: 500;
  background: var(--surface3); color: var(--text-faint);
  padding: 3px 7px; border-radius: 4px; text-transform: uppercase;
}
.card-soon .card-deco { opacity: .025; }
.card-soon .card-title { color: var(--text-dim); }

/* ── Animations séquentielles ── */
.wrapper > * { animation: fadeUp .5s var(--t-spring) both; }
header    { animation-delay: .05s; }
.s1 { animation-delay: .12s; }
.c1 { animation-delay: .18s; }
.c2 { animation-delay: .24s; }
.c3 { animation-delay: .30s; }
.c4 { animation-delay: .36s; }
.c5 { animation-delay: .42s; }

/* ── Carte compound (en-tête + sous-items) ── */
.compound-card { cursor: default; }
.compound-card:hover { transform: none; border-color: var(--border2); box-shadow: none; }
.compound-card:active { transform: none; }
.compound-card:hover .card-icon-wrap { transform: none; }
.compound-card:hover .card-arrow { transform: none; color: var(--text-faint); }
.compound-header { display: flex; align-items: center; gap: 16px; padding: 16px 20px 14px; background: var(--surface2); border-bottom: 1px solid var(--border); }
.compound-item { display: flex; align-items: center; gap: 14px; padding: 13px 14px 13px 20px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--border); transition: background var(--t-base); -webkit-tap-highlight-color: transparent; }
.compound-item:last-child { border-bottom: none; }
.compound-item:hover { background: rgba(var(--wash),.04); }
.compound-item:active { background: rgba(89,162,214,.06); }
.compound-item-iw { width: 34px; height: 34px; border-radius: 8px; background: var(--blue-dim); border: 1px solid var(--blue-b); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.compound-item-iw svg { width: 16px; height: 16px; }
.item-label { display: block; font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.25; }
.item-desc { display: block; font-size: 11px; color: var(--text-faint); margin-top: 2px; line-height: 1.4; }

/* ── Bloc « Mes clubs » de l'accueil (index.html + assets/js/mes_clubs.js) : compétitions en cours / à venir ── */
.mc-bloc { background: var(--surface); border: 1px solid var(--border-gold); border-radius: 14px; margin-bottom: 14px; overflow: hidden; }
.mc-bloc[hidden] { display: none; }
.mc-tete { display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px 16px; border-bottom: 1px solid var(--border); background: var(--gold-pale); }
.mc-tete svg { width: 18px; height: 18px; flex-shrink: 0; }
.mc-titre { flex: 1; min-width: 0; font-family: var(--font-display); font-size: 19px; letter-spacing: .05em; color: var(--gold); line-height: 1.1; }
.mc-titre small { display: block; font-family: var(--font-body); font-size: 11px; letter-spacing: 0; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-gerer { flex-shrink: 0; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border2); background: var(--surface); color: var(--text-dim); font: 600 12px var(--font-body); cursor: pointer; }
.mc-gerer:hover { color: var(--text); border-color: var(--border-gold); }
.mc-sec { padding: 10px 16px 4px; }
.mc-sec + .mc-sec { border-top: 1px solid var(--border); }
.mc-sec-lbl { display: flex; align-items: center; gap: 8px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; margin-bottom: 8px; }
.mc-direct { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: rgba(224,90,74,.14); color: var(--red); letter-spacing: .06em; }
.mc-direct::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: mcPulse 1.4s ease-in-out infinite; }
@keyframes mcPulse { 50% { opacity: .3; } }
.mc-ev { padding: 8px 0 10px; }
.mc-ev + .mc-ev { border-top: 1px dashed var(--border); }
.mc-ev-t { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.3; }
.mc-ev-s { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }
.mc-eps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.mc-ep { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border2); background: var(--surface2); color: var(--text-dim); font-size: 12px; text-decoration: none; }
.mc-ep:hover { border-color: var(--border-gold); color: var(--text); }
.mc-ep span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-ep b { flex-shrink: 0; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--gold-pale); color: var(--gold); font-size: 11px; text-align: center; }
.mc-ep i { flex-shrink: 0; font-style: normal; font-size: 10.5px; color: var(--text-faint); }
.mc-ep.live i { color: var(--red); font-weight: 600; }
.mc-plus { display: block; width: 100%; margin: 0 0 8px; padding: 7px; border: 1px dashed var(--border2); border-radius: 8px; background: none; color: var(--gold); font: 600 12px var(--font-body); cursor: pointer; }
.mc-rien { font-size: 12.5px; color: var(--text-dim); padding: 10px 16px 12px; }
.mc-invite { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 14px; padding: 11px 14px; border: 1px dashed var(--border-gold); border-radius: 12px; background: none; color: var(--text-dim); font: 13px var(--font-body); text-align: left; cursor: pointer; }
.mc-invite:hover { color: var(--text); background: var(--gold-pale); }
.mc-invite svg { width: 18px; height: 18px; flex-shrink: 0; }
.mc-invite b { color: var(--gold); font-weight: 600; }

/* ── Sous-page de rubrique : retour à l'accueil ── */
.back-home { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--text-dim); text-decoration: none; font-size: 13px; }
.back-home:hover { color: var(--gold); }
.back-home svg { width: 16px; height: 16px; }

/* ── Mode clair : couleurs de rubrique plus foncées (lisibilité sur blanc), cartes ombrées ── */
html[data-theme="light"] .tool-card { box-shadow: var(--sh-sm); }
html[data-theme="light"] .card-green .card-title, html[data-theme="light"] .tag-green { color: #2f8a3f; }
html[data-theme="light"] .card-orange .card-title, html[data-theme="light"] .tag-orange { color: #c4660a; }
html[data-theme="light"] .card-purple .card-title { color: var(--purple); }
html[data-theme="light"] .card-deco { opacity: .06; }
