  :root {
--primary: #3498db;
    --primary-dark: #2980b9;
    --secondary: #2c3e50;
  }
body.background {
  background: linear-gradient(45deg, #ff9a9e, #fad0c4, #fbc2eb, #a18cd1, #84fab0);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* =====================
   Page PSC (public)
   Styles scoped pour ne rien casser
   ===================== */

.psc-page header {
  padding: 24px 0 8px;
}

.psc-page .form-container {
  max-width: 1100px;
  width: calc(100% - 32px);
  margin: 18px auto 40px;
  padding: 28px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.14);
}

.psc-page h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.2;
}

.psc-hero {
  text-align: center;
  margin-bottom: 18px;
}

.psc-subtitle {
  margin: 0 auto 14px;
  max-width: 820px;
  color: rgba(44, 62, 80, 0.85);
}

.psc-required-note {
  margin: 10px 0 0;
  font-weight: 600;
  color: rgba(44, 62, 80, 0.85);
}

.psc-required {
  color: #e53935;
}

.psc-steps {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 14px 0 0;
}

.psc-step {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(52, 152, 219, 0.10);
  color: #2c3e50;
  font-weight: 700;
}

.psc-step-num {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #3498db;
  color: #fff;
  box-shadow: 0 6px 14px rgba(52, 152, 219, 0.30);
}

.psc-fieldset {
  border: 1px solid rgba(44, 62, 80, 0.12);
  border-radius: 14px;
  padding: 18px 16px 12px;
  margin: 16px 0;
  background: rgba(255, 255, 255, 0.7);
}

.psc-fieldset legend {
  font-weight: 800;
  color: #2c3e50;
  padding: 0 10px;
}

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

.psc-span-2 {
  grid-column: span 2;
}

.psc-field label {
  display: block;
  font-weight: 700;
  margin: 0 0 6px;
  color: rgba(44, 62, 80, 0.95);
}

.psc-hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: rgba(44, 62, 80, 0.75);
}

.psc-alert {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 18px;
}
.psc-alert--error {
  background: #fdecea;
  border: 1px solid #f5c6c2;
  color: #c0392b;
}

.psc-page select,
.psc-page input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(44, 62, 80, 0.18);
  background: rgba(246, 248, 252, 0.92);
  font-size: 16px;
}

.psc-page input:focus,
.psc-page select:focus {
  outline: none;
  border-color: rgba(52, 152, 219, 0.9);
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.18);
}

.psc-page button {
  width: min(320px, 100%);
  border-radius: 14px;
}

/* =====================
   Animations & micro-interactions (client léger)
   - scopé à .psc-page pour ne rien casser ailleurs
   - respecte prefers-reduced-motion
   ===================== */

.psc-page .form-container,
.psc-page .psc-hero,
.psc-page .psc-fieldset,
.psc-page .psc-step,
.psc-page .psc-notice {
  transform: translateZ(0);
}

.psc-step,
.psc-step-num {
  transition: transform 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}

.psc-fieldset {
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.psc-fieldset:focus-within {
  border-color: rgba(52, 152, 219, 0.45);
  box-shadow: 0 14px 34px rgba(44, 62, 80, 0.12);
  transform: translateY(-2px);
}

@media (hover: hover) and (pointer: fine) {
  .psc-step:hover {
    transform: translateY(-1px);
    background: rgba(52, 152, 219, 0.14);
  }

  .psc-step:hover .psc-step-num {
    transform: rotate(-2deg) scale(1.06);
    box-shadow: 0 10px 22px rgba(52, 152, 219, 0.34);
  }

  .psc-fieldset:hover {
    box-shadow: 0 10px 26px rgba(44, 62, 80, 0.10);
    transform: translateY(-1px);
  }
}

.psc-page button {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
}

.psc-page button::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(closest-side at 30% 30%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .psc-page button:hover {
    transform: translateY(-1px) scale(1.02);
  }
  .psc-page button:hover::after {
    opacity: 1;
    transform: scale(1);
  }
}

.psc-page button:active {
  transform: translateY(0) scale(0.99);
}

/* =====================
   Selecteur Particulier / Organisme
   ===================== */
.psc-type-toggle {
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(44, 62, 80, 0.10);
  padding: 28px 24px 24px;
  margin-bottom: 24px;
  text-align: center;
}

.psc-type-question {
  font-size: 17px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 18px;
}

.psc-type-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.psc-type-btn {
  flex: 1;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 16px 18px;
  border-radius: 16px;
  border: 2px solid rgba(44, 62, 80, 0.13);
  background: #fafbfc;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  font-family: inherit;
}

.psc-type-btn:hover {
  border-color: #3498db;
  background: rgba(52, 152, 219, 0.04);
  transform: translateY(-2px);
}

.psc-type-btn.active {
  border-color: #3498db;
  background: rgba(52, 152, 219, 0.08);
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15);
  transform: translateY(-2px);
}

