/* ============================================================
   ÉCRITURE DE SOIE — Espace groupes d'écriture privés
   (utilisé dans inscription.html : liste, abonnement, chat, écriture)
   ============================================================ */

    .grp { max-width: 980px; margin: 0 auto; padding: 7rem var(--gutter) 5rem; }
    .grp__head { text-align: center; margin-bottom: 2.4rem; }
    .grp__title { font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 5vw, 3.2rem); margin: 0.5rem 0; }
    .grp__sub { color: var(--ink-soft); max-width: 56ch; margin: 0 auto; line-height: 1.6; white-space: pre-line; }

    .grp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; }
    .grp-card { background: var(--cream); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
    .grp-card__media { margin: -1.4rem -1.5rem 0.4rem; border-radius: 18px 18px 0 0; overflow: hidden; aspect-ratio: 16 / 9; background: var(--ivory-2); }
    .grp-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .grp-card__name { font-family: var(--serif); font-size: 1.3rem; }
    .grp-card__desc { color: var(--ink-soft); line-height: 1.55; font-size: 0.95rem; flex: 1; white-space: pre-line; }
    .grp-card__foot { margin-top: 0.6rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
    .grp-card__lock { font-size: 0.82rem; color: var(--ink-soft); }
    .grp-card__price { font-weight: 600; color: var(--silk-deep); }

    /* Page dédiée à un groupe (groupe.html) : interface immersive plus large */
    .groupe-page { max-width: 1180px; }
    .groupe-solo .gv__head { text-align: center; padding-bottom: 1.4rem; margin-bottom: 1.8rem; border-bottom: 1px solid var(--line); }
    .groupe-solo .gv__name { margin: 0 0 0.4rem; }

    .gv__back { margin-bottom: 1rem; }
    .gv__head { margin-bottom: 1rem; }
    .gv__name { font-family: var(--serif); font-weight: 300; font-size: clamp(1.7rem, 4vw, 2.4rem); }
    .gv__tabs { display: flex; gap: 0.4rem; border-bottom: 1px solid var(--line); margin-bottom: 1.4rem; }
    .gv__tab { padding: 0.6rem 1rem; border: none; background: none; cursor: pointer; font: inherit; color: var(--ink-soft); border-bottom: 2px solid transparent; }
    .gv__tab.is-active { color: var(--ink); border-bottom-color: var(--silk-deep); }
    .gv__panel { display: none; }
    .gv__panel.is-active { display: block; }

    /* chat */
    .chat { display: flex; flex-direction: column; height: 60vh; min-height: 380px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--cream); }
    .chat__list { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
    .chat__msg { max-width: 80%; padding: 0.55rem 0.8rem; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
    .chat__msg--me { align-self: flex-end; background: var(--ink); color: var(--cream); border-color: var(--ink); }
    .chat__who { font-size: 0.72rem; opacity: 0.8; margin-bottom: 0.15rem; }
    .chat__form { display: flex; gap: 0.5rem; padding: 0.7rem; border-top: 1px solid var(--line); }
    .chat__form input { flex: 1; }

    /* écriture */
    .gw-head { margin-bottom: 1.2rem; }
    .gw-head__title { font-family: var(--serif); font-weight: 300; font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 0.3rem; }
    .gw-head__sub { color: var(--ink-soft); line-height: 1.55; font-size: 0.95rem; margin: 0; }
    .gw-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
    .gw-item { text-align: left; background: var(--cream); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; cursor: pointer; font: inherit; overflow: hidden; }
    .gw-item:hover { border-color: var(--silk-deep); }
    .gw-item__media { margin: -1rem -1.1rem 0.6rem; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ivory-2); }
    .gw-item__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .gw-item__title { font-family: var(--serif); font-size: 1.1rem; }
    .gw-item__sub { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.2rem; }
    .gw-item__lim { font-size: 0.76rem; color: var(--silk-deep); margin-top: 0.45rem; }
    .gw-item__lim.is-closed { color: var(--ink-soft); }
    .gw-item__lim--open { color: var(--sage, #7a8e6e); }
    .gw-item.is-closed { opacity: 0.72; }
    .gw-locknote--closed { border-left-color: var(--ink-soft); background: var(--ivory-2); color: var(--ink); }
    .gw-editor__media { border-radius: 12px; overflow: hidden; margin: 0.6rem 0 1rem; max-height: 320px; }
    .gw-editor__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

    /* éditeur immersif (même esprit que l'atelier libre : pleine largeur) */
    .gw-write { margin: 0.8rem calc(50% - 50vw) 0; background: var(--cream); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(1.4rem, 3vw, 2.6rem) 0 clamp(1.6rem, 4vw, 3rem); }
    .gw-write__inner { max-width: min(1500px, 92vw); margin: 0 auto; padding: 0 clamp(var(--gutter), 4vw, 4rem); }
    .gw-write__head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.8rem; }
    .gw-write__title { font-family: var(--serif); font-weight: 300; font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.12; margin: 0 0 0.7rem; }
    .gw-write__head .gw-write__title { margin: 0; }
    .gw-write__back { flex: none; padding: 0.32rem 0.62rem; font-size: 1.05rem; line-height: 1; }
    /* deux colonnes quand il y a une image : texte à gauche, image à droite */
    .gw-write__inner.has-media { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(1.6rem, 4vw, 3.5rem); align-items: start; }
    .gw-write__main { grid-column: 1; min-width: 0; }
    .gw-write__aside { grid-column: 2; align-self: start; }
    .gw-write__media { display: block; width: 100%; padding: 0; border: none; background: none; cursor: zoom-in; position: relative; border-radius: 16px; overflow: hidden; box-shadow: 0 30px 70px -52px rgba(42, 32, 54, 0.55); }
    .gw-write__media img { width: 100%; height: auto; max-height: 76vh; object-fit: cover; display: block; }
    .gw-write__zoom { position: absolute; bottom: 0.7rem; right: 0.7rem; background: rgba(42, 32, 54, 0.72); color: #fff; font-size: 0.74rem; padding: 0.32rem 0.7rem; border-radius: 100px; opacity: 0; transition: opacity 0.2s var(--ease); }
    .gw-write__media:hover .gw-write__zoom, .gw-write__media:focus-visible .gw-write__zoom { opacity: 1; }
    @media (max-width: 760px) {
      .gw-write__inner.has-media { grid-template-columns: 1fr; }
      .gw-write__main, .gw-write__aside { grid-column: 1; }
      .gw-write__aside { order: -1; margin-bottom: 0.4rem; }
    }
    /* visionneuse plein écran */
    .img-zoom { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 2rem; background: rgba(20, 14, 26, 0.92); cursor: zoom-out; }
    .img-zoom[hidden] { display: none; }
    .img-zoom img { max-width: 96vw; max-height: 92vh; object-fit: contain; border-radius: 8px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8); }
    .img-zoom__x { position: absolute; top: 0.9rem; right: 1.2rem; background: none; border: none; color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer; }
    .gw-write__consigne { color: var(--ink-soft); line-height: 1.75; white-space: pre-wrap; margin: 0 0 1.2rem; }
    .gw-locknote { font-size: 0.86rem; color: var(--ink-soft); background: var(--ivory); border: 1px solid var(--line); border-left: 3px solid var(--silk-deep); border-radius: 10px; padding: 0.55rem 0.85rem; margin: 0 0 1.1rem; }
    .gw-write__text { width: 100%; border: none; background: transparent; outline: none; resize: none; display: block; min-height: 44vh; padding: 0; overflow: hidden; font-family: var(--serif); font-weight: 300; font-size: clamp(1.1rem, 2.2vw, 1.3rem); line-height: 1.95; color: var(--ink); }
    .gw-write__text::placeholder { color: rgba(42, 32, 54, 0.3); font-style: italic; }
    .gw-write__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line); }
    .gw-write__bar .gw-save { margin: 0; }
    .gw-write__bar .btn { margin: 0; }
    .gw-editor__consigne { color: var(--ink-soft); line-height: 1.7; white-space: pre-wrap; border-left: 3px solid var(--silk); padding-left: 1rem; margin: 0.6rem 0 1.2rem; }
    .gw-frame { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
    .gw-fixed { margin: 0; padding: 0.75rem 1rem; background: var(--ivory); color: var(--ink-soft); font-style: italic; line-height: 1.7; white-space: pre-wrap; }
    .gw-fixed--start { border-bottom: 1px dashed var(--line); }
    .gw-fixed--end { border-top: 1px dashed var(--line); }
    .gw-fixed__tag { display: block; font-style: normal; font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--silk-deep); margin-bottom: 0.2rem; }
    .gw-frame textarea { border: none; width: 100%; display: block; min-height: 280px; line-height: 1.7; font-family: var(--body); background: #fff; resize: vertical; }
    .gw-save { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.5rem; }
    .gw-advice { margin-top: 1.4rem; }
    .gw-advice__title { font-family: var(--serif); font-size: 1.1rem; margin-bottom: 0.5rem; }
    .gw-advice__item { background: rgba(171, 147, 214, 0.14); border-radius: 10px; padding: 0.6rem 0.8rem; margin-bottom: 0.4rem; }
    @media (max-width: 540px) { .chat__msg { max-width: 92%; } }

    /* ── Chat flottant (Groupe + privé avec Agnès) ── */
    .gchat { position: fixed; right: clamp(0.8rem, 3vw, 1.6rem); bottom: clamp(0.8rem, 3vw, 1.6rem); z-index: 1000; display: flex; flex-direction: column; align-items: flex-end; gap: 0.7rem; }
    .gchat__launch { width: 58px; height: 58px; border-radius: 50%; border: none; background: var(--ink); color: var(--cream); font-size: 1.4rem; cursor: pointer; box-shadow: 0 16px 32px -12px rgba(42, 32, 54, 0.65); display: grid; place-items: center; position: relative; transition: transform 0.2s var(--ease), background 0.2s var(--ease); }
    .gchat__launch:hover { transform: translateY(-2px); }
    .gchat__launch.is-open { background: var(--silk-deep); }
    .gchat__dot { position: absolute; top: 9px; right: 9px; width: 13px; height: 13px; border-radius: 50%; background: var(--red); border: 2px solid var(--cream); }
    .gchat__panel { width: min(372px, 92vw); height: min(70vh, 560px); background: var(--cream); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 34px 70px -26px rgba(42, 32, 54, 0.6); display: flex; flex-direction: column; overflow: hidden; }
    .gchat__head { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.55rem 0.5rem 0.7rem; border-bottom: 1px solid var(--line); }
    .gchat__tabs { display: flex; gap: 0.35rem; }
    .gchat__tab { padding: 0.42rem 0.85rem; border: 1px solid var(--line); background: var(--ivory); border-radius: 100px; font: inherit; font-size: 0.85rem; cursor: pointer; color: var(--ink-soft); }
    .gchat__tab.is-active { background: var(--ink); color: var(--cream); border-color: var(--ink); }
    .gchat__min { background: none; border: none; font-size: 1.3rem; color: var(--ink-soft); cursor: pointer; line-height: 1; width: 34px; height: 34px; border-radius: 8px; }
    .gchat__min:hover { background: var(--ivory-2); }
    .gchat__list { flex: 1; min-height: 0; overflow-y: auto; padding: 0.9rem; display: flex; flex-direction: column; gap: 0.5rem; background: var(--ivory); }
    .gchat__form { display: flex; gap: 0.4rem; padding: 0.6rem; border-top: 1px solid var(--line); }
    .gchat__form input { flex: 1; padding: 0.6rem 0.8rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--ivory); color: var(--ink); }
    .gchat__form input:focus { outline: none; border-color: var(--silk-deep); background: #fff; }
    .gchat__form .btn--solid { padding: 0.5rem 0.9rem; margin: 0; }

    /* ── Switch « Partager avec le groupe » (atelier communautaire) ── */
    .gw-share { display: flex; align-items: center; gap: 0.8rem; margin-top: 1.1rem; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--ivory); cursor: pointer; transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
    .gw-share.is-on { border-color: var(--silk-deep); background: rgba(171, 147, 214, 0.1); }
    .gw-share input { position: absolute; opacity: 0; width: 1px; height: 1px; }
    .gw-share__switch { flex: none; width: 44px; height: 25px; border-radius: 100px; background: var(--line); position: relative; transition: background 0.2s var(--ease); }
    .gw-share__switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(42, 32, 54, 0.3); transition: transform 0.2s var(--ease); }
    .gw-share.is-on .gw-share__switch { background: var(--silk-deep); }
    .gw-share.is-on .gw-share__switch::after { transform: translateX(19px); }
    .gw-share__txt { font-size: 0.88rem; line-height: 1.45; color: var(--ink-soft); }
    .gw-share__on { display: none; color: var(--ink); }
    .gw-share.is-on .gw-share__on { display: inline; }
    .gw-share.is-on .gw-share__off { display: none; }
    .gw-share input:focus-visible + .gw-share__switch { outline: 2px solid var(--silk-deep); outline-offset: 2px; }

    /* ── Mur des textes partagés (« Lire le groupe ») ── */
    .mur { display: flex; flex-direction: column; gap: 1.4rem; }
    .mur-card { background: var(--cream); border: 1px solid var(--line); border-radius: 16px; padding: 1.3rem clamp(1.1rem, 3vw, 1.6rem); }
    .mur-card__head { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
    .mur-card__who { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
    .mur-card__prop { font-size: 0.74rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--silk-deep); }
    .mur-card__text { font-family: var(--serif); font-weight: 300; font-size: clamp(1.02rem, 2vw, 1.12rem); line-height: 1.85; color: var(--ink); }
    .mur-card__coms { margin-top: 1.1rem; display: flex; flex-direction: column; gap: 0.45rem; }
    .mur-com { background: var(--ivory); border: 1px solid var(--line); border-radius: 10px; padding: 0.5rem 0.78rem; font-size: 0.92rem; line-height: 1.5; color: var(--ink); }
    .mur-com.is-me { background: rgba(171, 147, 214, 0.12); border-color: rgba(171, 147, 214, 0.4); }
    .mur-com__who { font-weight: 600; color: var(--silk-deep); font-size: 0.82rem; margin-right: 0.3rem; }
    .mur-card__form { display: flex; gap: 0.5rem; margin-top: 0.85rem; }
    .mur-card__form input { flex: 1; min-width: 0; padding: 0.6rem 0.8rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--ivory); color: var(--ink); }
    .mur-card__form input:focus { outline: none; border-color: var(--silk-deep); background: #fff; }
    .mur-card__form .btn { margin: 0; flex: none; }


/* Intro de la section groupes dans la page inscription */
.insc-section__intro { color: var(--ink-soft); line-height: 1.7; max-width: 70ch; margin: 0 0 1.6rem; }
