/* Styles de la modale disponibles sur toutes les pages publiques. */
/* v6.32 — modale « Ajouter mon compagnon à la Galerie ». */
html.gdc-modal-open, body.gdc-modal-open { overflow: hidden !important; }
.gdc-add-companion-modal[hidden] { display: none !important; }
.gdc-add-companion-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    padding: 28px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity .16s ease;
    font-family: inherit;
}
.gdc-add-companion-modal.is-open { opacity: 1; }
.gdc-add-companion-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(2px);
}
.gdc-add-companion-dialog {
    position: relative;
    z-index: 1;
    width: min(980px, calc(100vw - 56px));
    max-height: min(820px, calc(100vh - 56px));
    overflow: auto;
    box-sizing: border-box;
    padding: 42px 46px 36px;
    background: #0d0d0e;
    color: #f7f5ef;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 4px;
    box-shadow: 0 30px 90px rgba(0,0,0,.48);
}
.gdc-add-companion-close {
    position: absolute;
    top: 14px;
    right: 18px;
    appearance: none;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.62);
    font: 300 30px/1 system-ui, sans-serif;
    padding: 4px 7px;
    cursor: pointer;
}
.gdc-add-companion-close:hover { color: #fff; }
.gdc-add-companion-head { margin: 0 0 30px; max-width: 620px; }
.gdc-add-companion-kicker {
    margin: 0 0 8px;
    color: rgba(255,255,255,.48);
    text-transform: uppercase;
    letter-spacing: .14em;
    font: 600 10px/1.2 system-ui, sans-serif;
}
.gdc-add-companion-head h2,
.gdc-add-companion-success h2 {
    margin: 0;
    color: #fff;
    font: 700 clamp(31px, 3vw, 47px)/1.02 'Cabin Sketch', system-ui, sans-serif;
    letter-spacing: -.02em;
}
.gdc-add-companion-head > p:last-child,
.gdc-add-companion-success > p {
    margin: 11px 0 0;
    color: rgba(255,255,255,.66);
    font: 400 16px/1.5 system-ui, sans-serif;
}
.gdc-add-companion-fields {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, .9fr) minmax(290px, 1.2fr);
    gap: 22px 24px;
    align-items: start;
}
.gdc-add-field { display: block; min-width: 0; }
.gdc-add-label {
    display: block;
    margin: 0 0 8px;
    color: rgba(255,255,255,.78);
    font: 600 12px/1.25 system-ui, sans-serif;
    letter-spacing: .02em;
}
.gdc-add-label b { color: #fff; font-weight: 700; }
.gdc-add-field input[type="text"],
.gdc-add-field input[type="email"],
.gdc-add-field input[type="password"],
.gdc-add-field select,
.gdc-add-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 4px;
    background: rgba(255,255,255,.055);
    color: #fff;
    outline: none;
    box-shadow: none;
    font: 400 15px/1.4 system-ui, sans-serif;
    transition: border-color .14s ease, background .14s ease;
}
.gdc-add-field input[type="text"], .gdc-add-field input[type="email"], .gdc-add-field input[type="password"], .gdc-add-field select { height: 44px; padding: 0 13px; }
.gdc-add-field textarea { min-height: 158px; resize: vertical; padding: 12px 13px; }
.gdc-add-field input::placeholder, .gdc-add-field textarea::placeholder { color: rgba(255,255,255,.34); }
.gdc-add-field select option { color: #111; background: #fff; }
.gdc-add-field input:focus, .gdc-add-field select:focus, .gdc-add-field textarea:focus {
    border-color: rgba(255,255,255,.60);
    background: rgba(255,255,255,.075);
}
.gdc-add-photo-field { grid-column: 3; grid-row: 1 / span 2; }
.gdc-add-phrase-field { grid-column: 1 / span 2; }
.gdc-add-photo-box {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 4px;
    background: rgba(255,255,255,.035);
    cursor: pointer;
}
.gdc-add-photo-box input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.gdc-add-photo-empty { display: grid; justify-items: center; gap: 7px; color: rgba(255,255,255,.50); font: 500 12px/1.2 system-ui, sans-serif; }
.gdc-add-photo-plus { color: #fff; font: 300 36px/1 system-ui, sans-serif; }
.gdc-add-photo-box.has-image {
    aspect-ratio: auto;
    min-height: 0;
    background: transparent;
}
.gdc-add-photo-box.has-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    background: transparent;
}
.gdc-add-photo-box img { display: block; width: 100%; height: 100%; object-fit: contain; background: transparent; }
.gdc-add-photo-change {
    position: absolute;
    right: 9px;
    bottom: 9px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(0,0,0,.66);
    color: #fff;
    font: 600 11px/1 system-ui, sans-serif;
}
.gdc-add-companion-foot {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 20px;
    align-items: end;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.10);
}
.gdc-add-required { margin: 0; color: rgba(255,255,255,.46); font: 400 12px/1.45 system-ui, sans-serif; }
.gdc-add-error { grid-column: 1; color: #ffd0d0; font: 500 12px/1.4 system-ui, sans-serif; }
.gdc-add-submit {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-width: 132px;
    height: 43px;
    padding: 0 20px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 4px;
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.32);
    font: 650 13px/1 system-ui, sans-serif;
    cursor: default;
    transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.gdc-add-submit.is-ready:not(:disabled), .gdc-add-companion-success .gdc-add-submit {
    background: #f2efe7;
    border-color: #f2efe7;
    color: #111;
    cursor: pointer;
}
.gdc-add-submit.is-ready:not(:disabled):hover, .gdc-add-companion-success .gdc-add-submit:hover { background: #fff; border-color: #fff; }
.gdc-add-companion-success { padding: 38px 8px 14px; text-align: center; }
.gdc-add-companion-success .gdc-add-submit { margin-top: 28px; grid-column: auto; grid-row: auto; }

@media (max-width: 760px) {
    .gdc-add-companion-modal { padding: 14px; }
    .gdc-add-companion-dialog { width: calc(100vw - 28px); max-height: calc(100vh - 28px); padding: 34px 22px 26px; }
    .gdc-add-companion-fields { grid-template-columns: 1fr; }
    .gdc-add-photo-field, .gdc-add-phrase-field { grid-column: auto; grid-row: auto; }
    .gdc-add-photo-box { max-width: 420px; }
    .gdc-add-companion-foot { grid-template-columns: 1fr; }
    .gdc-add-submit { grid-column: 1; grid-row: auto; width: 100%; }
}

/* v6.35 — CTA Gutenberg balisé côté rendu. */
[data-gdc-add-companion] { cursor: pointer; }

/* v6.40 — deuxième état de la même modale : création de l’espace. */
.gdc-add-space-state { padding: 20px 8px 8px; max-width: 680px; margin: 0 auto; }
.gdc-add-space-head { margin-bottom: 28px; text-align: left; }
.gdc-add-space-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.gdc-add-space-foot { display: grid; grid-template-columns: 1fr auto; gap: 12px 18px; align-items: end; margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.10); }
.gdc-add-space-foot .gdc-add-error { grid-column: 1; }
.gdc-add-space-foot .gdc-add-submit { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 760px) {
  .gdc-add-space-state { padding: 8px 0 0; }
  .gdc-add-space-fields { grid-template-columns: 1fr; }
  .gdc-add-space-foot { grid-template-columns: 1fr; }
  .gdc-add-space-foot .gdc-add-error, .gdc-add-space-foot .gdc-add-submit { grid-column: 1; grid-row: auto; }
}

/* v6.54 — lisibilité de la saisie, y compris sous les styles Kadence. */
.gdc-add-companion-modal .gdc-add-field input[type="text"],
.gdc-add-companion-modal .gdc-add-field input[type="email"],
.gdc-add-companion-modal .gdc-add-field input[type="password"],
.gdc-add-companion-modal .gdc-add-field textarea,
.gdc-add-companion-modal .gdc-add-field select,
.gdc-add-companion-modal .gdc-add-field input[type="text"]:focus,
.gdc-add-companion-modal .gdc-add-field input[type="email"]:focus,
.gdc-add-companion-modal .gdc-add-field input[type="password"]:focus,
.gdc-add-companion-modal .gdc-add-field textarea:focus,
.gdc-add-companion-modal .gdc-add-field select:focus {
    color: #fff !important;
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
}
.gdc-add-companion-modal .gdc-add-field select option { color: #111 !important; -webkit-text-fill-color: #111; }
.gdc-add-photo-note { margin: 9px 0 0; color: rgba(255,255,255,.65); font: 400 12px/1.45 system-ui, sans-serif; }
.gdc-add-photo-note[hidden] { display: none !important; }


/* v6.69 : le remplissage automatique Chrome ne doit pas rendre
   l'e-mail illisible (fond clair du navigateur + texte blanc GDC).
   Correction limitee au champ e-mail de creation/rattachement du compte. */
.gdc-add-companion-modal .gdc-add-space-form input[type="email"]:-webkit-autofill,
.gdc-add-companion-modal .gdc-add-space-form input[type="email"]:-webkit-autofill:hover,
.gdc-add-companion-modal .gdc-add-space-form input[type="email"]:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #19191b inset !important;
    box-shadow: 0 0 0 1000px #19191b inset !important;
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff;
}
