/* LE BRIEF D'UNE SORTIE DE GROUPE — UN SEUL ECRAN (08/11/2026).
 *
 * Julien : « trop brouillon, pas clair, pas simple, trop d'actions pour passer
 * une information ». Les six etapes, la barre de progression et les grandes
 * tuiles sont parties : cinq blocs sur un ecran qui defile, et un bouton colle
 * au pouce. Les champs nommes suivent `.form-field` (static/css/components.css) ;
 * cette feuille ne pose que ce qui est propre au brief : les pastilles, la
 * phrase a trous, les bascules et le bouton colle.
 *
 * MOBILE D'ABORD : tout est ecrit pour 320 points, puis elargi a 640 (les
 * occasions vont a la ligne, les coordonnees passent sur deux colonnes) et a
 * 740 (l'introduction de la page revient). Cibles de 44 points (`--tap-size`).
 */

/* L'en-tete de la page, reduit a son titre au pouce. */
.public-info-page--brief-groupe .public-page-header {
    min-height: 0;
    gap: 2px;
    padding: 8px 14px;
}

.public-info-page--brief-groupe .public-page-header h1 {
    font-size: 1.2rem;
}

.public-info-page--brief-groupe .public-page-header .public-page-header__intro {
    display: none;
}

.public-info-page--brief-groupe .public-info-shell {
    gap: 10px;
}

.brief-groupe {
    display: grid;
    gap: 22px;
    width: 100%;
    max-width: 720px;
    min-width: 0;
    margin: 0 auto;
}

/* Un bloc par question. `min-width: 0` : un fieldset vaut sinon la largeur de
 * son contenu, et la rangee d'occasions qui defile pousserait la page. */
.brief-groupe fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.brief-groupe__bloc {
    display: grid;
    gap: 10px;
}

.brief-groupe__bloc > legend {
    margin-bottom: 8px;
    padding: 0;
    color: var(--brand);
    font-size: .95rem;
    font-weight: 800;
}

.brief-groupe__question {
    margin-bottom: 6px;
    padding: 0;
    font-size: .9rem;
    font-weight: 600;
}

.brief-groupe__note,
.brief-groupe__suite {
    margin: 0;
    color: var(--muted);
    font-size: .85rem;
}

/* Le road book joint (24/10) : une note, pas une question. */
.brief-groupe__road-book {
    margin: 0;
    padding: 10px 12px;
    border-left: 3px solid var(--brand);
    border-radius: var(--radius);
    background: var(--brand-soft);
    font-size: .9rem;
}

/* ---------------------------------------------------------------------
 * LES PASTILLES : le bouton natif se cache, la pastille porte le choix.
 * ------------------------------------------------------------------- */
.brief-groupe__pastilles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.brief-groupe__pastille {
    position: relative;
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 8px;
    min-height: var(--tap-size);
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.brief-groupe__pastille input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.brief-groupe__pastille:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand);
    color: var(--surface);
}

