naissance-jerry/public/style.css

235 lines
14 KiB
CSS
Raw Permalink Normal View History

2026-10-14 21:18:47 +02:00
:root {
--bg: #fff9f0;
--ink: #3b3355;
--muted: #7d7596;
--card: #ffffff;
--pink: #ff8fb1;
--pink-soft: #ffe3ec;
--blue: #6cb8ff;
--blue-soft: #e1f0ff;
--yellow: #ffd166;
--yellow-soft: #fff3cf;
--mint: #5fd3a8;
--mint-soft: #ddf7ec;
--violet: #9b7bff;
--radius: 22px;
--shadow: 0 10px 30px rgba(91, 70, 140, .10), 0 2px 6px rgba(91, 70, 140, .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
margin: 0;
font-family: 'Nunito', system-ui, sans-serif;
color: var(--ink);
background:
radial-gradient(circle at 10% 0%, var(--pink-soft) 0, transparent 40%),
radial-gradient(circle at 90% 10%, var(--blue-soft) 0, transparent 40%),
radial-gradient(circle at 50% 100%, var(--yellow-soft) 0, transparent 50%),
var(--bg);
background-attachment: fixed;
min-height: 100vh;
line-height: 1.5;
}
h1, h2, h3, .brand { font-family: 'Fredoka', 'Nunito', sans-serif; }
h2 { margin: 0 0 .8rem; font-size: 1.5rem; }
a { color: var(--violet); }
/* Décor flottant */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.sky span { position: absolute; font-size: 2rem; opacity: .55; animation: float 9s ease-in-out infinite; }
.sky span:nth-child(1) { left: 4%; top: 18%; }
.sky span:nth-child(2) { left: 88%; top: 12%; animation-delay: -2s; font-size: 1.4rem; }
.sky span:nth-child(3) { left: 75%; top: 55%; animation-delay: -4s; font-size: 2.6rem; }
.sky span:nth-child(4) { left: 93%; top: 78%; animation-delay: -1s; }
.sky span:nth-child(5) { left: 8%; top: 70%; animation-delay: -3s; font-size: 1.3rem; }
.sky span:nth-child(6) { left: 20%; top: 40%; animation-delay: -6s; font-size: 2.2rem; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-18px) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .sky span { animation: none; } }
.topbar, main, footer { position: relative; z-index: 1; }
.topbar {
display: flex; justify-content: space-between; align-items: center; gap: 1rem;
max-width: 1000px; margin: 0 auto; padding: 1rem 1.25rem;
}
.brand { font-size: 1.5rem; text-decoration: none; color: var(--ink); font-weight: 700; }
.brand span { background: linear-gradient(90deg, var(--pink), var(--violet), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.user-chip { display: flex; align-items: center; gap: .6rem; background: var(--card); padding: .35rem .5rem .35rem .4rem; border-radius: 999px; box-shadow: var(--shadow); font-weight: 700; }
.user-chip img, .avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--yellow-soft); display: inline-grid; place-items: center; font-size: 1rem; flex: none; }
main { max-width: 1000px; margin: 0 auto; padding: 0 1.25rem 2rem; display: grid; gap: 1.5rem; }
main > section:empty { display: none; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
/* Hero */
.hero { text-align: center; padding: 2rem 1rem 1rem; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); margin: 0 0 .4rem; line-height: 1.1; }
.hero h1 .wiggle { display: inline-block; animation: wiggle 2.4s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(0) } 10% { transform: rotate(-12deg) } 20% { transform: rotate(10deg) } 30% { transform: rotate(0) } }
.hero p { margin: 0 auto; color: var(--muted); font-size: 1.15rem; max-width: 600px; }
.countdown { display: inline-flex; gap: .75rem; margin-top: 1.25rem; flex-wrap: wrap; justify-content: center; }
.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem 1rem; border-radius: 999px; font-weight: 800; background: var(--card); box-shadow: var(--shadow); }
.pill.pink { background: var(--pink-soft); } .pill.blue { background: var(--blue-soft); } .pill.yellow { background: var(--yellow-soft); } .pill.mint { background: var(--mint-soft); }
.announce { margin: 1.25rem auto 0; max-width: 680px; padding: 1.5rem; border-radius: var(--radius); background: linear-gradient(135deg, var(--pink-soft), var(--yellow-soft), var(--blue-soft)); box-shadow: var(--shadow); }
.announce .big { font-family: 'Fredoka', sans-serif; font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 700; margin: 0 0 .5rem; }
.facts { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
/* Boutons */
.btn {
appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 800;
padding: .75rem 1.3rem; border-radius: 999px; color: #fff;
background: linear-gradient(135deg, var(--pink), var(--violet));
box-shadow: 0 6px 16px rgba(155, 123, 255, .35);
transition: transform .15s ease, box-shadow .15s ease; text-decoration: none; display: inline-flex; align-items: center; gap: .5rem;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(155, 123, 255, .4); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px #ece7f7; }
.btn.small { padding: .4rem .9rem; font-size: .9rem; }
.btn.danger { background: #ff7a7a; box-shadow: 0 6px 16px rgba(255, 122, 122, .35); }
.btn.google { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.btn.google svg { width: 20px; height: 20px; }
/* Formulaire */
:root { --control-h: 3rem; --line: #e7e1f5; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem 1rem; align-items: start; }
@media (max-width: 760px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field-label { display: flex; align-items: center; gap: .45rem; font-weight: 800; font-size: .98rem; line-height: 1.2; }
.field-error { margin: 0; color: #d64545; font-size: .85rem; font-weight: 700; }
.control { position: relative; display: flex; align-items: center; }
.control input {
font: inherit; font-size: 1rem; font-weight: 700; color: var(--ink);
width: 100%; height: var(--control-h); padding: 0 .95rem;
border-radius: 14px; border: 2px solid var(--line); background: #fcfbff;
transition: border-color .15s, box-shadow .15s, background .15s;
}
.control input::placeholder { color: #b3abc8; font-weight: 600; }
.control input:hover { border-color: #d9d0f0; }
.control input:focus { outline: none; border-color: var(--violet); background: #fff; box-shadow: 0 0 0 4px rgba(155, 123, 255, .18); }
.has-btn input, .has-suffix input { padding-right: 3rem; }
.picker-btn {
position: absolute; right: .4rem; top: 50%; transform: translateY(-50%);
width: 2.2rem; height: 2.2rem; padding: 0; border: 0; border-radius: 10px;
display: grid; place-items: center; cursor: pointer;
background: transparent; color: var(--muted); transition: background .15s, color .15s;
}
.picker-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
.picker-btn:hover, .control:focus-within .picker-btn { color: var(--violet); }
.picker-btn:hover { background: var(--pink-soft); }
.suffix { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 800; pointer-events: none; }
.sex-choice { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.sex-choice input { position: absolute; opacity: 0; pointer-events: none; }
.sex-choice label {
height: var(--control-h); display: flex; align-items: center; justify-content: center; gap: .4rem;
border-radius: 14px; border: 2px solid var(--line); background: #fcfbff;
cursor: pointer; font-weight: 800; transition: all .15s; white-space: nowrap;
}
.sex-choice label:hover { border-color: #d9d0f0; }
.sex-choice input:focus-visible + label { box-shadow: 0 0 0 4px rgba(155, 123, 255, .25); }
.sex-choice input[value=F]:checked + label { background: var(--pink-soft); border-color: var(--pink); }
.sex-choice input[value=M]:checked + label { background: var(--blue-soft); border-color: var(--blue); }
.field.invalid .control input, .field.invalid .sex-choice label { border-color: #ff8a8a; background: #fff6f6; }
.field.invalid .control input:focus { box-shadow: 0 0 0 4px rgba(255, 122, 122, .2); }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.4rem; align-items: center; }
.hint { color: var(--muted); font-size: .95rem; }
/* Ligne admin : le bouton et la case s'alignent sur le champ, même si une erreur s'affiche dessous */
.admin-row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-start; }
.admin-row .due-field { width: 240px; max-width: 100%; }
.admin-row > .btn, .admin-row > .switch { height: var(--control-h); margin-top: calc(1.2em + .4rem); }
/* Flash */
.flash { padding: .9rem 1.2rem; border-radius: 16px; font-weight: 800; background: var(--mint-soft); box-shadow: var(--shadow); }
.flash.error { background: #ffe1e1; }
/* Liste des pronostics */
.stats { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.big-count { font-family: 'Fredoka', sans-serif; font-size: 1.6rem; font-weight: 700; margin: 0 0 .6rem; }
.progress { height: 12px; border-radius: 999px; background: #f1edf9; overflow: hidden; margin-top: .8rem; }
.progress div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--pink), var(--violet), var(--blue)); }
.participants { display: flex; flex-wrap: wrap; gap: .5rem; }
.participant { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .4rem .3rem .9rem; border-radius: 999px; background: #fcfbff; border: 2px solid #f1edf9; font-weight: 700; }
.icon-del { border: 0; background: transparent; cursor: pointer; width: 1.7rem; height: 1.7rem; border-radius: 50%; color: var(--muted); font-weight: 800; display: grid; place-items: center; }
.icon-del:hover { background: #ffe1e1; color: #d64545; }
.preds { display: grid; gap: .75rem; }
.pred { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center; padding: .9rem 1rem; border-radius: 18px; background: #fcfbff; border: 2px solid #f1edf9; }
.pred.mine { border-color: var(--yellow); background: var(--yellow-soft); }
.pred .who { font-weight: 800; }
.pred .tags { display: flex; flex-wrap: wrap; gap: .35rem .5rem; margin-top: .25rem; font-size: .92rem; color: var(--muted); }
.pred .tags b { color: var(--ink); }
.pred .score { font-family: 'Fredoka', sans-serif; font-size: 1.5rem; font-weight: 700; text-align: right; }
.pred .score small { display: block; font-size: .75rem; color: var(--muted); font-family: 'Nunito', sans-serif; }
.rank { width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 50%; background: #f1edf9; color: var(--muted); font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 1.25rem; }
.rank.medal { background: transparent; font-size: 2.2rem; }
.breakdown { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .4rem; font-size: .85rem; }
.breakdown span { background: #fff; border-radius: 999px; padding: .15rem .6rem; border: 1px solid #ece7f7; }
/* Podium */
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: .75rem; max-width: 640px; margin: 0 auto; text-align: center; }
.podium .step { border-radius: 18px 18px 8px 8px; padding: 1rem .5rem; box-shadow: var(--shadow); }
.podium .step .medal { font-size: 2.6rem; line-height: 1.2; }
.podium .step .avatar { margin: .2rem auto; width: 44px; height: 44px; }
.podium .step .name { font-weight: 800; font-size: 1.1rem; }
.podium .p1 { background: var(--yellow-soft); min-height: 210px; order: 2; }
.podium .p2 { background: var(--blue-soft); min-height: 170px; order: 1; }
.podium .p3 { background: var(--pink-soft); min-height: 140px; order: 3; }
/* Barème */
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; }
.rule { padding: .9rem 1rem; border-radius: 16px; background: #fcfbff; border: 2px solid #f1edf9; }
.rule b { font-family: 'Fredoka', sans-serif; font-size: 1.1rem; }
.admin-card { border: 3px dashed var(--violet); }
.switch { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--violet); }
hr { border: 0; border-top: 2px dashed #ece7f7; margin: 1.5rem 0; }
footer { text-align: center; color: var(--muted); padding: 2rem 1rem 3rem; font-weight: 700; }
/* Confettis */
.confetti { position: fixed; top: -20px; width: 10px; height: 14px; z-index: 50; pointer-events: none; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@media (max-width: 560px) {
.pred { grid-template-columns: auto 1fr; }
.pred .score { grid-column: 1 / -1; text-align: left; }
.user-chip .hello { display: none; }
}
/* Sélecteurs de date et d'heure */
.picker {
position: absolute; z-index: 40; width: 300px; max-width: calc(100vw - 16px);
background: var(--card); border-radius: 18px; padding: .8rem;
box-shadow: 0 16px 40px rgba(91, 70, 140, .22); border: 2px solid #f1edf9;
}
.picker[hidden] { display: none; }
.picker button { font: inherit; cursor: pointer; border: 0; background: transparent; color: var(--ink); border-radius: 10px; }
.picker-head { display: flex; align-items: center; justify-content: space-between; margin: .1rem 0 .5rem; }
.picker-head span { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.05rem; text-transform: capitalize; flex: 1; text-align: center; }
.picker-head button { width: 2rem; height: 2rem; font-size: 1.3rem; font-weight: 800; }
.picker-head button:hover { background: var(--blue-soft); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-dow span { font-size: .8rem; font-weight: 800; color: var(--muted); padding-bottom: .2rem; }
.cal-grid button { aspect-ratio: 1; font-weight: 700; }
.cal-grid button:hover { background: var(--pink-soft); }
.cal-grid button.today { box-shadow: inset 0 0 0 2px var(--blue); }
.cal-grid button.due { background: var(--yellow-soft); }
.picker-legend { margin-top: .5rem; font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.picker-legend i { width: 14px; height: 14px; border-radius: 4px; background: var(--yellow-soft); border: 1px solid var(--yellow); }
.clock-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; margin-bottom: .6rem; }
.clock-grid button { padding: .4rem 0; font-weight: 700; font-size: .92rem; }
.clock-grid button:hover { background: var(--mint-soft); }
.picker button.sel, .picker button.sel:hover { background: linear-gradient(135deg, var(--pink), var(--violet)); color: #fff; }