/* charte.css — World Café IES UTTOP × France Travail.
   Direction : géométrique-énergique institutionnel. Motif parallélogramme + palette
   multicolore UTTOP (qui code aussi les 7 tables), fond papier chaud, bandeau arc-en-ciel,
   cartes vivantes à entrée animée. KISSES : variables CSS, polices système, zéro dépendance.
   Les custom properties :root sont héritées dans les Shadow DOM des <sis-wc-*>. */

:root {
  /* couleurs marque */
  --wc-navy:       #0C3C60;
  --wc-navy-deep:  #07294a;
  --wc-green:      #3DBE8B;
  --wc-green-ink:  #1f8a5f;
  --wc-yellow:     #F4C20D;
  --wc-indigo:     #4A5BD4;
  --wc-teal:       #1FA98F;
  --wc-pink:       #EC6FB0;
  --wc-violet:     #7A5BD4;

  /* couleurs par table (id 1→7) */
  --wc-t1: #3DBE8B; --wc-t2: #4A5BD4; --wc-t3: #1FA98F;
  --wc-t4: #F4C20D; --wc-t5: #EC6FB0; --wc-t6: #0C3C60; --wc-t7: #7A5BD4;

  /* surfaces — papier chaud, pas gris froid */
  --wc-bg:        #FBF8F2;
  --wc-card:      #ffffff;
  --wc-ink:       #14304a;
  --wc-ink-soft:  #687c8c;
  --wc-line:      #ece6da;
  --wc-shadow:    0 10px 30px -12px rgba(12,60,96,.22);
  --wc-shadow-sm: 0 4px 14px -6px rgba(12,60,96,.18);
  --wc-radius:    20px;
  --wc-radius-sm: 12px;

  /* dégradé arc-en-ciel de marque (bandeau) */
  --wc-rainbow: linear-gradient(90deg, var(--wc-green) 0%, var(--wc-teal) 22%, var(--wc-yellow) 45%, var(--wc-pink) 70%, var(--wc-indigo) 100%);

  --wc-font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
/* l'attribut [hidden] doit l'emporter sur les display:flex des classes (bannière, sous-header) */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  font-family: var(--wc-font);
  color: var(--wc-ink);
  -webkit-font-smoothing: antialiased;
  background-color: var(--wc-bg);
  /* atmosphère : taches de couleur diffuses, motif géométrique léger */
  background-image:
    radial-gradient(38vw 38vw at 88% -6%, rgba(74,91,212,.10), transparent 60%),
    radial-gradient(34vw 34vw at -8% 4%, rgba(61,190,139,.12), transparent 60%),
    radial-gradient(40vw 40vw at 50% 116%, rgba(236,111,176,.08), transparent 60%);
  background-attachment: fixed;
}

/* ----- bandeau d'en-tête ----- */
.wc-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(120deg, var(--wc-navy-deep), var(--wc-navy) 60%, #0f4a76);
  color: #fff;
  padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 6px 22px -10px rgba(7,41,74,.6);
  overflow: hidden;
}
.wc-header::after { /* bandeau arc-en-ciel en bas du header */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: var(--wc-rainbow);
}
.wc-header::before { /* parallélogrammes fantômes en filigrane */
  content: ""; position: absolute; right: -40px; top: -30px; width: 220px; height: 200px;
  background:
    linear-gradient(135deg, transparent 49%, rgba(255,255,255,.05) 50% 62%, transparent 63%),
    linear-gradient(135deg, transparent 64%, rgba(255,255,255,.04) 65% 80%, transparent 81%);
  transform: skewX(-18deg); pointer-events: none;
}
.wc-header h1 { font-size: 1.15rem; margin: 0; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.wc-header h1 .sub { font-weight: 500; opacity: .82; font-size: .82rem; letter-spacing: 0; }
.wc-header .sub { font-size: .74rem; opacity: .82; font-weight: 400; }
.wc-header .spacer { flex: 1; }
.wc-cobrand { font-size: .66rem; opacity: .9; text-align: right; line-height: 1.25; letter-spacing: .02em; text-transform: uppercase; }

/* logo officiel (image) */
.wc-logo-img { height: 40px; width: auto; flex: none; display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
/* repli logo CSS (si l'image manque) */
.wc-logo { width: 34px; height: 34px; border-radius: 8px; flex: none;
  background: var(--wc-rainbow); box-shadow: inset 0 0 0 2px rgba(255,255,255,.3); }

.wc-head-titles { min-width: 0; }
.wc-head-actions { display: flex; gap: 8px; align-items: center; }
.wc-iconbtn { position: relative; appearance: none; border: 0; cursor: pointer;
  width: 42px; height: 42px; border-radius: 14px; background: rgba(255,255,255,.14); color: #fff;
  display: grid; place-items: center; transition: background .12s, transform .08s; }
.wc-iconbtn:hover { background: rgba(255,255,255,.26); }
.wc-iconbtn:active { transform: scale(.94); }
.wc-iconbtn .ic { font-size: 1.25rem; line-height: 1; }
.wc-iconbtn.active { background: var(--wc-green); }
.wc-iconbtn .wc-navbadge { position: absolute; top: -3px; right: -3px; }

/* sous-header « moment du café » (reflète l'admin) */
.wc-subheader { background: #fff; border-bottom: 1px solid var(--wc-line);
  padding: 9px 18px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .92rem;
  position: sticky; top: 70px; z-index: 45; box-shadow: 0 4px 12px -10px rgba(12,60,96,.4); }
.wc-subheader .live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--wc-green);
  box-shadow: 0 0 0 0 rgba(61,190,139,.6); animation: mb-pulse 1.6s infinite; flex: none; }
