/*
07.10.2026 V1.0
PROJET meccha.fr
CSS mini: CSS3 (variables, grid, backdrop-filter)
css/theme.css
thème artistique : toile colorée, titre au pinceau, agenda, administration (par-dessus Bootstrap 5.3 sombre)

Liste des modifications faites :
07.10.2026 Création

*/

@font-face { font-family: "Knewave"; src: url("../fonts/knewave-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("../fonts/outfit-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --ink: #0d0b1a;
  --ink-2: #15122a;
  --ink-3: #1d1938;
  --line: rgba(255, 255, 255, .12);
  --pink: #ff3d81;
  --orange: #ff9d2e;
  --yellow: #ffd23f;
  --cyan: #19d3da;
  --violet: #8a5cff;
  --green: #2fd16a;
  --green-ink: #07210f;
  --maybe: #ff9d2e;
  --maybe-ink: #2b1500;
  --radius-brush: 14px 22px 16px 24px / 22px 14px 24px 16px;
  --font-title: "Knewave", "Comic Sans MS", cursive;
  --bs-body-font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-bg: var(--ink);
  --bs-body-color: #eceaf8;
  --bs-link-color-rgb: 120, 220, 255;
  --bs-link-hover-color-rgb: 255, 210, 63;
  --bs-border-color: var(--line);
}

html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--bs-body-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1 0 auto; position: relative; z-index: 1; }
h1, h2, h3, .h1, .h2, .h3 { font-weight: 700; letter-spacing: -.01em; }
a { text-underline-offset: 3px; }
::selection { background: var(--pink); color: #fff; }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ------------------------------------------------------------ Toile de fond */
.canvas-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.canvas-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(138, 92, 255, .25), transparent 60%),
    linear-gradient(180deg, transparent 55%, rgba(13, 11, 26, .85));
}
.blob { position: absolute; display: block; border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; filter: blur(70px); opacity: .5; animation: drift 26s ease-in-out infinite alternate; }
.blob.b1 { width: 46vmax; height: 40vmax; background: var(--pink); top: -14vmax; left: -12vmax; }
.blob.b2 { width: 40vmax; height: 36vmax; background: var(--cyan); top: 18vh; right: -14vmax; animation-duration: 32s; opacity: .38; }
.blob.b3 { width: 36vmax; height: 32vmax; background: var(--yellow); bottom: -16vmax; left: 8vw; animation-duration: 29s; opacity: .3; }
.blob.b4 { width: 34vmax; height: 30vmax; background: var(--violet); bottom: 6vh; right: 14vw; animation-duration: 35s; opacity: .42; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  to { transform: translate3d(5vw, 6vh, 0) rotate(40deg) scale(1.12); }
}

