* {
    box-sizing: border-box;
}

html {
    background: var(--rdv-bg);
}

body {
    margin: 0;
}

.rdv-page {
    min-height: 100vh;
    padding: 30px 14px;
    background-color: var(--rdv-bg);
    background-image: var(--rdv-image);
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    color: var(--rdv-text);
    font-family: var(--rdv-font);
}

.rdv-shell {
    max-width: 900px;
    margin: 0 auto;
    background: var(--rdv-secondary);
    color: var(--rdv-text);
    padding: clamp(18px,4vw,42px);
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0,0,0,.20);
}

.rdv-public-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin: 0;
}

.rdv-public-title {
    text-align: left;
    flex: 1;
    min-width: 0;
}

.rdv-public-title h1 {
    margin: 0 0 5px;
    font-size: var(--rdv-title-size);
    line-height: 1.1;
    color: var(--rdv-title);
}

.rdv-public-title h2 {
    margin: 0;
    font-size: 1.16em;
    font-weight: normal;
    color: var(--rdv-title);
}

.rdv-logo-link {
    display: block;
    line-height: 0;
}

	.rdv-shell a:not(.rdv-btn):not(.rdv-header-icon):not(.rdv-logo-link):not(.rdv-powered),
	.rdv-shell a:not(.rdv-btn):not(.rdv-header-icon):not(.rdv-logo-link):not(.rdv-powered):visited {
		color: var(--rdv-primary-text);
		text-decoration: underline;
	}

	.rdv-shell a:not(.rdv-btn):not(.rdv-header-icon):not(.rdv-logo-link):not(.rdv-powered):hover,
	.rdv-shell a:not(.rdv-btn):not(.rdv-header-icon):not(.rdv-logo-link):not(.rdv-powered):focus-visible {
		color: var(--rdv-primary);
		outline: 0;
	}

.rdv-logo {
    display: block;
    width: auto;
    max-width: 280px;
    height: var(--rdv-logo-height);
    max-height: 300px;
    object-fit: contain;
    object-position: right top;
}

.rdv-header-icons {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 10px 0 0;
    width: max-content;
    max-width: 100%;
}

.rdv-header-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--rdv-icons);
    border-radius: 50%;
    background: transparent;
    color: var(--rdv-icons);
    padding: 0;
    text-decoration: none;
    cursor: pointer;
}

.rdv-header-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rdv-header-icon:first-child svg {
    fill: currentColor;
    stroke: currentColor;
}

.rdv-header-icon:hover, .rdv-header-icon:focus-visible {
    background: var(--rdv-primary-hover);
    border-color: var(--rdv-primary-hover);
    color: var(--rdv-primary-text);
    outline: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.rdv-header-text {
    width: 100%;
    text-align: left;
    margin: 30px 0 50px;
    padding: 14px 16px;
    border: 1px solid var(--rdv-text);
    line-height: 1.55;
}

.rdv-header-text+.rdv-steps {
    margin-top: 0;
}

.rdv-steps {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 26px;
    padding: 0;
    list-style: none;
}

.rdv-steps li {
    padding: 7px 10px;
    border: 1px solid rgba(0,0,0,.25);
    border-radius: 99px;
    background: transparent;
    font-size: 13px;
}

.rdv-steps li.active {
    background: var(--rdv-primary);
    border-color: var(--rdv-primary);
    color: var(--rdv-primary-text);
}

.rdv-section {
    display: none;
}

.rdv-section.active {
    display: block;
}

.rdv-section h3 {
    color: var(--rdv-title);
    margin: 0 0 18px;
}

.rdv-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 14px;
}

.rdv-field label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.rdv-field input, .rdv-field select, .rdv-field textarea {
    display: block;
    width: 100%;
    padding: 11px;
    border: 1px solid rgba(0,0,0,.40);
    border-radius: 6px;
    background: rgba(255,255,255,.90);
    color: #222;
    font: inherit;
}

.rdv-field textarea {
    min-height: 110px;
    resize: vertical;
}

