/**
 * Deekay School — portes ouvertes
 *
 *  1. Le POPUP : un visuel, un titre, un bouton. Rien d'autre.
 *  2. La PAGE FORMULAIRE : hérite de la charte de la page qui l'accueille.
 *
 * La police n'est jamais forcée → cohérence automatique avec le thème.
 */

/* Ne rien devoir au thème : sans box-sizing, un champ en width:100% + padding
   déborde de sa colonne (Prénom/Nom se chevauchent). */
.dks-oh,
.dks-oh *,
.dks-ohf,
.dks-ohf *,
.dks-oh *::before,
.dks-oh *::after { box-sizing: border-box; }

/* =========================================================================
   1. LE POPUP
   ========================================================================= */

.dks-oh {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.dks-oh[hidden] { display: none; }

.dks-oh-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .74);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}

/* Le cadre : format fixe, défini en ligne par le réglage (--dks-oh-ratio). */
.dks-oh-card {
	position: relative;
	width: 100%;
	max-width: 460px;
	aspect-ratio: var(--dks-oh-ratio, 4 / 5);
	max-height: calc(100vh - 40px);
	overflow: hidden;
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
	background: var(--dk-ink, #1C1816);
	color: #F3F4F6;
	display: flex;
	flex-direction: column;
	-webkit-font-smoothing: antialiased;
}

/* La carte reçoit le focus à l'ouverture (pour le clavier et les lecteurs
   d'écran) : sans cette règle, le navigateur dessine un halo bleu tout autour. */
.dks-oh-card:focus,
.dks-oh-card:focus-visible { outline: none; }

/* Zone image : occupe toute la place restante au-dessus du bandeau. */
.dks-oh-media {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
}

/* L'image remplit sa zone : recadrée, jamais déformée. */
.dks-oh-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	margin: 0;
	max-width: none;
	border-radius: 0;
}

/* Simple croix, sans pastille : discrète sur la photo. L'ombre portée la garde
   lisible même sur une image claire. */
.dks-oh-x {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	opacity: .85;
	filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .65));
	transition: opacity .15s ease;
}
.dks-oh-x:hover { opacity: 1; }
.dks-oh-x:focus { outline: none; }
.dks-oh-x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Bandeau plein sous l'image, et non un texte posé dessus : une affiche
   contient souvent déjà du texte, et rien ne resterait lisible.
   Zone blanche et sobre : l'image porte l'image de marque, pas ce bandeau. */
