/**
 * Formulaire de rendez-vous sur evenement.
 *
 * CHARTE. Tout passe par les variables generees par rr-core (RR Options), avec
 * des replis pris sur la charte de marque : noir #040404, blanc, or #DAB455.
 * Aucune couleur decorative en dur, sinon le bloc cesse de suivre la marque a
 * la premiere retouche des options, et casse en mode sombre.
 *
 * ⚠️ L'OR NE SERT JAMAIS DE TEXTE SUR FOND CLAIR : 1,97:1, tres loin des
 * 4,5:1 exiges. Pour du texte, c'est --color-accent-dark (#896a1e, 5,07:1).
 * L'or reste aux surfaces et aux filets.
 *
 * TYPOGRAPHIE. Aucune famille, aucune graisse decorative n'est imposee ici :
 * titres et champs heritent du theme (--font-family-heading / -base, reglees
 * dans RR Options > Typographie). Les libelles reprennent exactement ceux du
 * formulaire de contact (contact.css), pour que les deux formulaires du site
 * se ressemblent.
 *
 * Mise en page : portrait a gauche, formulaire a droite, une seule colonne
 * sous 980px. Sans portrait, le formulaire prend toute la largeur.
 */

.rr-rdv {
    margin: 3rem 0;
}

.rr-rdv--with-media {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
}

/* ------------------------------------------------------------------ */
/* Portrait                                                            */
/* ------------------------------------------------------------------ */

.rr-rdv__media {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius-md, 6px);
}

.rr-rdv__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Nom et fonction poses sur le bas de l'image. Le degrade est volontairement
   en noir pur plutot qu'en variable : il assombrit une PHOTO, il ne suit pas
   le theme, et doit rester lisible en mode sombre comme en mode clair. */
.rr-rdv__person {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: 3.5rem 1.25rem 1.25rem;
    background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0));
    color: #fff;
}

.rr-rdv__person-name {
    font-family: var(--font-family-heading, inherit);
    font-size: var(--font-size-xl, 1.25rem);
    line-height: 1.2;
}