.wc-subheader .lbl { color: var(--wc-ink-soft); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
@keyframes mb-pulse { 0%{box-shadow:0 0 0 0 rgba(61,190,139,.6)} 70%{box-shadow:0 0 0 9px rgba(61,190,139,0)} 100%{box-shadow:0 0 0 0 rgba(61,190,139,0)} }

/* bannière d'enquête (push admin) */
.wc-survey-banner { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; cursor: pointer;
  text-align: left; font: inherit; color: #fff; padding: 12px 18px;
  background: linear-gradient(120deg, var(--wc-violet), #9b7be0); animation: wc-cel-fade .3s ease; }
.wc-survey-banner .sb-emoji { font-size: 1.5rem; flex: none; }
.wc-survey-banner .sb-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.wc-survey-banner .sb-txt b { font-weight: 800; }
.wc-survey-banner .sb-txt small { opacity: .9; font-size: .72rem; }
.wc-survey-banner .sb-arrow { font-size: 1.3rem; font-weight: 800; flex: none; }
@keyframes wc-cel-fade { from { opacity: 0; } to { opacity: 1; } }

/* ----- conteneur app ----- */
.wc-app { max-width: 720px; margin: 0 auto; padding: 20px 16px 104px; }
.wc-app--wide { max-width: 1280px; }

/* ----- cartes ----- */
.wc-card {
  position: relative; background: var(--wc-card); border-radius: var(--wc-radius);
  box-shadow: var(--wc-shadow); padding: 20px; margin: 0 0 16px;
  overflow: hidden;
  animation: wc-rise .5s cubic-bezier(.2,.7,.2,1) both;
}
.wc-card::before { /* coin accent oblique en haut à gauche */
  content: ""; position: absolute; left: 0; top: 0; width: 56px; height: 8px;
  background: var(--accent, var(--wc-green)); border-bottom-right-radius: 8px;
}
.wc-card h2 { margin: 2px 0 8px; font-size: 1.12rem; font-weight: 800; letter-spacing: -.02em; }
.wc-muted { color: var(--wc-ink-soft); font-size: .88rem; }

@keyframes wc-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
/* entrée échelonnée */
.wc-app > *:nth-child(1) { animation-delay: .02s; }
.wc-app > *:nth-child(2) { animation-delay: .08s; }
.wc-app > *:nth-child(3) { animation-delay: .14s; }
.wc-app > *:nth-child(4) { animation-delay: .20s; }
@media (prefers-reduced-motion: reduce) { .wc-card { animation: none; } }

/* ----- boutons ----- */
.wc-btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  background: linear-gradient(135deg, var(--wc-navy), var(--wc-indigo));
  color: #fff; padding: 13px 22px; border-radius: 999px; letter-spacing: .01em;
  box-shadow: var(--wc-shadow-sm); transition: transform .12s, box-shadow .12s, filter .12s;
}
.wc-btn:hover { transform: translateY(-2px); box-shadow: var(--wc-shadow); filter: brightness(1.05); }
.wc-btn:active { transform: translateY(0); }
.wc-btn--ghost { background: #fff; color: var(--wc-navy); box-shadow: inset 0 0 0 2px var(--wc-navy); }
.wc-btn--green { background: linear-gradient(135deg, var(--wc-green), var(--wc-teal)); }
.wc-btn--block { display: block; width: 100%; }
.wc-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ----- champs ----- */
.wc-field { display: block; margin: 0 0 14px; }
.wc-field label { display: block; font-size: .8rem; font-weight: 700; margin-bottom: 5px; }
.wc-field .opt { color: var(--wc-ink-soft); font-weight: 400; }
.wc-input, .wc-textarea, .wc-select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--wc-line);
  border-radius: var(--wc-radius-sm); font: inherit; background: #fffdf9; color: var(--wc-ink);
  transition: border-color .12s, box-shadow .12s;
}
.wc-input:focus, .wc-textarea:focus { outline: none; border-color: var(--wc-green);
  box-shadow: 0 0 0 4px rgba(61,190,139,.18); background: #fff; }
.wc-textarea { min-height: 92px; resize: vertical; }

/* ----- chips / pastilles ----- */
.wc-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  border-radius: 999px; background: #f1ede4; font-size: .8rem; font-weight: 600;
}
.wc-badge { display:inline-block; min-width: 22px; padding: 2px 9px; border-radius: 999px;
  background: var(--wc-green); color:#fff; font-size:.74rem; font-weight:800; text-align:center; }

/* ----- barre de navigation basse (participant mobile) ----- */
.wc-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: flex; gap: 2px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--wc-line); box-shadow: 0 -8px 24px -12px rgba(12,60,96,.25);
}
.wc-nav button {
  flex: 1; border: 0; background: none; padding: 8px 4px 6px; cursor: pointer; border-radius: 14px;
  color: var(--wc-ink-soft); font: inherit; font-size: .66rem; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 3px; transition: color .12s, background .12s;
}
.wc-nav button .ic { font-size: 1.3rem; line-height: 1; transition: transform .15s; }
.wc-nav button[aria-current="true"] { color: var(--wc-navy); background: rgba(61,190,139,.14); }
.wc-nav button[aria-current="true"] .ic { transform: translateY(-2px) scale(1.12); }
.wc-nav button.has-badge { position: relative; }
.wc-navbadge { position: absolute; top: 4px; right: 22%; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--wc-pink); color: #fff; font-size: .64rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff;
  animation: wc-pop .25s ease; }
@keyframes wc-pop { from { transform: scale(.4); } to { transform: scale(1); } }

/* accessibilité */
.wc-visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
