@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=DM+Serif+Display&display=swap');

:root {
  --primary: #2563EB;
  --primary-light: #EFF6FF;
  --primary-dark: #1D4ED8;
  --accent: #06B6D4;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;

  --bg: #F0F4FF;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --text: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
  --shadow-md: 0 4px 16px rgba(37, 99, 235, .10);
  --shadow-lg: 0 12px 40px rgba(37, 99, 235, .14);

  --font: 'DM Sans', 'Helvetica Neue', sans-serif;
  --font-display: 'DM Serif Display', Georgia, serif;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-weight: 400;
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.3;
}

button {
  cursor: pointer;
  font-family: var(--font);
  outline: none;
}

input,
select,
textarea {
  font-family: var(--font);
}

/* ---- Page wrapper ---- */
.page-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #1E3A8A 0%, #0EA5E9 60%, #06B6D4 100%);
  padding: 32px 12px 60px;
  position: relative;
  overflow: hidden;
}

.page-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(255, 255, 255, .06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(6, 182, 212, .15) 0%, transparent 70%);
  pointer-events: none;
}

/* ---- Wrapper ---- */
.wrapper {
  margin: 0 auto;
}

.wrapper--w790 {
  max-width: 720px;
  width: 100%;
}

/* ---- Card ---- */
.card-5 {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

/* ---- Card heading ---- */
.card-5 .card-heading {
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%);
  padding: 28px 24px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.card-5 .card-heading::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 20px;
  background: var(--surface);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.card-heading .school-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, .9);
  letter-spacing: .04em;
  margin-bottom: 14px;
}

.title-main {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: .01em;
}

.title-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, .7);
  font-weight: 400;
  margin-bottom: 18px;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, .25);
  color: #fff;
}

.btn-logout svg {
  width: 15px;
  height: 15px;
}

/* ---- Card body ---- */
.card-5 .card-body {
  padding: 32px 32px 40px;
}

@media (max-width: 600px) {
  .card-5 .card-body {
    padding: 24px 16px 32px;
  }
}

/* ---- Intro banner ---- */
.intro-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--primary-light);
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 24px;
  font-size: 13.5px;
  color: #1E40AF;
  line-height: 1.55;
}

.intro-banner svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---- Error block ---- */
.error-block {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-md);
  padding: 7px 8px;
  margin-bottom: 5px;
  color: var(--danger);
  font-size: 17px;
}

.error-block strong {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.error-block ul {
  margin-left: 18px;
}

/* ---- Accordion ---- */
.accordion-item {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--surface) !important;
  transition: box-shadow .2s;
}

.accordion-item:hover {
  box-shadow: var(--shadow-md);
}

.accordion-item+.accordion-item {
  margin-top: 0;
}

/* Override inline background-color on accordion items */
.accordion-item[style] {
  background-color: transparent !important;
}

.accordion-header {
  margin: 0;
}

.accordion-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface) !important;
  border: none;
  text-align: left;
  position: relative;
  transition: background .15s;
}

/* Kill inline background on buttons */
.accordion-button[style] {
  background-color: var(--surface) !important;
}

.accordion-button::after {
  content: '';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-light);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563EB' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: center;
  margin-left: auto;
  flex-shrink: 0;
  transition: transform .25s ease;
}

.accordion-button:not(.collapsed)::after {
  transform: rotate(180deg);
}

.accordion-button:not(.collapsed) {
  color: var(--primary);
  background: var(--primary-light) !important;
}

/* Section icon dot */
.accordion-button .section-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.accordion-body {
  padding: 20px 18px 24px;
  border-top: 1px solid var(--border);
  background: #FAFBFF;
}

/* Section color tokens */
.acc-student .section-icon {
  background: #DBEAFE;
}

.acc-legal1 .section-icon {
  background: #FCE7F3;
}

.acc-legal2 .section-icon {
  background: #D1FAE5;
}

.acc-emergency .section-icon {
  background: #FEF3C7;
}