.psc-type-icon {
  font-size: 36px;
  line-height: 1;
}

.psc-type-label {
  font-size: 16px;
  font-weight: 800;
  color: #2c3e50;
}

.psc-type-desc {
  font-size: 12px;
  color: rgba(44, 62, 80, 0.58);
  line-height: 1.35;
}

@media (max-width: 500px) {
  .psc-type-btns {
    flex-direction: column;
    align-items: center;
  }
  .psc-type-btn {
    width: 100%;
    max-width: 100%;
  }
}

/* =====================
   Radio list — Situation et Reglement
   ===================== */
.psc-radio-list {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(44, 62, 80, 0.11);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 8px;
}

.psc-radio-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  cursor: pointer;
  transition: background 140ms;
  border-bottom: 1px solid rgba(44, 62, 80, 0.07);
}

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

.psc-radio-row:hover {
  background: rgba(52, 152, 219, 0.04);
}

.psc-radio-row input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #3498db;
  flex-shrink: 0;
  cursor: pointer;
}

.psc-radio-row-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.psc-radio-row-label {
  font-weight: 600;
  font-size: 14px;
  color: #2c3e50;
}

.psc-radio-row-sub {
  font-size: 12px;
  color: rgba(44, 62, 80, 0.55);
  font-style: italic;
  width: 100%;
}

/* Tarif inline dans les radios */
.tarif-tag {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tarif-tag.tarif-normal {
  background: rgba(39, 174, 96, 0.12);
  color: #1a6b3a;
}

.tarif-tag.tarif-eleve {
  background: rgba(230, 126, 34, 0.12);
  color: #7d4a10;
}

.tarif-tag.tarif-sc {
  background: rgba(52, 152, 219, 0.12);
  color: #1a4a80;
}

/* =====================
   Badge tarif recapitulatif
   ===================== */
.psc-tarif-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  animation: ufo-fade-up 200ms ease both;
}

.psc-tarif-badge.tarif-normal {
  background: rgba(39, 174, 96, 0.10);
  border: 1.5px solid rgba(39, 174, 96, 0.30);
  color: #1a6b3a;
}

.psc-tarif-badge.tarif-eleve {
  background: rgba(230, 126, 34, 0.10);
  border: 1.5px solid rgba(230, 126, 34, 0.30);
  color: #7d4a10;
}