/* ------------------------------------------------------------ Navigation */
.site-nav { background: rgba(13, 11, 26, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); z-index: 1030; }
.brand-mark { font-family: var(--font-title); font-size: 1.7rem; color: #fff; line-height: 1; letter-spacing: .01em; }
.brand-mark.small { font-size: 1.35rem; }
.brand-mark .dot { color: var(--pink); }
.site-nav .nav-link { color: rgba(255, 255, 255, .78); border-radius: 10px; padding: .45rem .8rem; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: #fff; background: rgba(255, 255, 255, .09); }
.dropdown-menu { --bs-dropdown-bg: var(--ink-2); --bs-dropdown-border-color: var(--line); --bs-dropdown-link-hover-bg: rgba(255, 255, 255, .08); border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.navbar-toggler { color: #fff; border-color: var(--line); }

/* ------------------------------------------------------------ Cartes, boutons */
.canvas-card {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .03));
  border: 1px solid var(--line);
  border-radius: 22px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}

.btn { font-weight: 600; }
.btn-paint {
  --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; --bs-btn-border-width: 0;
  background: linear-gradient(115deg, var(--pink), var(--orange));
  border: 0; color: #fff; border-radius: var(--radius-brush);
  box-shadow: 0 8px 24px rgba(255, 61, 129, .38), inset 0 -3px 0 rgba(0, 0, 0, .14);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-paint:hover { transform: translateY(-2px) rotate(-.6deg); filter: brightness(1.08); box-shadow: 0 12px 30px rgba(255, 61, 129, .5), inset 0 -3px 0 rgba(0, 0, 0, .14); color: #fff; }
.btn-paint:active { transform: translateY(0); }
.btn-paint:disabled { filter: grayscale(.5) brightness(.8); transform: none; }
.btn-ghost { border: 1px solid rgba(255, 255, 255, .28); color: #fff; background: rgba(255, 255, 255, .05); border-radius: var(--radius-brush); }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-google { background: #fff; color: #1f1f1f; border: 0; border-radius: var(--radius-brush); box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.btn-google:hover { background: #f3f0ff; color: #000; transform: translateY(-2px); }
.btn-google .fa { color: #ea4335; }
.btn-yes { background: var(--green); color: var(--green-ink); border: 0; border-radius: 12px; }
.btn-yes:hover { background: #4fe287; color: var(--green-ink); }
.btn-maybe { background: var(--maybe); color: var(--maybe-ink); border: 0; border-radius: 12px; }
.btn-maybe:hover { background: #ffb457; color: var(--maybe-ink); }
.btn-yes.is-current, .btn-maybe.is-current { box-shadow: 0 0 0 3px var(--ink-2), 0 0 0 5px currentColor; }
.btn:focus-visible, .slot:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

.alert-paint { background: rgba(255, 61, 129, .12); border: 1px solid rgba(255, 61, 129, .35); border-left-width: 5px; color: #ffe3ee; border-radius: 14px; }
.alert-paint a { color: var(--yellow); }

.form-control, .form-select { background-color: rgba(255, 255, 255, .07); border-color: var(--line); border-radius: 12px; color: #fff; }
.form-control:focus, .form-select:focus { background-color: rgba(255, 255, 255, .11); border-color: var(--cyan); box-shadow: 0 0 0 .2rem rgba(25, 211, 218, .22); color: #fff; }
.form-control::placeholder { color: rgba(255, 255, 255, .4); }
.form-text { color: rgba(255, 255, 255, .55); }
.modal-content { background: var(--ink-2); border: 1px solid var(--line); border-radius: 22px; }
.canvas-modal { background: linear-gradient(170deg, #1d1938, #120f26); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }

/* ------------------------------------------------------------ Titre au pinceau */
.brush-title { display: block; width: min(100%, 560px); height: auto; margin: 0 auto; overflow: visible; filter: drop-shadow(0 8px 22px rgba(0, 0, 0, .4)); }
.brush-title-xl { width: min(100%, 780px); }
.brush-title-sm { width: 210px; }
.brush-swoosh { fill: #fff; }
.brush-text { fill: #fff; font-family: var(--font-title); font-size: 188px; }

/* ------------------------------------------------------------ Accueil */
.hero { position: relative; padding: clamp(2.5rem, 7vw, 5.5rem) 0 2.5rem; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .4;
  background: url("../images/hero.jpg") center / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent);
  mask-image: linear-gradient(180deg, #000 30%, transparent);
}
.hero-kicker { display: inline-block; padding: .35rem .95rem; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid var(--line); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.hero-title { margin: 1.2rem 0 0; }
.hero-tagline { font-family: var(--font-title); font-size: clamp(1.4rem, 3.5vw, 2.1rem); color: var(--yellow); transform: rotate(-1.5deg); margin: .2rem 0 1.2rem; text-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.hero-hook { max-width: 46rem; margin: 0 auto 1.8rem; font-size: clamp(1.02rem, 2vw, 1.22rem); line-height: 1.6; color: rgba(255, 255, 255, .88); }
.hero-hook strong { color: #fff; background: linear-gradient(transparent 62%, rgba(255, 61, 129, .55) 62%); padding: 0 .15em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.hero-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem clamp(1.2rem, 5vw, 3.5rem); margin: 2.4rem 0 0; padding: 0; }
.hero-stats li { text-align: center; }
.hero-stats b { display: block; font-family: var(--font-title); font-size: 2.6rem; line-height: 1; color: #fff; }
.hero-stats span { font-size: .85rem; color: rgba(255, 255, 255, .65); text-transform: uppercase; letter-spacing: .06em; }

.section-head { margin-bottom: 1rem; }
.section-head h1, .section-head h2 { margin-bottom: .2rem; }

.group-note { overflow: hidden; }
.group-note::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 210, 63, .35), transparent 70%); pointer-events: none; }
.group-dots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; max-width: 200px; margin: 0 auto; }
.gd { display: block; aspect-ratio: 1; border-radius: 50% 44% 52% 48%; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .2); }
.gd0 { background: var(--pink); } .gd1 { background: var(--orange); } .gd2 { background: var(--yellow); } .gd3 { background: var(--cyan); } .gd4 { background: var(--violet); }
.gd:nth-child(odd) { transform: translateY(5px) rotate(8deg); }

.steps .step { transition: transform .2s ease; }
.steps .step:hover { transform: translateY(-4px) rotate(-.4deg); }
.step-num { position: absolute; top: -14px; left: 18px; width: 38px; height: 38px; display: grid; place-items: center; font-family: var(--font-title); font-size: 1.3rem; color: #fff; background: linear-gradient(135deg, var(--pink), var(--violet)); border-radius: 50% 42% 54% 46%; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.txt-yes { color: var(--green); font-weight: 600; }
.txt-maybe { color: var(--maybe); font-weight: 600; }

/* ------------------------------------------------------------ Agenda */
.agenda-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-bottom: 1rem; color: rgba(255, 255, 255, .75); }
.legend { margin-left: .8rem; }
.legend .dot { margin-left: .6rem; }
.dot { display: inline-block; width: .8em; height: .8em; border-radius: 50%; margin-right: .3em; vertical-align: -.05em; }
.dot-yes { background: var(--green); } .dot-maybe { background: var(--maybe); } .dot-full { background: #ff5f6d; }
.brand-mark .dot { width: auto; height: auto; background: none; margin: 0; display: inline; vertical-align: baseline; }

.agenda-day { margin-bottom: 1.6rem; }
.agenda-day-title { font-size: 1.1rem; text-transform: capitalize; margin-bottom: .6rem; display: flex; align-items: center; gap: .6rem; }
.badge-today { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; padding: .2rem .6rem; border-radius: 999px; background: var(--pink); color: #fff; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: .8rem; }
#agenda[data-mode="tonight"] .slot-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

.slot {
  display: flex; flex-direction: column; gap: .5rem; text-align: left; width: 100%; min-height: 108px;
  padding: .75rem .85rem; color: #fff; cursor: pointer; font: inherit;
  background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .035));
  border: 1px solid var(--line); border-radius: 16px;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.slot:hover:not(:disabled) { transform: translateY(-3px) rotate(-.5deg); border-color: rgba(255, 255, 255, .4); background: linear-gradient(160deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .06)); }
.slot:disabled { cursor: not-allowed; }
.slot.is-past { opacity: .4; }
.slot.is-current { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 0 26px rgba(25, 211, 218, .3); }
.slot.is-ready { border-color: transparent; background: linear-gradient(#1d1938, #1d1938) padding-box, linear-gradient(120deg, var(--pink), var(--yellow), var(--cyan)) border-box; border: 2px solid transparent; }
.slot.is-full { background: repeating-linear-gradient(135deg, rgba(255, 95, 109, .12) 0 10px, rgba(255, 95, 109, .04) 10px 20px); }
.slot.mine-yes { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 0 22px rgba(47, 209, 106, .3); }
.slot.mine-maybe { border-color: var(--maybe); box-shadow: 0 0 0 1px var(--maybe), 0 0 22px rgba(255, 157, 46, .28); }
.slot-head { display: flex; align-items: center; gap: .4rem; }
.slot-time { font-family: var(--font-title); font-size: 1.55rem; line-height: 1; }
.slot-tag { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .12rem .45rem; border-radius: 999px; background: rgba(255, 255, 255, .14); margin-left: .35rem; }
.slot-head .slot-tag:first-of-type { margin-left: auto; }
.tag-now { background: var(--cyan); color: #00292b; }
.tag-yes { background: var(--green); color: var(--green-ink); }
.tag-maybe { background: var(--maybe); color: var(--maybe-ink); }
.tag-full { background: #ff5f6d; color: #2a0006; }
.tag-ready { background: linear-gradient(120deg, var(--pink), var(--orange)); color: #fff; }
.slot-bar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .12); }
.slot-bar i { display: block; height: 100%; transition: width .5s ease; }
.bar-yes { background: var(--green); } .bar-maybe { background: var(--maybe); }
.slot-count { font-size: .85rem; color: rgba(255, 255, 255, .8); display: flex; align-items: center; }
.slot-chips, .chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.slot-server { font-size: .75rem; color: rgba(255, 255, 255, .7); }

.chip { display: inline-block; max-width: 100%; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-yes { background: rgba(47, 209, 106, .18); color: #6dffa0; border: 1px solid rgba(47, 209, 106, .55); }
.chip-maybe { background: rgba(255, 157, 46, .16); color: #ffbe73; border: 1px solid rgba(255, 157, 46, .55); }
.chip-me { box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); }
.chip-more { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid var(--line); }
.chips .chip { font-size: .88rem; padding: .2rem .7rem; }

.slot-summary { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 1.05rem; margin-bottom: .6rem; }
.group-hint { padding: .6rem .9rem; border-radius: 12px; background: rgba(255, 255, 255, .07); }
.group-hint.is-ready { background: linear-gradient(120deg, rgba(255, 61, 129, .3), rgba(255, 157, 46, .3)); }
.modal-server { margin-bottom: .9rem; }
.join-info { margin-top: 1rem; padding: .8rem 1rem; border-radius: 12px; border: 1px dashed rgba(25, 211, 218, .6); background: rgba(25, 211, 218, .08); overflow-wrap: anywhere; }

.member-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.member { padding: .22rem .75rem; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); font-size: .9rem; }
.member.is-yes { background: rgba(47, 209, 106, .18); border-color: rgba(47, 209, 106, .6); color: #6dffa0; }
.member.is-maybe { background: rgba(255, 157, 46, .16); border-color: rgba(255, 157, 46, .6); color: #ffbe73; }

/* ------------------------------------------------------------ Connexion / inscription / attente */
.state-icon { width: 84px; height: 84px; margin: 0 auto 1rem; display: grid; place-items: center; font-size: 2.4rem; border-radius: 48% 52% 46% 54% / 52% 44% 56% 48%; }
.state-icon.pending { background: rgba(255, 210, 63, .18); color: var(--yellow); }
.state-icon.rejected { background: rgba(255, 95, 109, .18); color: #ff7b86; }
.alert { border-radius: 14px; }

/* ------------------------------------------------------------ Profil, pages légales */
.my-slots .my-slot { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.my-slots .my-slot:last-child { border-bottom: 0; }
.my-slot-when { font-weight: 600; text-transform: capitalize; min-width: 11rem; }
.my-slot .btn { margin-left: auto; }
.legal h2 { margin-top: 1.6rem; color: var(--yellow); }
.legal li { margin-bottom: .35rem; }

/* ------------------------------------------------------------ Administration */
.stat-card { display: block; padding: 1.1rem 1.2rem; text-decoration: none; color: #fff; background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)); border: 1px solid var(--line); border-radius: 18px; transition: transform .15s ease; height: 100%; }
.stat-card:hover { transform: translateY(-3px); color: #fff; }
.stat-card b { display: block; font-family: var(--font-title); font-size: 2.3rem; line-height: 1; }
.stat-card span { font-size: .85rem; color: rgba(255, 255, 255, .7); }
.stat-card.is-alert { border-color: var(--orange); box-shadow: 0 0 24px rgba(255, 157, 46, .3); }
.audit-mini li { padding: .3rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; overflow-wrap: anywhere; }
.admin-table { --bs-table-bg: transparent; --bs-table-hover-bg: rgba(255, 255, 255, .05); }
.admin-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(255, 255, 255, .6); font-weight: 600; white-space: nowrap; }
.request { transition: border-color .2s ease; }
.request:hover { border-color: rgba(255, 255, 255, .3); }

/* ------------------------------------------------------------ Pied de page, erreurs */
.site-footer { position: relative; z-index: 1; flex-shrink: 0; padding: 2rem 0; border-top: 1px solid var(--line); background: rgba(13, 11, 26, .72); backdrop-filter: blur(10px); }
.site-footer a { color: rgba(255, 255, 255, .8); }
.error-page { padding-top: 4rem !important; }
.error-code { font-family: var(--font-title); font-size: clamp(5rem, 22vw, 11rem); line-height: 1; margin: 0; background: linear-gradient(120deg, var(--pink), var(--yellow), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ------------------------------------------------------------ Mobile et accessibilité */
@media (max-width: 575.98px) {
  .slot-grid, #agenda[data-mode="tonight"] .slot-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .slot-time { font-size: 1.3rem; }
  .my-slot-when { min-width: 100%; }
  .brush-text { font-size: 176px; }
}
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
@media (forced-colors: active) {
  .slot, .chip, .canvas-card { border: 1px solid CanvasText; }
}