.acc-rgpd .section-icon {
  background: #EDE9FE;
}

.acc-student .accordion-button:not(.collapsed) {
  background: #EFF6FF !important;
}

.acc-legal1 .accordion-button:not(.collapsed) {
  background: #FDF2F8 !important;
}

.acc-legal2 .accordion-button:not(.collapsed) {
  background: #ECFDF5 !important;
}

.acc-emergency .accordion-button:not(.collapsed) {
  background: #FFFBEB !important;
}

.acc-rgpd .accordion-button:not(.collapsed) {
  background: #F5F3FF !important;
}

/* ---- Forms (Symfony rendered) ---- */
.form-group {
  margin: 0;
}

/* Labels */
label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: #F8FAFC;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  line-height: 1.5;
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* Symfony form rows */
.mb-3,
.mb-4 {
  margin-bottom: 16px !important;
}

/* Checkbox / radio */
input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  display: inline-block;
  vertical-align: middle;
  margin: 0;
  padding: 0;
}

/* Symfony checkbox row : aligne label + case */
.form-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background: var(--primary-light);
  border: 1.5px solid #BFDBFE;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
}

.form-check .form-check-input {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  flex-shrink: 0;
  flex-grow: 0;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  float: none !important;
  display: inline-block !important;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-check .form-check-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: pointer;
  margin: 0;
}

/* Cas où Symfony rend un div.mb-3 contenant un .form-check */
.accordion-body .mb-3:has(.form-check),
.accordion-body .mb-4:has(.form-check) {
  margin-bottom: 0 !important;
}

/* Invalid state */
.is-invalid,
input.error,
select.error {
  border-color: var(--danger) !important;
}

.invalid-feedback,
.form-error-message {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  display: block;
}

/* ---- Copy button ---- */
.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--primary-light);
  border: 1px solid #BFDBFE;
  color: var(--primary);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 16px;
  transition: background .2s, transform .15s;
  cursor: pointer;
}

.btn-copy:hover {
  background: #DBEAFE;
  transform: translateY(-1px);
  color: var(--primary-dark);
}

.btn-copy img {
  height: 16px;
  width: 16px;
  opacity: .75;
}

/* Bootstrap btn-primary override */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  color: #ffffff !important;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
  cursor: pointer;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1E40AF 100%);
  color: #ffffff !important;
}

/* ---- Submit button généré par form_end() : masqué, on utilise .btn-submit ---- */
input[type="submit"] {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  position: absolute !important;
  pointer-events: none !important;
}

/* Le vrai bouton de soumission est button.btn-submit dans .step-nav */
button[type="submit"].btn-submit {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  color: #ffffff !important;
  border: none !important;
}

button[type="submit"].btn-submit:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%) !important;
  color: #ffffff !important;
}

/* ---- RGPD text ---- */
.rgpd-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  background: #F8FAFC;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
  border-left: 3px solid #A5B4FC;
}

.rgpd-text ul {
  margin: 8px 0 8px 18px;
}

.rgpd-text li {
  margin-bottom: 3px;
}

/* ---- Footer note ---- */
.form-footer-note {
  font-size: 12.5px;
  color: var(--text-muted);
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 20px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* ---- Scrollbar ---- */
div {
  scroll-behavior: smooth;
}

div::-webkit-scrollbar {
  width: 5px;
  background: transparent;
}

div::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 99px;
}

div {
  scrollbar-color: #CBD5E1 transparent;
  scrollbar-width: thin;
}

/* ---- Spacing utilities ---- */
.p-t-45 {
  padding-top: 32px;
}

.p-b-50 {
  padding-bottom: 48px;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .page-wrapper {
    padding: 16px 8px 40px;
  }

  .title-main {
    font-size: 18px;
  }

  .accordion-button {
    font-size: 13px;
  }
}

/* ==========================================================================
   #MULTI-STEP FORM
   ========================================================================== */

/* ── Stepper ── */
.stepper {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  padding: 0 8px;
}

