.hero { text-align: center; max-width: 780px; margin: 2rem auto 2.5rem; }
.hero h1 {
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.75rem;
}
.hero h1 .accent {
    color: var(--teal);
}
.hero p { color: var(--text-muted); font-size: 1.05rem; max-width: 540px; margin: 0 auto; }
/* Soft strip that sets the agenda question apart; the link is the shared .link-pill so it reads as an action */
.hero-agenda {
    margin: 2rem auto 0;
    max-width: 720px;
    padding: 1.1rem 1.4rem;
    background: var(--bg-soft);
    border-radius: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1rem;
}
.hero-agenda .link-pill { font-size: 0.95rem; min-height: 44px; padding: 0.5rem 1.1rem; }

.builder-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    max-width: 820px;
    margin: 0 auto;
    scroll-margin-top: 15vh;
}

.sentence {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    line-height: 2;
    color: var(--text);
    font-weight: 500;
}
/* Keep a word and the chip it introduces on the same line, so no orphan "for" or "pendant"
   is left dangling at the end of a line. Plain inline, not inline-flex: a flex container
   drops the whitespace-only node between the word and the chip, killing the word space. */
.sentence .nb { white-space: nowrap; }
/* Cancel the chip's right margin so punctuation sits tight against it, never " ." */
.sentence .punct { margin-left: -0.25rem; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--teal-soft);
    color: var(--teal);
    padding: 0.3rem 0.8rem;
    margin: 0.15rem 0.25rem;
    border: 1px solid #a5f3fc;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    user-select: none;
}
.chip:hover {
    background: #cffafe;
    border-color: var(--teal);
    transform: translateY(-1px);
}
@keyframes chip-preset-flash {
    0%   { background: var(--teal-soft); box-shadow: 0 0 0 0 rgba(8, 145, 178, 0.45); }
    35%  { background: #cffafe; box-shadow: 0 0 0 6px rgba(8, 145, 178, 0.22); }
    100% { background: var(--teal-soft); box-shadow: 0 0 0 0 rgba(8, 145, 178, 0); }
}
.chip.preset-flash { animation: chip-preset-flash 0.9s ease-out; }

.preset-toast {
    position: fixed;
    top: 0.75rem;
    left: 50%;
    transform: translateX(-50%) translateY(-200%);
    background: var(--teal-soft);
    color: var(--teal);
    border: 1px solid #a5f3fc;
    padding: 0.4rem 0.4rem 0.4rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 10px 30px -10px rgba(8, 145, 178, 0.3);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s ease;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.preset-toast:hover { color: var(--teal); }
.preset-toast .preset-toast-cta {
    background: var(--teal);
    color: #fff;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: background 0.15s ease;
}
.preset-toast:hover .preset-toast-cta {
    background: var(--teal-hover);
}
.preset-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

@keyframes card-preset-flash {
    0%   { box-shadow: var(--shadow-xl), 0 0 0 0 rgba(8, 145, 178, 0.55); border-color: rgba(226, 232, 240, 0.8); }
    30%  { box-shadow: var(--shadow-xl), 0 0 0 10px rgba(8, 145, 178, 0.25); border-color: var(--teal); }
    100% { box-shadow: var(--shadow-xl), 0 0 0 0 rgba(8, 145, 178, 0); border-color: rgba(226, 232, 240, 0.8); }
}
.builder-card.preset-flash { animation: card-preset-flash 0.9s ease-out; }
.chip .chip-icon { width: 14px; height: 14px; opacity: 0.8; }
.chip input, .chip select {
    border: none;
    background: transparent;
    color: var(--teal);
    font-weight: 600;
    font-size: 0.95rem;
    outline: none;
    min-width: 80px;
    padding: 0;
    font-family: inherit;
}
.chip input::placeholder {
    color: var(--teal);
    opacity: 0.55;
    font-style: italic;
}
/* :user-invalid, not :invalid — an empty required field is not an error until the visitor
   has actually tried something, and :invalid matched from the very first paint. */
.chip input:required:user-invalid {
    color: #991b1b;
}
.chip:has(input:required:user-invalid) {
    background: #fef2f2;
    border-color: #fecaca;
}
.chip input[type="date"], .chip input[type="time"] {
    max-width: 120px;
}
/* The chip already carries a calendar icon, so the browser's own indicator is a duplicate.
   Only hidden once JS has confirmed showPicker() exists, otherwise the picker becomes
   unreachable with a mouse. */
.chip-picker-ready input[type="date"]::-webkit-calendar-picker-indicator,
.chip-picker-ready input[type="time"]::-webkit-calendar-picker-indicator {
    display: none;
}
.chip-picker-ready .chip-icon { cursor: pointer; }
.chip select {
    appearance: none;
    padding-right: 0.2rem;
}

.avoid-bans-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.avoid-bans-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
}
.avoid-bans-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--teal);
    cursor: pointer;
}
/* No opacity: the inherited link blue is exactly 4.50:1, and 0.7 dropped it
   to 2.82. Uses --teal to match the sibling .avoid-bans-link. */