.rdv-field.full {
    grid-column: 1/-1;
}

.rdv-prestation-details {
    display: flex;
    align-items: stretch;
    gap: 9px;
    width: 100%;
    margin: 15px 0 0;
    line-height: 1.45;
}

.rdv-prestation-details[hidden] {
    display: none;
}

.rdv-prestation-meta {
    align-self: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
    white-space: nowrap;
}

.rdv-prestation-tarif {
    color: var(--rdv-text);
    font-weight: 700;
    background: transparent;
}

.rdv-prestation-duree {
    color: var(--rdv-text);
    font-size: .6em;
}

.rdv-prestation-trait {
    align-self: center;
    color: var(--rdv-text);
}

.rdv-prestation-intitule {
    flex: 1;
    min-height: 1.2em;
    padding: 10px 12px;
    border-left: 4px solid var(--rdv-primary);
    background: rgba(255,255,255,.25);
}

.rdv-choice-help {
    min-height: 1.2em;
    margin: 0;
    padding: 10px 12px;
    border-left: 4px solid var(--rdv-primary);
    background: rgba(255,255,255,.25);
}

.rdv-btn {
    display: inline-block;
    border: 0;
    border-radius: var(--rdv-radius);
    padding: 12px 15px;
    background: var(--rdv-primary);
    color: var(--rdv-primary-text);
    font: inherit;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}

.rdv-btn:hover, .rdv-btn:focus-visible {
    background: var(--rdv-primary-hover);
    color: var(--rdv-primary-text);
    outline: 0;
}

/* Les liens ordinaires reprennent le texte des boutons ; au survol, ils deviennent de la couleur des éléments actifs. */

.rdv-shell a:not(.rdv-btn):not(.rdv-header-icon):not(.rdv-logo-link), .rdv-shell a:not(.rdv-btn):not(.rdv-header-icon):not(.rdv-logo-link):visited {
    color: var(--rdv-primary-text);
    text-decoration: underline;
}

.rdv-shell a:not(.rdv-btn):not(.rdv-header-icon):not(.rdv-logo-link):hover, .rdv-shell a:not(.rdv-btn):not(.rdv-header-icon):not(.rdv-logo-link):focus-visible {
    color: var(--rdv-primary);
    outline: 0;
}

.rdv-actions {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.rdv-btn.secondary {
    background: transparent;
    color: var(--rdv-text);
    border: 1px solid var(--rdv-text);
}

.rdv-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.calendar {
    max-width: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(7,1fr);
    gap: 5px;
}

.calendar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    text-transform: capitalize;
}

.calendar-head button {
    border: 1px solid var(--rdv-text);
    background: transparent;
    color: var(--rdv-text);
    padding: 8px 12px;
    border-radius: var(--rdv-radius);
    cursor: pointer;
}

.calendar-weekday {
    text-align: center;
    font-weight: bold;
    font-size: 13px;
    padding: 5px;
}

.calendar-day {
    aspect-ratio: 1/1;
    border: 1px solid rgba(0,0,0,.25);
    background: rgba(255,255,255,.22);
    color: var(--rdv-text);
    border-radius: var(--rdv-radius);
    cursor: not-allowed;
}

.calendar-day.available {
    background: rgba(255,255,255,.88);
    border-color: var(--rdv-primary);
    color: #222;
    cursor: pointer;
}

.calendar-day.available:hover {
    background: var(--rdv-primary-hover);
    color: var(--rdv-primary-text);
}

.calendar-day.selected {
    background: var(--rdv-primary);
    color: var(--rdv-primary-text);
}

.time-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.time-list button {
    padding: 9px 12px;
    border: 1px solid var(--rdv-primary);
    background: rgba(255,255,255,.88);
    color: #222;
    border-radius: var(--rdv-radius);
    cursor: pointer;
}

.time-list button.selected {
    background: var(--rdv-primary);
    color: var(--rdv-primary-text);
}

