/* ==========================================================================
   RDP Simulateur — composant Figma « Formulaire réservation » (671:630)
   Bouton aux couleurs du port : mêmes variables --port / --port-ink que les
   badges ports (classe .rdp-port--{slug} posée sur .rdp-sim).
   ========================================================================== */

.rdp-sim {
	--sim-bleu: #223577;          /* brand/bleu-profond */
	--sim-texte: #333333;         /* neutral/anthracite */
	--sim-champ: #e4eef6;         /* surface/bleu-givre-clair */
	--sim-erreur: #b3261e;
	--sim-r-sm: 8px;              /* radius/sm */
	--sim-r-lg: 16px;             /* radius/lg */
	box-sizing: border-box;
	background: #fff;
	border-radius: var(--sim-r-lg);
	padding: 24px 32px;           /* space/5 space/7 */
	font-family: Carlito, Calibri, sans-serif;
	font-size: 16px;
	line-height: 1.55;
	color: var(--sim-texte);
	width: 100%;
}
.rdp-sim *, .rdp-sim *::before, .rdp-sim *::after { box-sizing: border-box; }

/* Couleurs des ports (repli si les variables globales ne sont pas définies sur ce sélecteur) */
.rdp-sim.rdp-port--vieux-port  { --port: #b53e27; --port-ink: #fff; }
.rdp-sim.rdp-port--santa-lucia { --port: #9e1946; --port-ink: #fff; }
.rdp-sim.rdp-port--boulouris   { --port: #cede61; --port-ink: #223577; }
.rdp-sim.rdp-port--agay        { --port: #d2e5f3; --port-ink: #223577; }
.rdp-sim.rdp-port--ancres      { --port: #223577; --port-ink: #fff; }

.rdp-sim__titre { color: var(--sim-bleu); margin: 0 0 16px; text-align: center; }

.rdp-sim__form { display: flex; flex-direction: column; gap: 16px; margin: 0; }

/* Champs */
.rdp-sim__champ { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.rdp-sim__label { font-weight: 700; line-height: 1.5; color: var(--sim-bleu); padding: 0; float: none; width: 100%; }

/* Monocoque / Multicoques */
.rdp-sim__radios { display: flex; flex-wrap: wrap; gap: 8px 40px; }
.rdp-sim__radio { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.rdp-sim .rdp-sim__radio input[type="radio"] {
	padding: 0; min-width: 0; max-width: none; box-shadow: none;
	appearance: none; -webkit-appearance: none; margin: 0; flex: none;
	width: 20px; height: 20px; border-radius: 50%;
	border: 1.5px solid var(--sim-texte); background: #fff; cursor: pointer; display: grid; place-content: center;
}
.rdp-sim .rdp-sim__radio input[type="radio"]:checked { border: 2px solid var(--sim-bleu); }
.rdp-sim .rdp-sim__radio input[type="radio"]:checked::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--sim-bleu); }

/* Longueur / largeur */
.rdp-sim__dims { display: flex; gap: 24px; }
.rdp-sim__dim { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rdp-sim__input {
	display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px;
	background: var(--sim-champ); border-radius: var(--sim-r-sm); cursor: text; border: 2px solid transparent;
}
.rdp-sim__input input {
	flex: 1 1 auto; min-width: 0; width: 100%; height: 100%; padding: 0; margin: 0;
	border: 0; background: transparent; box-shadow: none; outline: none;
	font: inherit; color: var(--sim-texte);
}
.rdp-sim__input input::placeholder { color: #6b7280; opacity: 1; }
.rdp-sim__input:focus-within { border-color: var(--sim-bleu); }
.rdp-sim__input:has(input[aria-invalid="true"]) { border-color: var(--sim-erreur); }
.rdp-sim__prefixe, .rdp-sim__suffixe { flex: none; }
/* « L : 7,99 m » : l'unité suit la valeur saisie (navigateurs compatibles), sinon elle reste en bout de champ */
@supports (field-sizing: content) {
	.rdp-sim__input input { field-sizing: content; flex: 0 1 auto; width: auto; min-width: 2.5ch; max-width: 100%; }
	.rdp-sim__input input:placeholder-shown { min-width: 4ch; }
}
.rdp-sim__err { color: var(--sim-erreur); font-size: 14px; line-height: 1.3; }
.rdp-sim__err:empty { display: none; }

/* Listes Saison / Durée */
.rdp-sim__select {
	appearance: none; -webkit-appearance: none; width: 100%; max-width: 100%; min-width: 0; height: 48px; margin: 0;
	padding: 0 40px 0 16px; border: 2px solid transparent; border-radius: var(--sim-r-sm);
	background: var(--sim-champ) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' fill='none' stroke='%23223577' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
	font: inherit; color: var(--sim-texte); cursor: pointer;
	/* iOS Safari compte le texte d'une option longue dans la largeur de la page : on le contient */
	overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.rdp-sim__select:focus { border-color: var(--sim-bleu); outline: none; }

/* Prix total */
.rdp-sim__prix {
	display: flex; justify-content: space-between; align-items: center; gap: 12px;
	padding: 12px; background: #fff; border: 1px solid var(--sim-bleu); border-radius: var(--sim-r-sm);
	font-weight: 700; line-height: 1.5; color: var(--sim-bleu);
}
.rdp-sim__montant { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rdp-sim__message { margin: 8px 0 0; font-size: 14px; line-height: 1.4; color: var(--sim-bleu); }

/* Bouton Calculer — fond et bordure couleur du port ; survol : fond blanc, bordure port, texte bleu.
   Sélecteurs renforcés (.rdp-sim button.…) pour passer devant les styles de bouton globaux du kit Elementor. */
.rdp-sim button.rdp-sim__bouton {
	display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; margin: 0; padding: 0 16px;
	background: var(--port, var(--sim-bleu)); background-image: none; color: var(--port-ink, #fff);
	border: 2px solid var(--port, var(--sim-bleu)); border-radius: var(--sim-r-lg); box-shadow: none;
	font-family: Arimo, Arial, sans-serif; font-weight: 700; font-size: 16px; line-height: 1.2; letter-spacing: .01em; text-transform: none;
	cursor: pointer; transition: background-color .15s, color .15s;
}
.rdp-sim button.rdp-sim__bouton:hover,
.rdp-sim button.rdp-sim__bouton:focus-visible {
	background: #fff; color: var(--sim-bleu); border-color: var(--port, var(--sim-bleu));
}
.rdp-sim button.rdp-sim__bouton:active { background: var(--port, var(--sim-bleu)); color: var(--port-ink, #fff); }

.rdp-sim__mention { margin: 0; font-size: 14px; line-height: 1.4; text-align: center; color: var(--sim-texte); }

/* Focus clavier visible (RGAA) */
.rdp-sim :focus-visible { outline: 3px solid var(--sim-bleu); outline-offset: 2px; }
.rdp-sim__input input:focus-visible { outline: none; }

/* Texte réservé aux lecteurs d'écran */
.rdp-sim__sr {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 400px) {
	.rdp-sim { padding: 20px 16px; }
	.rdp-sim__dims { gap: 12px; }
}