.avoid-bans-count { color: var(--teal); font-size: 0.8rem; }
.avoid-bans-link {
    color: var(--teal);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
}
.avoid-bans-link:hover { color: var(--teal-hover); }

.actions { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.7rem; }
.btn-generate {
    background: var(--teal);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 1rem 2rem;
    border-radius: 10px;
    border: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: background 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}
.btn-generate:hover {
    background: var(--teal-hover);
    color: #fff;
}
.btn-generate:disabled {
    cursor: not-allowed;
    opacity: 0.9;
    transform: none;
}
.btn-generate-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.8s linear infinite;
}
.btn-generate.is-busy .btn-generate-spinner { display: inline-block; }
@keyframes btn-spin { to { transform: rotate(360deg); } }

.vibe-label {
    text-align: center;
    color: var(--text-muted);
    margin: 3rem 0 1.25rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}
.vibe-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}
@media (max-width: 500px) {
    .vibe-grid { grid-template-columns: 1fr; }
}
.vibe-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
    padding: 0;
}
.vibe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -8px rgba(15, 23, 42, 0.18);
    border-color: var(--teal);
}
.vibe-card.selected {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.35), 0 14px 28px -10px rgba(8, 145, 178, 0.45);
}
.vibe-card.selected::after {
    content: '';
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: 28px;
    height: 28px;
    background: var(--teal) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/16px 16px no-repeat;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(8, 145, 178, 0.45);
    z-index: 2;
}
.vibe-art {
    height: 110px;
    background: linear-gradient(135deg, var(--c1, #0891b2), var(--c2, #22d3ee));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2.2rem;
}
.vibe-art::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.25), transparent 55%);
}
.vibe-info { padding: 0.85rem 1rem 1rem; }
.vibe-name { font-weight: 700; color: var(--text); font-size: 0.95rem; margin-bottom: 0.15rem; }
.vibe-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.35; }

.how-it-works-section { max-width: 820px; margin: 3.5rem auto 2rem; text-align: center; }
.how-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 0.35rem;
}
.how-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 1.75rem;
}
.how-subtitle a {
    color: var(--teal);
    text-decoration: none;
    font-weight: 600;
}
.how-subtitle a:hover { text-decoration: underline; }
.how-it-works {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.how-step { position: relative; text-align: center; padding-top: 0.5rem; }
.how-step .step-icon-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
}
.how-step .step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--teal-soft);
    color: var(--teal);
    border-radius: 12px;
}
.how-step .step-number {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(8, 145, 178, 0.35);
}
.how-step .step-label {
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 600;
    margin-top: 0.1rem;
}
.how-step .step-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    line-height: 1.4;
}

.toggle-precise {
    text-align: center;
    margin: 0.5rem auto 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    border: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    transition: all 0.15s ease;
}
.toggle-precise:hover {
    color: var(--teal);
    background: var(--teal-soft);
}
.toggle-precise .chevron { transition: transform 0.2s ease; }
.toggle-precise.open .chevron { transform: rotate(180deg); }
#precise-controls { display: none; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
#precise-controls.visible { display: block; }

.pending-banner {
    background: #fefce8;
    border: 1px solid #fde68a;
    color: #854d0e;
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    max-width: 820px;
    margin: 0 auto 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

@media (max-width: 600px) {
    .builder-card { padding: 1.5rem; }
    .how-it-works { grid-template-columns: repeat(2, 1fr); }
    .sentence { font-size: 1rem; line-height: 2.4; }
    .sentence-clause { display: block; margin-bottom: 0.9rem; }
    .sentence-clause:last-child { margin-bottom: 0; }
    /* "avec des morceaux <chip>" is 372px wide against 316px available here, so a hard
       nowrap would push the page sideways. The &nbsp; before each chip still stops the
       introducing word from being orphaned. */
    .sentence .nb { white-space: normal; }
    .chip { padding: 0.28rem 0.75rem; font-size: 0.88rem; margin: 0.15rem 0; }
    .chip input, .chip select { font-size: 0.88rem; min-width: 60px; }
    .chip input[type="date"], .chip input[type="time"] { max-width: 110px; }
}

.featured-section {
    max-width: 820px;
    margin: 3.5rem auto 2.5rem;
    padding: 0 1rem;
}
.featured-heading {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.2rem;
    color: var(--text);
}
.featured-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}
.featured-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1rem 1.1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.featured-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--teal);
}
.featured-card-title {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.25;
    color: var(--text);
    text-decoration: none;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.featured-card-title:hover { color: var(--teal); }
.featured-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.featured-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    background: var(--bg-soft);
    border-radius: 999px;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}
.featured-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.1rem;
}
.featured-tag {
    font-size: 0.72rem;
    color: var(--text-muted);
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
    background: rgba(13, 148, 136, 0.08);
}
.featured-cta {
    margin-top: auto;
    align-self: flex-start;
    position: relative;
    z-index: 2;
}

@media (max-width: 480px) {
    .featured-section { margin-bottom: 2rem; }
    .featured-grid { grid-template-columns: 1fr; }
}
