.modal-nouvelle-groupe {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1120px;
    margin: 32px auto 64px;
    padding: 24px;
    background: #fff;
    border: 1px solid #dfe7f5;
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(23, 32, 51, 0.08);
}

.modal-nouvelle-groupe__entete {
    margin-bottom: 18px;
}

.modal-nouvelle-groupe__titre {
    margin: 0;
    color: #172033;
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: 0;
}

.modal-nouvelle-groupe__intro {
    margin: 8px 0 0;
    color: #52657d;
    font-size: 1rem;
    line-height: 1.55;
}

@media (max-width: 760px) {
    .modal-nouvelle-groupe {
        width: calc(100% - 32px);
        margin: 18px 16px 24px;
        padding: 20px 16px;
        border-radius: 18px;
    }

    .modal-nouvelle-groupe__titre {
        font-size: 1.35rem;
    }
}

.modal-nouvelle-groupe__form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.modal-nouvelle-groupe__champ {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-nouvelle-groupe__champ label,
.modal-nouvelle-groupe__label {
    color: #111827;
    font-size: 0.98rem;
    font-weight: 900;
}

.modal-nouvelle-groupe__textarea-wrap {
    position: relative;
}

.modal-nouvelle-groupe textarea,
.modal-nouvelle-groupe input[type="text"] {
    width: 100%;
    border: 1px solid #cfe0f4;
    border-radius: 16px;
    background: #fff;
    color: #111827;
    font: inherit;
    line-height: 1.55;
    outline: none;
}

.modal-nouvelle-groupe textarea {
    min-height: 210px;
    resize: vertical;
    padding: 16px 50px 38px 16px;
}

.modal-nouvelle-groupe input[type="text"] {
    min-height: 54px;
    padding: 0 16px;
}

.modal-nouvelle-groupe textarea:focus,
.modal-nouvelle-groupe input[type="text"]:focus {
    border-color: #1f59c4;
    box-shadow: 0 0 0 4px rgba(31, 89, 196, 0.12);
}

.modal-nouvelle-groupe__compteur {
    align-self: flex-end;
    margin-top: -4px;
    color: #6b7b91;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.2;
}

.modal-nouvelle-groupe__emoji-toggle {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #cfe0f4;
    border-radius: 999px;
    background: #fff;
    color: #1f59c4;
    font-size: 1.15rem;
    cursor: pointer;
}

.modal-nouvelle-groupe__emojis[hidden] {
    display: none;
}

.modal-nouvelle-groupe__emojis {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    border: 1px solid #d9e8f6;
    border-radius: 16px;
    background: #fff;
}

.modal-nouvelle-groupe__emojis button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #f3f7fd;
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-nouvelle-groupe__outil,
.modal-nouvelle-groupe__publier,
.modal-nouvelle-groupe__choix-bouton,
.modal-nouvelle-groupe__photo-ajout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border-radius: 16px;
    font-weight: 900;
    cursor: pointer;
}

.modal-nouvelle-groupe__outil,
.modal-nouvelle-groupe__choix-bouton,
.modal-nouvelle-groupe__photo-ajout {
    border: 1px solid #cfe0f4;
    background: #fff;
    color: #1f59c4;
}

.modal-nouvelle-groupe__photo-ajout {
    flex-direction: column;
    gap: 8px;
    min-height: 104px;
    width: 100%;
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.96);
}

.modal-nouvelle-groupe__choix-bouton {
    width: fit-content;
    padding: 0 18px;
    color: #101828;
    background: #fff;
    font-weight: 400;
}

.modal-nouvelle-groupe__choix-bouton:hover,
.modal-nouvelle-groupe__choix-bouton:focus-visible {
    background: #f2f7ff;
    border-color: #bfd6f4;
}

.modal-nouvelle-groupe__photo-ajout-icone {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
}

.modal-nouvelle-groupe__photo-ajout-icone svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.modal-nouvelle-groupe__publier {
    width: 100%;
    border: 0;
    background: #1f59c4;
    color: #fff;
    font-size: 1rem;
}

.modal-nouvelle-groupe__publier:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.modal-nouvelle-groupe__selection {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal-nouvelle-groupe__pastille {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #eaf4ff;
    color: #1f59c4;
    font-size: 0.88rem;
    font-weight: 800;
}

.modal-nouvelle-groupe__photos {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.modal-nouvelle-groupe__acces {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid #d6e5f8;
    border-radius: 18px;
    background: #f8fbff;
}

.modal-nouvelle-groupe__sur-titre {
    margin: 0;
    color: #1f59c4;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.modal-nouvelle-groupe__texte-muted {
    margin: 0;
    color: #66758d;
    font-size: 0.94rem;
    line-height: 1.5;
}

.modal-nouvelle-groupe__photo-preview {
    position: relative;
    flex: 0 0 118px;
    height: 92px;
    overflow: hidden;
    border-radius: 14px;
    background: #eef5fc;
}

.modal-nouvelle-groupe__photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-nouvelle-groupe__photo-preview button {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.72);
    color: #fff;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.modal-nouvelle-groupe__retour {
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: #e4f1ff;
    color: #1f59c4;
    font-weight: 800;
}

.modal-nouvelle-groupe__retour.is-error {
    background: #ffe3e3;
    color: #a11b1b;
}

.modal-nouvelle-membres[hidden] {
    display: none;
}

.modal-nouvelle-membres {
    position: fixed;
    inset: 0;
    z-index: 3200;
}

.modal-nouvelle-membres__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
}

.modal-nouvelle-membres__boite {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(100%, 560px);
    height: 100%;
    margin: 0 auto;
    background: #fff;
}

.modal-nouvelle-membres--acces {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(18px, 4vw, 48px);
}

.modal-nouvelle-membres--acces .modal-nouvelle-membres__boite {
    width: min(92vw, 560px);
    height: auto;
    max-height: min(680px, calc(100vh - 72px));
    margin: 0;
    overflow: hidden;
    border: 1px solid #d9e8f6;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(23, 32, 51, 0.22);
}

.modal-nouvelle-membres--acces .modal-nouvelle-membres__liste {
    flex: 0 1 auto;
    max-height: min(46vh, 360px);
}

.modal-nouvelle-membres--acces .modal-nouvelle-membres__actions {
    display: flex;
    justify-content: flex-end;
}

.modal-nouvelle-membres__entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: max(18px, env(safe-area-inset-top)) 18px 14px;
    border-bottom: 1px solid #d8e6f4;
}

.modal-nouvelle-membres__entete h3 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 900;
}

.modal-nouvelle-membres__fermer {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: #f3f6fb;
    color: #111827;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.modal-nouvelle-membres__liste {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 18px;
}

.modal-nouvelle-membres__item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid #d9e8f6;
    border-radius: 16px;
    background: #f7fbff;
    color: #111827;
    font-weight: 800;
}

.modal-nouvelle-membres__actions {
    padding: 14px 18px max(18px, env(safe-area-inset-bottom));
    border-top: 1px solid #d8e6f4;
}