.stepper-track {
  position: absolute;
  top: 20px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  z-index: 0;
}

.stepper .step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  cursor: default;
}

.step-dot {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #F8FAFC;
  border: 2.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: border-color .3s, background .3s, box-shadow .3s;
  position: relative;
}

/* Show emoji by default, hide number */
.step-dot .step-num {
  display: none;
}

.step-dot .step-emoji {
  display: block;
}

.step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  text-align: center;
  letter-spacing: .03em;
  text-transform: uppercase;
  transition: color .3s;
  white-space: nowrap;
}

/* Active step */
.step.active .step-dot {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.step.active .step-label {
  color: var(--primary);
}

/* Done step */
.step.done .step-dot {
  border-color: var(--success);
  background: var(--success);
}

.step.done .step-dot .step-emoji {
  display: none;
}

.step.done .step-dot .step-num {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  content: '✓';
}

/* Show checkmark for done steps */
.step.done .step-dot::after {
  content: '✓';
  position: absolute;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.step.done .step-dot .step-emoji {
  visibility: hidden;
}

.step.done .step-label {
  color: var(--success);
}

/* ── Form steps (show/hide) ── */
.form-step {
  display: none;
  animation: fadeSlideIn .3s ease;
}

.form-step.active {
  display: block;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Step header ── */
.step-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
}

.step-header.acc-student {
  background: #EFF6FF;
  border-color: #3B82F6;
}

.step-header.acc-legal1 {
  background: #FDF2F8;
  border-color: #EC4899;
}

.step-header.acc-legal2 {
  background: #ECFDF5;
  border-color: #10B981;
}

.step-header.acc-emergency {
  background: #FFFBEB;
  border-color: #F59E0B;
}

.step-header-icon {
  font-size: 26px;
  line-height: 1;
}

.step-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
}

.step-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
}

/* ── Navigation buttons ── */
.step-nav {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.step-nav--right {
  justify-content: flex-end;
}

.step-nav--both {
  justify-content: space-between;
}

.btn-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s;
}

.btn-next {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .28);
}

.btn-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, .36);
}

.btn-prev {
  background: #F1F5F9;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}

.btn-prev:hover {
  background: #E2E8F0;
  color: var(--text);
}

.btn-submit {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, .35);
  padding: 12px 28px;
  font-size: 15px;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, .45);
  color: #ffffff !important;
}

/* ── RGPD block ── */
.rgpd-block {
  background: #F5F3FF;
  border: 1px solid #DDD6FE;
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 24px;
  margin-bottom: 4px;
}

.rgpd-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #5B21B6;
  margin-bottom: 12px;
}

.rgpd-header span {
  font-size: 18px;
}

/* Mobile */
@media (max-width: 480px) {
  .step-label {
    display: none;
  }

  .stepper-track {
    top: 20px;
  }

  .btn-step {
    padding: 10px 14px;
    font-size: 13px;
  }

  .btn-next,
  .btn-submit {
    flex: 1;
    justify-content: center;
  }
}

/* ── Champs : fond légèrement grisé pour les distinguer du fond blanc ── */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
  background: #F1F5F9 !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  background: #ffffff !important;
}

/* ── Stepper cliquable ── */
.stepper .step {
  cursor: pointer;
}

.stepper .step:hover .step-dot {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: scale(1.08);
  transition: transform .2s, border-color .2s, background .2s;
}

.stepper .step:hover .step-label {
  color: var(--primary);
}

/* ── Centrage strict de la checkbox RGPD ── */
.rgpd-block .form-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px;
}

.rgpd-block .form-check .form-check-input {
  position: static !important;
  float: none !important;
  transform: none !important;
  margin: 0 !important;
  flex-shrink: 0;
}

.rgpd-block .form-check .form-check-label {
  margin: 0 !important;
  padding: 0 !important;
}

/* ==========================================================================
   #CHAMPS OBLIGATOIRES — étoile rouge sur les étapes 1, 2, 4
   ========================================================================== */