.dks-oh-overlay {
	position: relative;
	z-index: 2;
	flex: none;
	width: 100%;
	padding: 26px 26px 28px;
	text-align: center;
	background: #fff;
	color: var(--dk-ink, #1C1816);
}

.dks-oh-title {
	margin: 0 0 18px;
	font-size: clamp(20px, 4vw, 26px);
	font-weight: 800;
	line-height: 1.12;
	text-transform: uppercase;
	letter-spacing: .01em;
	color: var(--dk-ink, #1C1816);
	text-wrap: balance;
}

.dks-oh-intro {
	margin: -8px 0 18px;
	font-size: 14.5px;
	line-height: 1.45;
	color: #5A534D;
}

/* Bouton noir plein, comme la vitrine de la boutique. */
.dks-oh-cta {
	display: inline-block;
	background: var(--dk-ink, #1C1816);
	color: #fff;
	text-decoration: none;
	font-weight: 800;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: .06em;
	padding: 14px 32px;
	border-radius: 999px;
	transition: background .15s ease, transform .15s ease;
}
.dks-oh-cta:hover,
.dks-oh-cta:focus {
	background: #000;
	color: #fff;
	transform: translateY(-1px);
}

/* Contour de focus discret et maîtrisé — sans lui, le navigateur dessine son
   propre halo bleu, hors charte. */
.dks-oh-cta:focus { outline: none; }
.dks-oh-cta:focus-visible { outline: 2px solid var(--dk-ink, #1C1816); outline-offset: 3px; }

.dks-oh-preview {
	margin: 0 0 14px;
	padding: 7px 11px;
	border-radius: 8px;
	background: #FFF8CC;
	border: 1px solid #E3C64A;
	color: #6B5A00;
	font-size: 12px;
	line-height: 1.4;
}

@media (max-width: 600px) {
	.dks-oh { padding: 14px; }
	.dks-oh-card { max-width: 100%; }
	.dks-oh-overlay { padding: 22px 20px 24px; }
	.dks-oh-cta { width: 100%; padding: 14px 24px; }
}

/* Bouton ajouté automatiquement sur une page : centré, avec de l'air autour,
   pour ne pas se coller au contenu existant. */
.dks-oh-autobtn {
	text-align: center;
	margin: 32px 0;
}

/* =========================================================================
   2. LA PAGE FORMULAIRE
   Volontairement sobre : c'est la page qui donne le fond et la police.
   ========================================================================= */

.dks-ohf {
	max-width: 660px;
	margin: 0 auto;
	color: inherit;
}

/* En-tête du formulaire : titre blanc sur deux lignes, date en beige Deekay. */
.dks-ohf-head {
	text-align: center;
	margin: 0 0 30px;
}

.dks-ohf-title {
	margin: 0;
	font-size: clamp(26px, 5vw, 42px);
	font-weight: 800;
	line-height: 1.04;
	text-transform: uppercase;
	letter-spacing: -.01em;
	color: inherit;
	text-wrap: balance;
}
.dks-ohf-title span { display: block; }

.dks-ohf-sub {
	margin: 12px 0 0;
	font-size: clamp(15px, 2vw, 18px);
	font-weight: 600;
	color: var(--dk-titre, #928885);
}

.dks-ohf-intro {
	margin: 0 0 28px;
	font-size: 15.5px;
	line-height: 1.6;
	opacity: .85;
}
.dks-ohf-intro p { margin: 0 0 12px; }
.dks-ohf-intro p:last-child { margin-bottom: 0; }

.dks-ohf-closed {
	padding: 26px;
	text-align: center;
	border: 1px solid currentColor;
	border-radius: 12px;
	opacity: .7;
}

.dks-ohf-preview {
	margin: 0 0 20px;
	padding: 10px 14px;
	border-radius: 8px;
	background: rgba(255, 230, 43, .14);
	border: 1px solid rgba(255, 230, 43, .5);
	font-size: 13.5px;
}

/* ---- Champs ---- */
.dks-oh-row { display: flex; gap: 14px; flex-wrap: wrap; }
.dks-oh-row > label { flex: 1 1 200px; }

.dks-oh-form label { display: block; margin-bottom: 16px; }
.dks-oh-form label > span {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .06em;
	opacity: .7;
}

.dks-oh-form input[type="text"],
.dks-oh-form input[type="email"],
.dks-oh-form textarea {
	width: 100%;
	background: rgba(127, 127, 127, .09);
	border: 1px solid rgba(127, 127, 127, .38);
	border-radius: 10px;
	color: inherit;
	font: inherit;
	font-size: 15px;
	padding: 12px 14px;
}
.dks-oh-form input:focus,
.dks-oh-form textarea:focus {
	outline: none;
	border-color: #fff;
}

/* ---- Liste des cours ---- */
.dks-oh-courses {
	border: 1px solid rgba(127, 127, 127, .38);
	border-radius: 12px;
	padding: 16px 18px 8px;
	margin: 0 0 18px;
}
.dks-oh-courses legend {
	padding: 0 6px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .06em;
	opacity: .7;
}
.dks-oh-courses legend em { text-transform: none; letter-spacing: 0; }

.dks-oh-day {
	margin: 14px 0 7px;
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: inherit;
}
.dks-oh-day:first-of-type { margin-top: 4px; }

.dks-oh-course {
	display: flex !important;
	align-items: flex-start;
	gap: 11px;
	margin: 0 0 9px !important;
	line-height: 1.35;
	cursor: pointer;
}
.dks-oh-course input { margin-top: 3px; flex: none; }
/*
 * Le cours sur deux lignes : ce qu'on choisit, puis pour qui c'est.
 *
 * L'âge et le niveau tiennent le milieu, en gras et en couleur d'accent : ce
 * sont eux qui disent « ce cours n'est peut-être pas pour toi », et ils se
 * lisaient noyés en fin de ligne parmi le prof et la salle.
 */
.dks-oh-course > span {
	display: flex !important;
	flex-direction: column;
	gap: 1px;
	margin: 0;
	font-size: 14.5px;
	text-transform: none;
	letter-spacing: 0;
	opacity: 1;
}

.dks-oh-course > span strong {
	font-weight: 700;
}

.dks-oh-pour {
	font-size: 13px;
	font-weight: 700;
	color: var(--dk-yellow, #FFE62B);
}

/* Sur fond clair, le jaune ne tient pas : on retombe sur l'encre du texte, et
   c'est la graisse qui porte la distinction. */
.dks-oh-card .dks-oh-pour,
.dks-ohf .dks-oh-pour {
	color: inherit;
	opacity: .85;
}

.dks-oh-course > span em {
	font-style: normal;
	font-size: 12.5px;
	opacity: .62;
}
.dks-oh-course.is-blocked { opacity: .45; cursor: not-allowed; }

/* ---- Consentement, erreurs, envoi ---- */
.dks-oh-consent {
	display: flex !important;
	align-items: flex-start;
	gap: 11px;
	font-size: 13.5px;
	line-height: 1.45;
}
.dks-oh-consent input { margin-top: 3px; flex: none; }
.dks-oh-consent > span {
	display: inline !important;
	margin: 0;
	font-size: 13.5px;
	text-transform: none;
	letter-spacing: 0;
	opacity: .85;
}

/* Piège à robots : invisible pour un humain, présent pour un script. */
.dks-oh-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.dks-oh-error {
	margin: 0 0 14px;
	padding: 11px 14px;
	border-radius: 8px;
	background: rgba(225, 29, 46, .12);
	border: 1px solid rgba(225, 29, 46, .55);
	font-size: 14px;
}

.dks-oh-submit {
	width: 100%;
	border: 0;
	border-radius: 999px;
	background: var(--dk-ink, #1C1816);
	color: var(--dk-white, #FFFFFF);
	font: inherit;
	font-weight: 800;
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: .04em;
	padding: 16px 20px;
	cursor: pointer;
	margin-top: 6px;
}
.dks-oh-submit:hover { background: var(--dk-grey, #6B6560); }
.dks-oh-submit[disabled] { opacity: .55; cursor: default; }

/* ---- Confirmation ---- */
.dks-oh-done { text-align: center; padding: 40px 0; }
.dks-oh-check {
	margin: 0 0 16px;
	font-size: 52px;
	line-height: 1;
	color: inherit;
}
.dks-oh-success { margin: 0; font-size: 17px; line-height: 1.5; }

/* --- Page /portes-ouvertes/ : le bandeau porte déjà le titre ------------ */

/* Le formulaire affiche son propre titre, utile quand il est posé seul sur
   une page nue. Ici le bandeau du haut le dit déjà : le répéter à 30 px
   d'intervalle donnait deux fois la même phrase. */
.page-portes-ouvertes .dks-ohf-head {
	display: none;
}

/*
 * « Inscrire une autre personne », sous la confirmation.
 *
 * Discret à dessein : l'inscription vient d'aboutir, c'est le message de
 * confirmation qui doit se lire en premier. Ce bouton s'adresse au parent qui
 * a un second enfant à inscrire, et qui le cherchera.
 */
.dks-oh-again {
	margin-top: 18px;
	padding: 11px 22px;
	border: 1px solid var(--dk-ink, #1C1816);
	border-radius: 999px;
	background: transparent;
	color: var(--dk-ink, #1C1816);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

.dks-oh-again:hover,
.dks-oh-again:focus-visible {
	background: var(--dk-ink, #1C1816);
	color: var(--dk-white, #FFFFFF);
}

@media (prefers-reduced-motion: reduce) {
	.dks-oh-again { transition: none; }
}