.brief-groupe__pastille:has(input:focus-visible) {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.brief-groupe__bloc.has-error .brief-groupe__pastille {
    border-color: var(--danger);
}

.brief-groupe__picto {
    display: inline-grid;
    flex: none;
    place-items: center;
    color: var(--brand);
}

.brief-groupe__picto .ui-icon {
    width: 18px;
    height: 18px;
}

.brief-groupe__pastille:has(input:checked) .brief-groupe__picto {
    color: inherit;
}

.brief-groupe__mot {
    display: grid;
}

.brief-groupe__mot small {
    font-size: .74rem;
    font-weight: 500;
    opacity: .85;
}

/* Les bascules (formule, budget) : un interrupteur segmente, cases egales. */
.brief-groupe__pastilles--bascule {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.brief-groupe__pastilles--bascule .brief-groupe__pastille {
    justify-content: center;
    padding: 6px 8px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    text-align: center;
    white-space: normal;
}

/* ---------------------------------------------------------------------
 * LA PHRASE A TROUS : « [10] personnes · [2] jours · [mois] · pres de [ville] ».
 * Au pouce, un trou par ligne ; au bureau, la phrase se lit d'un trait.
 * ------------------------------------------------------------------- */
.brief-groupe__phrase {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 0;
}

.brief-groupe__trou {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.brief-groupe__trou input,
.brief-groupe__trou select {
    min-width: 0;
    min-height: var(--tap-size);
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

.brief-groupe__trou.has-error input,
.brief-groupe__trou.has-error select,
.brief-groupe__budget.has-error .brief-groupe__montant input {
    border-color: var(--danger);
}

.brief-groupe__mois,
.brief-groupe__lieu {
    flex: 1 1 100%;
}

.brief-groupe__mois select,
.brief-groupe__lieu input {
    flex: 1;
    width: 100%;
}

.brief-groupe__lieu label {
    flex: none;
    font-weight: 600;
}

/* Les nombres : − [ 10 ] + personnes, sans les fleches du navigateur. */
.brief-groupe__compteur input {
    width: 64px;
    padding-inline: 4px;
    color: var(--brand);
    font-size: 1.2rem;
    font-weight: 800;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.brief-groupe__trou input::-webkit-inner-spin-button,
.brief-groupe__trou input::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.brief-groupe__unite {
    font-weight: 600;
}

.brief-groupe__pas {
    display: grid;
    flex: none;
    place-items: center;
    width: var(--tap-size);
    height: var(--tap-size);
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--brand);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.brief-groupe__pas[hidden] {
    display: none;
}

.brief-groupe__pas:active {
    transform: scale(.94);
}

/* « Date precise… » ouvre le champ de date, sans script. Sans `:has`, la
 * regle tombe et le champ reste simplement affiche. */
.brief-groupe__date {
    max-width: 280px;
}

.brief-groupe__projet:not(:has(option[value="date"]:checked)) .brief-groupe__date:not(.is-ouverte) {
    display: none;
}

/* ---------------------------------------------------------------------
 * LA FORMULE ET LE BUDGET, UNE LIGNE CHACUN.
 * ------------------------------------------------------------------- */
.brief-groupe__case {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: var(--tap-size);
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    font-size: .9rem;
    cursor: pointer;
}

.brief-groupe__case input {
    flex: none;
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: var(--brand);
}

.brief-groupe__case:has(input:checked) {
    border-color: var(--brand);
}

.brief-groupe__case.has-error {
    border-color: var(--danger);
}

/* Cle en main, repas et activites se ferment : le partenaire propose tout. */
.brief-groupe__sur-mesure {
    display: grid;
    gap: 12px;
}

.brief-groupe__formule:has(input[value="cle_en_main"]:checked) .brief-groupe__sur-mesure {
    display: none;
}

.brief-groupe__ligne {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.brief-groupe__ligne .brief-groupe__pastilles--bascule {
    flex: 1 1 200px;
}

.brief-groupe__montant {
    position: relative;
    flex: 0 1 112px;
}

.brief-groupe__montant input {
    width: 100%;
    padding-right: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: right;
    -moz-appearance: textfield;
    appearance: textfield;
}

.brief-groupe__montant .brief-groupe__unite {
    position: absolute;
    top: 50%;
    right: 12px;
    color: var(--muted);
    transform: translateY(-50%);
    pointer-events: none;
}

/* ---------------------------------------------------------------------
 * LES COORDONNEES, ET LE BOUTON COLLE AU POUCE.
 * ------------------------------------------------------------------- */
.brief-groupe__contact {
    gap: 12px;
}

/* PRENOM ET NOM COTE A COTE, DES 320 POINTS : deux mots courts, une ligne. */
.brief-groupe__duo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.brief-groupe__joindre {
    margin: 0;
}

.brief-groupe__precisions > summary {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: var(--tap-size);
    color: var(--brand);
    font-weight: 600;
    cursor: pointer;
}

.brief-groupe__precisions > summary span {
    color: var(--muted);
    font-weight: 400;
}

/* Le bouton suit le pouce jusqu'au bas du formulaire, au-dessus de la barre
 * basse fixe et de la zone sure (jetons de home/bottom-nav.css). La pastille
 * surelevee de la barre deborde sur la marge du bas, pas sur le bouton ; la
 * bulle d'aide garde sa colonne a droite (`--assistant-reserve`, chat.css).
 * Le fond cache ce qui defile dessous. */
.brief-groupe__envoi {
    position: sticky;
    bottom: calc(var(--hp-bottom-nav-height, 0px) + env(safe-area-inset-bottom));
    z-index: 5;
    display: flex;
    padding: 8px var(--assistant-reserve, 0px) calc(8px + var(--hp-bottom-nav-debord, 0px)) 0;
    background: var(--surface);
}

.brief-groupe__envoi .button {
    width: 100%;
    min-height: 48px;
}

.brief-groupe__envoi .button[aria-disabled="true"] {
    opacity: .7;
    cursor: progress;
}

@media (min-width: 640px) {
    .brief-groupe__mois {
        flex: 0 1 auto;
    }

    .brief-groupe__lieu {
        flex: 1 1 240px;
    }

    .brief-groupe__contact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .brief-groupe__contact > :is(details, label, .field-error, .brief-groupe__duo, .brief-groupe__joindre) {
        grid-column: 1 / -1;
    }

    .brief-groupe__envoi {
        justify-content: flex-end;
    }

    .brief-groupe__envoi .button {
        width: auto;
        min-width: 260px;
    }
}

@media (min-width: 740px) {
    .public-info-page--brief-groupe .public-page-header .public-page-header__intro {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    .brief-groupe__pastille {
        transition: none;
    }
}