.psc-tarif-badge.tarif-sc {
  background: rgba(52, 152, 219, 0.10);
  border: 1.5px solid rgba(52, 152, 219, 0.30);
  color: #1a4a80;
}
@keyframes ufo-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .psc-page .form-container {
    animation: ufo-fade-up 650ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .psc-page .psc-hero {
    animation: ufo-fade-up 600ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: 60ms;
  }

  .psc-page .psc-step {
    animation: ufo-fade-up 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .psc-page .psc-step:nth-child(1) { animation-delay: 120ms; }
  .psc-page .psc-step:nth-child(2) { animation-delay: 180ms; }
  .psc-page .psc-step:nth-child(3) { animation-delay: 240ms; }
  .psc-page .psc-step:nth-child(4) { animation-delay: 300ms; }

  .psc-page .psc-fieldset {
    animation: ufo-fade-up 560ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .psc-page .psc-fieldset:nth-of-type(1) { animation-delay: 140ms; }
  .psc-page .psc-fieldset:nth-of-type(2) { animation-delay: 200ms; }
  .psc-page .psc-fieldset:nth-of-type(3) { animation-delay: 260ms; }
  .psc-page .psc-fieldset:nth-of-type(4) { animation-delay: 320ms; }
}

@media (prefers-reduced-motion: reduce) {
  body.background {
    animation: none;
    background-position: 50% 50%;
  }
  .psc-page .form-container,
  .psc-page .psc-hero,
  .psc-page .psc-step,
  .psc-page .psc-fieldset {
    animation: none;
  }
  .psc-step,
  .psc-step-num,
  .psc-fieldset,
  .psc-page button,
  .psc-page button::after {
    transition: none;
  }
}

.psc-notices {
  margin: 18px 0 6px;
}

.psc-notice {
  border: 1px solid rgba(52, 152, 219, 0.22);
  background: rgba(52, 152, 219, 0.07);
  border-radius: 14px;
  padding: 14px 16px;
}

.psc-notice h3 {
  margin: 0 0 8px;
}

.psc-notice ul {
  margin: 0;
  padding-left: 18px;
}

.psc-notice li {
  margin: 8px 0;
}

@media (max-width: 860px) {
  .psc-grid {
    grid-template-columns: 1fr;
  }
  .psc-span-2 {
    grid-column: auto;
  }
  .psc-page .form-container {
    padding: 18px;
  }
  .psc-page h1 {
    font-size: 26px;
  }
}

@keyframes gradient {
  0% {background-position: 0% 50%;}
  50% {background-position: 100% 50%;}
  100% {background-position: 0% 50%;}
}

header {
  padding: 20px 0;
  text-align: center;
}

.logo {
  height: 80px;
}

.form-container {
  width: 1250px;
  margin: 30px auto;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.form-container-admin {
  max-width: 2000px;
  margin: 30px auto;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255, 254, 254, 0.199);
}

h1 {
  color: #2c3e50;
  text-align: center;
  margin-bottom: 30px;
}

.form-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

select, input {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  width: 100%;
}
input {
    width: 94%;
}
button {
    padding: 12px 25px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    justify-content: center;
    align-items: center;
      background-color: #3498db;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  display: block;
  margin: 10px auto;
  width: 200px;
  max-height: 100px;
}

button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.5);
}

option.full {
  color: #ff0000;
  font-weight: bold;
}
option.available {
  color: #008000;
}
.finbox {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.warn {
  color: #ff0000;
  font-weight: bold;
  text-align: center;
  margin-top: 20px;
}




/* Responsive Styles for smartphones, tablets ect */
@media (max-width: 1600px) {
  .form-container, .form-container-admin {
    width: 80%;
    padding: 20px;
  }

  .form-group {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  }

  button {
    width: 100%;
  }
}

@media (max-width: 1200px) {
  .form-container, .form-container-admin {
    width: 80%;
    padding: 20px;
  }

  .form-group {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  button {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .form-container, .form-container-admin {
    width: 80%;
    padding: 20px;
  }

  .form-group {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}
@media (max-width: 480px) {
  .form-container, .form-container-admin {
    width: 80%;
    padding: 15px;
  }

  .form-group {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}
@media (max-width: 320px) {
  .form-container, .form-container-admin {
    width: 80%;
    padding: 10px;
  }

  .form-group {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}
@media (max-width: 240px) {
  .form-container, .form-container-admin {
    width: 80%;
    padding: 5px;
  }

  .form-group {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}
@media (max-width: 120px) {
  .form-container, .form-container-admin {
    width: 80%;
    padding: 2px;
  }

  .form-group {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}

/* j'en ai fait beaucoup mais j'te jure ça rend bien */

.success-message {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  margin: 20px 0;
}

.success-message p {
  margin: 15px 0;
  font-size: 18px;
}

.return-link {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #3498db;
  color: white;
  text-decoration: none;
  border-radius: 4px;
}

.return-link:hover {
  background-color: #2980b9;
}

.footer {
  text-align: center;
  padding: 20px;
  background-color: #2c3e50;
  color: white;
  position: relative;
  bottom: 0;
  width: 100%;
}
.footer p {
  margin: 0;
}
.footer a {
  color: #3498db;
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
}
