/**
 * Infinity Combat – Cours d'Essai — design d'origine (indigo / dégradés).
 */

.ict-wrap {
	--ict-primary: #4f46e5;
	--ict-primary-dark: #4338ca;
	--ict-primary-light: #eef2ff;
	--ict-success: #16a34a;
	--ict-success-dark: #15803d;
	--ict-danger: #dc2626;
	--ict-gray-50: #f9fafb;
	--ict-gray-100: #f3f4f6;
	--ict-gray-200: #e5e7eb;
	--ict-gray-300: #d1d5db;
	--ict-gray-400: #9ca3af;
	--ict-gray-500: #6b7280;
	--ict-gray-600: #4b5563;
	--ict-gray-700: #374151;
	--ict-gray-900: #111827;
	position: relative;
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 16px;
	color: var(--ict-gray-900);
	font-family: inherit;
}

/* L'attribut [hidden] priment TOUJOURS sur les display CSS (fix modal visible au chargement). */
.ict-wrap [hidden] { display: none !important; }

/* ============================ HEADER ============================ */
.ict-header { text-align: center; margin-bottom: 32px; }
.ict-header__title { font-size: 30px; font-weight: 700; margin: 0 0 8px; }
.ict-header__subtitle { color: var(--ict-gray-600); font-size: 16px; margin: 0; }