label.required::after {
  content: ' *';
  color: var(--danger);
  font-weight: 700;
  font-size: 12px;
}

/* Pas d'étoile sur les labels checkbox/RGPD ni sur les labels de groupe */
#step-1 .form-check label::after,
#step-2 .form-check label::after,
#step-4 .form-check label::after,
#step-4 .rgpd-block label::after {
  content: '' !important;
}

/* Légende obligatoire sous le stepper */
.required-note {
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
  margin-top: -8px;
}

.required-note span {
  color: var(--danger);
  font-weight: 700;
}

/* ==========================================================================
   #PAGE ÉDITION
   ========================================================================== */

/* Barre de sauvegarde collante en bas */
.edit-save-bar {
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, #fff 80%, transparent);
  padding: 20px 0 8px;
  margin-top: 28px;
  z-index: 10;
}

.btn-save {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff !important;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(5, 150, 105, .35);
  transition: transform .15s, box-shadow .2s, opacity .2s;
}

.btn-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, .45);
  opacity: .95;
  color: #ffffff !important;
}

/* Étoile obligatoire sur l'édition (toutes sections sauf légal2 et RGPD) */
.acc-student .accordion-body label::after,
.acc-legal1 .accordion-body label::after,
.acc-emergency .accordion-body label::after {
  content: ' *';
  color: var(--danger);
  font-weight: 700;
  font-size: 12px;
}

.acc-rgpd .accordion-body label::after,
.acc-legal2 .accordion-body label::after {
  content: '' !important;
}

/* ==========================================================================
   #PAGE CONFIRMATION
   ========================================================================== */

/* Coche de succès dans le header */
.confirm-check {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, .15);
  border: 2px solid rgba(255, 255, 255, .4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  margin: 0 auto 14px;
}

/* Boutons d'action dans le header */
.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.confirm-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s, opacity .2s;
  white-space: nowrap;
}

.confirm-btn:hover {
  transform: translateY(-1px);
  opacity: .9;
}

.confirm-btn--blue {
  background: #3B82F6;
  color: #fff;
}

.confirm-btn--green {
  background: #10B981;
  color: #fff;
}

.confirm-btn--red {
  background: #EF4444;
  color: #fff;
}

.confirm-btn--outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}

.confirm-btn--outline:hover {
  background: var(--primary-light);
}

/* Flash mail */
.conf-flash {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13.5px;
  color: #065F46;
  margin-bottom: 16px;
}

/* Alerte documents */
.conf-alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 24px;
  font-size: 13.5px;
  color: #92400E;
  line-height: 1.55;
}

.conf-alert svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #D97706;
}

.conf-alert strong {
  display: block;
  margin-bottom: 2px;
}

.conf-alert span {
  opacity: .85;
}

/* Sections récap */
.conf-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}

.conf-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--border);
}

.conf-section-title h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
}

.conf-section-title p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.conf-section-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* Grille d'infos */
.info-grid {
  padding: 4px 0;
}

.info-row {
  display: flex;
  align-items: baseline;
  padding: 9px 18px;
  border-bottom: 1px solid #F1F5F9;
  gap: 12px;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  min-width: 180px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.info-value {
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
}

/* Liste documents */
.doc-list {
  padding: 8px 0;
}

.doc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid #F1F5F9;
}

.doc-row:last-child {
  border-bottom: none;
}

.doc-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.doc-thumb {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.doc-name {
  font-size: 13.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-name a {
  color: var(--primary);
}

.doc-status {
  flex-shrink: 0;
}

.doc-file {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}

.doc-file:hover {
  background: #D1FAE5;
}

.doc-missing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
}

.doc-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  background: var(--primary-light);
  border: 1px solid #BFDBFE;
  color: var(--primary);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}

.doc-btn:hover {
  background: #DBEAFE;
  color: var(--primary-dark);
}