.time-list button:hover, .time-list button:focus-visible {
    background: var(--rdv-primary-hover);
    color: var(--rdv-primary-text);
    outline: 0;
}

.rdv-note {
    background: rgba(255,255,255,.32);
    border-left: 4px solid var(--rdv-primary);
    padding: 11px;
    margin: 16px 0;
}

.rdv-error {
    background: #fff0f0;
    color: #5c0010;
    border-left: 4px solid #b00020;
    padding: 11px;
    margin: 16px 0;
}

.rdv-success {
    background: #eefbf1;
    color: #164a27;
    border-left: 4px solid #238144;
    padding: 15px;
    margin: 16px 0;
}

.rdv-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 15px;
}

.rdv-check input {
    width: auto;
    margin-top: 4px;
}

.rdv-link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-decoration: underline;
    font: inherit;
    cursor: pointer;
}

.rdv-modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    background: rgba(0,0,0,.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rdv-modal.open {
    display: flex;
}

.rdv-modal-box {
    background: #fff;
    color: #222;
    max-width: 700px;
    max-height: 80vh;
    overflow: auto;
    padding: 24px;
    border-radius: 10px;
}

.rdv-modal-box h2 {
    margin-top: 0;
}

.rdv-modal-close {
    float: right;
    border: 0;
    background: #eee;
    color: #222;
    padding: 7px 10px;
    border-radius: var(--rdv-radius);
    cursor: pointer;
}

@media(max-width:620px) {
    .rdv-page {
        padding: 0;
    }
    .rdv-shell {
        min-height: 100vh;
        border-radius: 0;
        padding: 22px 18px;
    }
    .rdv-public-header {
        gap: 12px;
    }
    .rdv-public-title h1 {
        font-size: min(var(--rdv-title-size),10vw);
    }
    .rdv-logo {
        max-width: 38vw;
    }
    .rdv-grid {
        grid-template-columns: 1fr;
    }
    .rdv-field.full {
        grid-column: auto;
    }
    .rdv-prestation-details {
        align-items: flex-start;
        gap: 7px;
    }
    .rdv-prestation-meta, .rdv-prestation-trait {
        padding-top: 10px;
    }
    .rdv-steps {
        gap: 5px;
    }
    .rdv-steps li {
        font-size: 12px;
        padding: 6px 8px;
    }
}

/* Reconnaissance d’un dossier existant : aucune coordonnée complète n’est affichée dans le navigateur. */

.rdv-known {
    margin: 16px 0 0;
    padding: 15px 16px;
    border: 1px solid var(--rdv-text);
    background: rgba(255,255,255,.20);
    line-height: 1.55;
}

.rdv-known p {
    margin: 0;
}

.rdv-known .rdv-actions {
    margin-top: 13px;
}

.rdv-known[hidden], #coordonnees-a-saisir[hidden], #coordonnees-suite[hidden] {
    display: none!important;
}

/* Correction 09 : les libellés ont leur propre respiration, surtout le téléphone. */

.rdv-field {
    padding: 7px 0 9px;
}

.rdv-field label {
    margin: 8px 0 11px;
    line-height: 1.45;
}

.rdv-field-telephone {
    padding: 20px 0 18px;
}

.rdv-field-telephone label {
    margin: 0 0 13px;
    font-size: 1.04em;
}

.rdv-date-choisie {
    margin: 0 0 19px;
    font-weight: 700;
    color: var(--rdv-title);
    text-transform: capitalize;
}

.rdv-field-check {
    padding-top: 2px;
}

.rdv-field-check .rdv-check {
    margin: 8px 0 13px;
}

.rdv-error[hidden], #blocage-absence[hidden] {
    display: none!important;
}

/* Pièces jointes : mêmes champs que le formulaire, avec aide lisible. */

.rdv-field-fichiers input[type=file] {
    padding: 9px;
    background: rgba(255,255,255,.90);
    cursor: pointer;
}

.rdv-files-help {
    margin: 8px 0 2px;
    font-size: .9em;
    line-height: 1.45;
    opacity: .82;
}