/* ============================ PROGRESS ============================ */
.ict-progress { display: flex; align-items: flex-start; margin-bottom: 16px; }
.ict-progress__item { display: flex; align-items: flex-start; flex: 1 1 0; min-width: 0; }
.ict-progress__item:last-child { flex: 0 0 auto; }
.ict-progress__stepwrap {
	display: flex; flex-direction: column; align-items: center; gap: 6px;
	width: 96px; flex: 0 0 auto;
}
.ict-progress__circle {
	width: 40px; height: 40px; flex: 0 0 40px; border-radius: 9999px;
	border: 2px solid var(--ict-gray-300);
	background: #fff; color: var(--ict-gray-400);
	display: flex; align-items: center; justify-content: center;
	font-weight: 600; font-size: 14px; transition: all .25s ease;
}
.ict-progress__circle.is-active { border-color: var(--ict-primary); background: var(--ict-primary); color: #fff; }
.ict-progress__circle.is-done { border-color: var(--ict-success); background: var(--ict-success); color: #fff; }
.ict-progress__label {
	font-size: 11px; color: var(--ict-gray-500); text-align: center;
	line-height: 1.25; max-width: 96px;
}
.ict-progress__label.is-active { color: var(--ict-primary); font-weight: 600; }
/* Ligne : centrée sur l'axe du cercle (40px / 2 = 20px, -1px pour la hauteur de ligne) */
.ict-progress__line {
	flex: 1 1 auto; height: 2px; min-width: 16px;
	margin: 19px 8px 0; background: var(--ict-gray-300);
	transition: background .25s ease;
}
.ict-progress__line.is-done { background: var(--ict-success); }
@media (max-width: 768px) {
	.ict-progress__label { display: none; }
	.ict-progress__stepwrap { width: auto; }
	.ict-progress__line { margin: 19px 4px 0; }
}
.ict-progress__hint { text-align: center; margin-bottom: 20px; }
.ict-progress__title { font-size: 20px; font-weight: 600; margin: 0 0 4px; }
.ict-progress__desc { color: var(--ict-gray-600); font-size: 14px; margin: 0; }

/* ============================ CARD ============================ */
.ict-card {
	background: #fff; border: 1px solid var(--ict-gray-200);
	border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.05);
	padding: 24px; margin-bottom: 24px;
}

/* ============================ FORM ============================ */
.ict-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .ict-grid { grid-template-columns: 1fr; } }
.ict-field { margin-bottom: 16px; }
.ict-label { display: block; font-size: 14px; font-weight: 500; color: var(--ict-gray-700); margin-bottom: 8px; }
.ict-input {
	width: 100%; padding: 8px 12px; font-size: 15px;
	border: 1px solid var(--ict-gray-300); border-radius: 6px;
	background: #fff; color: var(--ict-gray-900); box-sizing: border-box;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.ict-input:focus { outline: none; border-color: var(--ict-primary); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.ict-error { color: var(--ict-danger); font-size: 12px; margin: 4px 0 0; min-height: 0; }
.ict-error:not(:empty) { margin-top: 6px; }

/* ============================ DISCIPLINES ============================ */
.ict-discipline {
	border: 2px solid var(--ict-gray-200); border-radius: 8px;
	padding: 16px; cursor: pointer; transition: all .2s ease; background: #fff;
}
.ict-discipline:hover { border-color: var(--ict-gray-300); }
.ict-discipline.is-selected { border-color: var(--ict-primary); background: var(--ict-primary-light); }
.ict-discipline__name { font-size: 18px; font-weight: 600; margin: 0 0 8px; }
.ict-discipline__desc { color: var(--ict-gray-600); font-size: 14px; margin: 0 0 12px; min-height: 40px; }
.ict-discipline__meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ict-gray-500); }
.ict-discipline__price { color: #16a34a; font-weight: 600; }

/* ============================ OVERLAY CHARGEMENT ============================ */
.ict-wrap { position: relative; }
.ict-loading {
	position: absolute; inset: 0; z-index: 50;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 18px; background: rgba(255, 255, 255, .88);
	border-radius: 14px; backdrop-filter: blur(2px);
}
.ict-loading__spinner {
	width: 52px; height: 52px; border-radius: 50%;
	border: 5px solid var(--ict-primary-light);
	border-top-color: var(--ict-primary);
	animation: ict-spin .8s linear infinite;
}
@keyframes ict-spin { to { transform: rotate(360deg); } }
.ict-loading__text { font-size: 15px; font-weight: 600; color: var(--ict-primary-dark); text-align: center; padding: 0 20px; }

/* ============================ CALENDRIER ============================ */

/* Navigation horizontale entre les semaines */
.ict-weeknav {
	display: flex; align-items: center; justify-content: center;
	gap: 20px; margin: 4px 0 10px;
}
.ict-weeknav__btn {
	width: 42px; height: 42px; border-radius: 50%;
	border: 1.5px solid var(--ict-primary); background: #fff;
	color: var(--ict-primary); font-size: 22px; line-height: 1;
	cursor: pointer; transition: all .2s ease; display: flex;
	align-items: center; justify-content: center; font-family: inherit;
}
.ict-weeknav__btn:hover:not(:disabled) { background: var(--ict-primary); color: #fff; }
.ict-weeknav__btn:disabled { opacity: .3; cursor: not-allowed; border-color: var(--ict-gray-300); color: var(--ict-gray-400); }
.ict-weeknav__label {
	font-size: 15px; font-weight: 700; text-align: center;
	background: var(--ict-primary-light); border-left: 4px solid var(--ict-primary);
	border-radius: 6px; color: var(--ict-primary-dark); padding: 10px 18px;
}
.ict-weeknav__dots {
	display: flex; justify-content: center; gap: 6px; margin-bottom: 14px;
}
.ict-weeknav__dot {
	width: 8px; height: 8px; border-radius: 50%;
	background: var(--ict-gray-300); transition: background .2s ease;
}
.ict-weeknav__dot.is-active { background: var(--ict-primary); transform: scale(1.25); }

.ict-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
@media (max-width: 1024px) { .ict-days { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) {
	.ict-days { grid-template-columns: repeat(2, 1fr); }
	/* Mobile : on masque les jours sans cours pour un planning plus lisible */
	.ict-day--empty { display: none; }
	.ict-day { padding: 8px; min-height: 0; }
	.ict-slot { font-size: 12.5px; padding: 9px; }
	.ict-slot__time { font-size: 12.5px; }
	.ict-weeknav { gap: 10px; }
	.ict-weeknav__btn { width: 36px; height: 36px; font-size: 19px; }
	.ict-weeknav__label { font-size: 12.5px; padding: 8px 10px; }
	.ict-weeknav__dots { margin-bottom: 10px; }
	.ict-legend { flex-wrap: wrap; gap: 10px; font-size: 11px; }
}
.ict-day { background: var(--ict-gray-50); border: 1px solid var(--ict-gray-200); border-radius: 8px; padding: 10px; min-height: 90px; }
.ict-day__name { font-size: 11px; font-weight: 600; text-transform: capitalize; color: var(--ict-gray-500); }
.ict-day__date { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.ict-day--empty { opacity: .45; }
.ict-day--today .ict-day__date { color: var(--ict-primary); }

.ict-slot {
	display: block; width: 100%; text-align: left;
	background: #fff; border: 1.5px solid var(--ict-gray-200); border-radius: 6px;
	padding: 8px; margin-bottom: 6px; cursor: pointer; transition: all .15s ease;
	font-family: inherit; font-size: 12px; color: var(--ict-gray-900); box-sizing: border-box;
}
.ict-slot:hover:not(:disabled) { border-color: var(--ict-primary); box-shadow: 0 1px 4px rgba(79,70,229,.15); }
.ict-slot.is-selected { border-color: var(--ict-primary); background: var(--ict-primary-light); box-shadow: 0 0 0 1px var(--ict-primary); }
.ict-slot__time { font-weight: 700; font-size: 13px; }
.ict-slot__coach { color: var(--ict-gray-500); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ict-slot__place {
	display: inline-block; margin-top: 4px; padding: 1px 7px;
	font-size: 10px; font-weight: 600; letter-spacing: .3px;
	color: var(--ict-primary-dark); background: var(--ict-primary-light);
	border-radius: 999px;
}
.ict-slot__name { color: var(--ict-gray-500); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Séance hors quota → grisée (non cliquable) */
.ict-slot.is-full,
.ict-slot:disabled {
	background: var(--ict-gray-100) !important;
	border-color: var(--ict-gray-200) !important;
	color: var(--ict-gray-400) !important;
	cursor: not-allowed !important;
	opacity: .55;
	box-shadow: none !important;
}
.ict-slot__badge {
	display: inline-block; font-size: 10px; font-weight: 700; border-radius: 9999px;
	padding: 2px 8px; margin-top: 4px;
}
.ict-slot__badge--ok { background: #dcfce7; color: #15803d; }
.ict-slot__badge--warn { background: #fef3c7; color: #b45309; }
.ict-slot__badge--full { background: var(--ict-gray-200); color: var(--ict-gray-500); }
.ict-slot.is-selected .ict-slot__badge--ok { background: var(--ict-primary); color: #fff; }

/* Légende */
.ict-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 4px 0 16px; font-size: 12px; color: var(--ict-gray-600); }
.ict-legend__item { display: flex; align-items: center; gap: 6px; }
.ict-legend__dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.ict-legend__dot--open { background: #fff; border: 1.5px solid var(--ict-gray-300); }
.ict-legend__dot--full { background: var(--ict-gray-200); }
.ict-legend__dot--sel { background: var(--ict-primary-light); border: 1.5px solid var(--ict-primary); }

/* ============================ RECAP ============================ */
.ict-recap { background: var(--ict-gray-50); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.ict-recap__title { font-size: 16px; font-weight: 600; margin: 0 0 16px; }
.ict-recap__row { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--ict-gray-200); }
.ict-recap__row:last-child { border-bottom: none; }
.ict-recap__row--total { font-size: 18px; font-weight: 600; border-top: 2px solid var(--ict-gray-300); margin-top: 8px; padding-top: 12px; }
.ict-recap__key { color: var(--ict-gray-600); }
.ict-recap__val { font-weight: 500; text-align: right; }
.ict-recap__val--free { color: #16a34a; font-weight: 700; }

/* ============================ INFOBOX ============================ */
.ict-infobox { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 16px; }
.ict-infobox__title { font-weight: 600; color: #1e40af; margin: 0 0 8px; font-size: 14px; }
.ict-infobox__list { margin: 0; padding-left: 18px; color: #1e3a8a; font-size: 13px; }
.ict-infobox__list li { margin-bottom: 4px; }

/* ============================ NAV / BUTTONS ============================ */
.ict-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ict-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 10px 24px; border-radius: 6px; border: 1px solid transparent;
	font-size: 15px; font-weight: 500; cursor: pointer; transition: all .2s ease;
	text-decoration: none; line-height: 1.4; font-family: inherit;
}
.ict-btn--primary { background: var(--ict-primary); color: #fff; }
.ict-btn--primary:hover { background: var(--ict-primary-dark); }
.ict-btn--success { background: var(--ict-success); color: #fff; }
.ict-btn--success:hover { background: var(--ict-success-dark); }
.ict-btn--ghost { background: #fff; color: var(--ict-gray-700); border-color: var(--ict-gray-300); }
.ict-btn--ghost:hover { background: var(--ict-gray-50); }
.ict-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ============================ LOADER ============================ */
.ict-loading { text-align: center; padding: 40px 0; color: var(--ict-gray-500); }
.ict-spinner {
	width: 36px; height: 36px; margin: 0 auto 12px;
	border: 3px solid var(--ict-gray-200); border-top-color: var(--ict-primary);
	border-radius: 50%; animation: ict-spin .8s linear infinite;
}
@keyframes ict-spin { to { transform: rotate(360deg); } }

/* ============================ MODAL ============================ */
.ict-modal {
	position: fixed; inset: 0; z-index: 99999;
	background: rgba(17,24,39,.5);
	display: flex; align-items: center; justify-content: center; padding: 16px;
}
.ict-modal__box { background: #fff; border-radius: 8px; max-width: 448px; width: 100%; padding: 24px; box-shadow: 0 20px 25px rgba(0,0,0,.15); }
.ict-modal__header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.ict-modal__icon { font-size: 22px; }
.ict-modal__title { font-size: 18px; font-weight: 600; margin: 0; }
.ict-modal__text { color: var(--ict-gray-500); font-size: 14px; margin: 0 0 20px; }
.ict-modal__actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ============================ SUCCESS ============================ */
.ict-success__box {
	background: #fff; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,.07);
	padding: 32px; max-width: 672px; margin: 0 auto; text-align: center;
}
.ict-success__icon {
	width: 64px; height: 64px; border-radius: 9999px; background: #dcfce7;
	color: #16a34a; font-size: 32px; font-weight: 700;
	display: flex; align-items: center; justify-content: center; margin: 0 auto 24px;
}
.ict-success__title { font-size: 24px; font-weight: 700; margin: 0 0 16px; }
.ict-success__badge { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; border-radius: 8px; padding: 12px; margin-bottom: 24px; font-size: 14px; }
.ict-success__steps { background: var(--ict-gray-50); border-radius: 8px; padding: 16px; text-align: left; margin-bottom: 16px; }
.ict-success__steps h3 { font-size: 15px; font-weight: 600; margin: 0 0 12px; }
.ict-success__steps ul { list-style: none; margin: 0; padding: 0; }
.ict-success__steps li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--ict-gray-600); margin-bottom: 8px; }
.ict-success__num {
	flex: 0 0 24px; width: 24px; height: 24px; border-radius: 9999px;
	background: var(--ict-primary-light); color: var(--ict-primary);
	font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* ============================ EMPTY ============================ */
.ict-empty {
	text-align: center; padding: 40px 16px; color: var(--ict-gray-500);
	background: var(--ict-gray-50); border: 1px dashed var(--ict-gray-300); border-radius: 8px;
}