.rr-rdv__person-role {
    font-size: var(--font-size-sm, .875rem);
    /* Or clair sur fond sombre : 13,92:1, un des rares emplois ou l'or peut
       porter du texte. */
    color: var(--color-accent-light, #e9d39b);
}

/* ------------------------------------------------------------------ */
/* En-tete                                                             */
/* ------------------------------------------------------------------ */

.rr-rdv__eyebrow {
    margin: 0 0 .5rem;
    font-size: var(--font-size-sm, .875rem);
    font-weight: var(--font-weight-bold, 700);
    /* Or FONCE, pas l'or de marque : c'est du texte sur fond clair. */
    color: var(--color-accent-dark, #896a1e);
}

.rr-rdv__title {
    margin: 0 0 .75rem;
}

.rr-rdv__text {
    margin: 0 0 1.75rem;
    max-width: 60ch;
    color: var(--color-text-secondary, #4a4a4a);
}

.rr-rdv__closed {
    margin: 0;
    padding: 1.25rem;
    background: var(--color-bg-secondary, #f8f8f8);
    border-radius: var(--radius-md, 6px);
    color: var(--color-text-secondary, #4a4a4a);
}

/* ------------------------------------------------------------------ */
/* Formulaire                                                          */
/* ------------------------------------------------------------------ */

.rr-rdv__form {
    padding: 2rem;
    background: var(--color-bg-secondary, #f8f8f8);
    border-radius: var(--radius-md, 6px);
}

.rr-rdv__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.rr-rdv__field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin: 0 0 1rem;
}

/* Memes libelles que le formulaire de contact : ni capitales, ni interlettrage
   etire. Les deux formulaires du site doivent se ressembler. */
.rr-rdv__field label,
.rr-rdv__label {
    font-size: var(--font-size-sm, .875rem);
    font-weight: 600;
    color: var(--color-text, #000);
}

.rr-rdv__required {
    color: var(--color-accent-dark, #896a1e);
}

.rr-rdv__optional {
    font-weight: 400;
    color: var(--color-text-muted, #767676);
}

.rr-rdv__field input[type="text"],
.rr-rdv__field input[type="tel"],
.rr-rdv__field input[type="email"],
.rr-rdv__field select,
.rr-rdv__field textarea {
    width: 100%;
    padding: .7rem .8rem;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-md, 6px);
    background: var(--color-bg, #fff);
    font: inherit;
    color: var(--color-text, #000);
}

.rr-rdv__field textarea {
    resize: vertical;
    min-height: 110px;
}

.rr-rdv__field input::placeholder {
    color: var(--color-text-muted, #767676);
}

.rr-rdv__field input:focus,
.rr-rdv__field select:focus,
.rr-rdv__field textarea:focus {
    outline: 2px solid var(--color-primary, #040404);
    outline-offset: 1px;
    border-color: transparent;
}

/* ------------------------------------------------------------------ */
/* Periode de presence                                                 */
/* ------------------------------------------------------------------ */

/* Annonce, pas champ de formulaire : le visiteur ne choisit rien, il
   apprend quand la rencontre est possible. D'ou le filet d'accent a gauche
   plutot qu'une bordure complete, qui ressemblerait a une zone de saisie. */
.rr-rdv__periods {
    margin: 0 0 1.75rem;
    padding: 1.1rem 1.25rem;
    border-left: 3px solid var(--color-accent, #dab455);
    background: var(--color-bg-secondary, #f8f8f8);
    border-radius: 0 var(--radius-md, 6px) var(--radius-md, 6px) 0;
}

.rr-rdv__periods-label {
    margin: 0 0 .35rem;
    font-size: var(--font-size-sm, .875rem);
    color: var(--color-text-muted, #767676);
}

.rr-rdv__period {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .5rem;
    margin: 0;
    font-family: var(--font-family-heading, inherit);
    font-size: var(--font-size-xl, 1.25rem);
    line-height: 1.3;
    color: var(--color-text, #000);
}

/* Plusieurs sejours annonces : les suivants se detachent du premier sans
   repeter l'intitule. */
.rr-rdv__period + .rr-rdv__period {
    margin-top: .4rem;
}

.rr-rdv__period-place {
    font-family: var(--font-family-base, inherit);
    font-size: var(--font-size-sm, .875rem);
    color: var(--color-text-muted, #767676);
}

.rr-rdv__period-place::before {
    content: '\00b7';
    margin-right: .5rem;
}

/* ------------------------------------------------------------------ */
/* Consentement, envoi, retours                                        */
/* ------------------------------------------------------------------ */

.rr-rdv__consent {
    margin: 0 0 1.25rem;
}

.rr-rdv__consent label {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-size: var(--font-size-sm, .875rem);
    line-height: 1.5;
    color: var(--color-text-secondary, #4a4a4a);
}

.rr-rdv__consent input {
    margin-top: .2rem;
    flex: 0 0 auto;
}

/* Piege a robots : hors flux et hors lecture d'ecran, mais pas display:none,
   que certains scripts detectent pour l'ignorer. */
.rr-rdv__honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.rr-rdv__actions {
    margin: 0;
}

/* Le bouton garde l'apparence .btn--primary du theme : seule la largeur est
   imposee ici. Pas de capitales ni d'interlettrage ajoutes, sinon il ne
   ressemble plus aux autres boutons du site. */
.rr-rdv__submit {
    width: 100%;
}

.rr-rdv__submit[disabled] {
    opacity: .6;
    cursor: progress;
}

.rr-rdv__feedback {
    margin: 1rem 0 0;
    font-size: var(--font-size-sm, .875rem);
    min-height: 1.2em;
}

.rr-rdv__feedback--error {
    color: #c0392b;
}

.rr-rdv__feedback--success {
    color: var(--color-text, #000);
    font-weight: 600;
}

.rr-rdv__feedback--pending {
    color: var(--color-text-muted, #767676);
}

.rr-rdv__note {
    margin: .75rem 0 0;
    font-size: var(--font-size-sm, .875rem);
    text-align: center;
    color: var(--color-text-muted, #767676);
}

/* A la reussite, le formulaire disparait : la mention « vos coordonnées ne
   sont utilisées que pour... » n'a plus d'objet. */
.rr-rdv.is-done .rr-rdv__note {
    display: none;
}

/* ------------------------------------------------------------------ */
/* Adaptatif                                                           */
/* ------------------------------------------------------------------ */

@media (max-width: 980px) {
    .rr-rdv--with-media {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .rr-rdv__media {
        max-width: 420px;
    }
}

@media (max-width: 782px) {
    .rr-rdv__row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .rr-rdv__form {
        padding: 1.5rem 1.25rem;
    }
}