/* Barre modifier dossier */
.conf-edit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary-light);
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--primary-dark);
  font-weight: 500;
  flex-wrap: wrap;
  gap: 10px;
}

/* Responsive */
@media (max-width: 580px) {
  .info-label {
    min-width: 120px;
  }

  .doc-name {
    font-size: 12px;
  }

  .doc-row {
    flex-wrap: wrap;
  }

  .confirm-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .confirm-btn {
    justify-content: center;
  }
}

/* ── Zoom sur les miniatures de documents ── */
.doc-thumb.doc-zoom {
  transition: transform 0.3s ease;
  transform-origin: left center;
  position: relative;
  z-index: 10;
  cursor: zoom-in;
}

/* Empêcher le clip du zoom dans la liste */
.doc-list,
.doc-row,
.doc-info {
  overflow: visible;
}

.conf-section {
  overflow: visible;
}

/* ── Miniatures documents ── */
.doc-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  cursor: zoom-in;
  display: block;
  transition: opacity .15s;
}

.doc-thumb:hover {
  opacity: .8;
}

/* ── Zoom overlay sur les miniatures de documents ── */
.doc-zoom-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

/* ==========================================================================
   #UPLOAD DE FICHIER
   ========================================================================== */

.upload-zone {
  border: 2.5px dashed #BFDBFE;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
  margin-bottom: 24px;
}

.upload-zone:hover,
.upload-zone--drag {
  border-color: var(--primary);
  background: #DBEAFE;
  transform: translateY(-2px);
}

.upload-zone--filled {
  border-color: #6EE7B7;
  background: #ECFDF5;
}

.upload-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.upload-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.upload-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.upload-format {
  display: inline-block;
  background: #BFDBFE;
  color: #1E40AF;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}

.upload-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: #059669;
}

.upload-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

.upload-actions .btn-submit {
  min-width: 220px;
}

button[type="submit"].btn-submit:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Exemple de format photo ── */
.photo-example {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.photo-example img {
  height: 90px;
  width: auto;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.photo-example-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  color: var(--text-muted);
}

.photo-example-text strong {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}

/* ==========================================================================
   #PAGE CONNEXION
   ========================================================================== */

/* Avatar dans le header */
.login-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  border: 3px solid rgba(255, 255, 255, .35);
  overflow: hidden;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Formulaire de connexion */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
}

/* Pas d'étoile sur la page de connexion */
.login-field label::after {
  content: '' !important;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-wrap svg {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
}

.login-input-wrap input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: #F1F5F9;
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
}

.login-input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
  background: #fff;
}

/* reCAPTCHA centré */
.login-captcha {
  display: flex;
  justify-content: center;
  margin: 4px 0;
}

/* Bouton connexion */
.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff !important;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .35);
  transition: transform .15s, box-shadow .2s, opacity .2s;
}

.login-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, .4);
}

.login-submit:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
}

/* Bloc déjà connecté */
.login-connected {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  text-align: center;
}

.login-connected-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
}

.login-connected-ine {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.login-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .2s, transform .15s;
}

.login-action-btn:hover {
  opacity: .9;
  transform: translateY(-1px);
}

.login-action-btn--green {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #fff !important;
}

.login-action-btn--red {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: #fff !important;
}

/* ── Bouton oeil mot de passe ── */
.login-input-wrap {
  position: relative;
}

.login-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  line-height: 1;
  z-index: 2;
  transition: color .2s;
}

.login-eye:hover {
  color: var(--primary);
}

.login-eye svg {
  display: block;
  pointer-events: none;
}

.login-input-wrap input[type="password"],
.login-input-wrap input[type="text"] {
  padding-right: 42px !important;
}

.login-forgot {
    text-align: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}

.login-forgot a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.83rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    padding: 7px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #f8fafc;
    transition: all 0.25s ease;
}

.login-forgot a:hover {
    color: #2563eb;
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
}

.login-forgot a svg {
    transition: transform 0.25s ease;
}

.login-forgot a:hover svg {
    transform: rotate(-15deg);
}