/* ==============================================
   FORMULAIRE DE COLLABORATION — STYLES
   Compatible WordPress / Elementor
   ============================================== */

.fc-wrapper {
  --fc-bleu:      #1E3A5F;
  --fc-bleu-l:    #2A5298;
  --fc-bleu-vl:   #EBF0FA;
  --fc-or:        #C8860A;
  --fc-or-l:      #F5C842;
  --fc-vert:      #1A6B3C;
  --fc-vert-l:    #2E8B57;
  --fc-sombre:    #111827;
  --fc-texte:     #374151;
  --fc-gris:      #6B7280;
  --fc-gris-c:    #F3F4F6;
  --fc-blanc:     #FFFFFF;
  --fc-bord:      #E5E7EB;
  --fc-rouge:     #DC2626;
  --fc-rayon:     12px;
  --fc-trans:     .22s cubic-bezier(.4,0,.2,1);
  --fc-font-t:    'Playfair Display', Georgia, serif;
  --fc-font-b:    'DM Sans', system-ui, sans-serif;
  font-family: var(--fc-font-b);
  color: var(--fc-texte);
  max-width: 860px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* --- Header --- */
.fc-header {
  background: linear-gradient(135deg, #0f1f3d 0%, #1a2d5a 55%, #1E3A5F 100%);
  border-radius: var(--fc-rayon) var(--fc-rayon) 0 0;
  padding: 2.25rem 2rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.fc-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 30px 30px;
}
.fc-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--fc-or), #f0b429, var(--fc-or));
}
.fc-header-badge {
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.92);
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  padding: .3rem 1rem;
  border-radius: 99px;
  margin-bottom: .9rem;
  position: relative;
}
.fc-titre {
  font-family: var(--fc-font-t);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: #fff;
  margin: 0 0 .5rem;
  position: relative;
}
.fc-sous-titre {
  color: rgba(255,255,255,.6);
  font-size: .88rem;
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

/* --- Progress Bar --- */
.fc-progress-bar {
  display: flex;
  align-items: center;
  background: var(--fc-blanc);
  border: 1px solid var(--fc-bord);
  border-top: none;
  padding: 1.2rem 1.5rem;
  gap: 0;
}
.fc-step { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.fc-step-circle {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid var(--fc-bord);
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 500;
  color: var(--fc-gris);
  background: var(--fc-blanc);
  transition: all var(--fc-trans);
}
.fc-step.active .fc-step-circle { border-color: var(--fc-bleu-l); background: var(--fc-bleu-l); color: #fff; }
.fc-step.done   .fc-step-circle { border-color: var(--fc-bleu-l); background: var(--fc-bleu-l); color: #fff; }
.fc-step.done   .fc-step-circle span { display: none; }
.fc-step.done   .fc-step-circle::after { content: '✓'; font-size: .88rem; color: #fff; }
.fc-step-label { font-size: .68rem; font-weight: 500; color: var(--fc-gris); }
.fc-step.active .fc-step-label { color: var(--fc-bleu-l); font-weight: 600; }
.fc-step.done   .fc-step-label { color: var(--fc-bleu-l); opacity: .7; }
.fc-step-line {
  flex: 1; height: 1.5px; background: var(--fc-bord);
  margin-bottom: 1.2rem; min-width: 20px;
  transition: background var(--fc-trans);
}
.fc-step-line.done { background: var(--fc-bleu-l); }

/* --- Messages --- */
.fc-msg {
  padding: .9rem 1.2rem;
  border-radius: 8px;
  margin: .75rem 0;
  font-size: .9rem;
  font-weight: 500;
}
.fc-msg-success { background: #ECFDF5; color: #065F46; border: 1.5px solid #6EE7B7; }
.fc-msg-error   { background: #FEF2F2; color: #991B1B; border: 1.5px solid #FECACA; }

/* --- Fieldset / Panel --- */
.fc-fieldset {
  background: var(--fc-blanc);
  border: 1px solid var(--fc-bord);
  border-top: none;
  border-radius: 0 0 var(--fc-rayon) var(--fc-rayon);
  padding: 2rem 2rem 1.5rem;
  margin: 0;
}
.fc-panel { display: none; }
.fc-panel.active { display: block; animation: fcFadeIn .25s ease; }
@keyframes fcFadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* --- Legend --- */
.fc-legend {
  display: flex; align-items: center; gap: .7rem;
  font-family: var(--fc-font-t);
  font-size: 1.15rem; font-weight: 600;
  color: var(--fc-sombre);
  margin-bottom: 1.5rem;
  padding-bottom: .9rem;
  border-bottom: 2px solid var(--fc-gris-c);
  width: 100%;
}
.fc-leg-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: var(--fc-bleu-l); color: #fff;
  border-radius: 7px;
  font-family: var(--fc-font-b); font-size: .74rem; font-weight: 700;
  flex-shrink: 0;
}
.fc-leg-num--grey { background: var(--fc-gris); }

.fc-sub-legend {
  display: flex; align-items: center; gap: .6rem;
  font-size: .88rem; font-weight: 600;
  color: var(--fc-bleu);
  margin: 1.25rem 0 .85rem;
  padding-bottom: .6rem;
  border-bottom: 1px dashed var(--fc-bord);
}

/* --- Type Cards --- */
.fc-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: .85rem;
  margin-bottom: 1.5rem;
}
.fc-tcard {
  border: 2px solid var(--fc-bord);
  border-radius: 10px;
  padding: 1.3rem 1rem;
  cursor: pointer; text-align: center;
  background: var(--fc-blanc);
  transition: all var(--fc-trans);
  position: relative;
}
.fc-tcard:hover { border-color: var(--fc-bleu-l); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(30,58,95,.1); }
.fc-tcard.selected { border-color: var(--fc-bleu-l); background: var(--fc-bleu-vl); }
.fc-tcard.selected::after {
  content: '✓'; position: absolute; top: -9px; right: -9px;
  width: 20px; height: 20px;
  background: var(--fc-bleu-l); color: #fff; border-radius: 50%;
  font-size: .72rem; display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.fc-tcard-ico  { font-size: 2rem; margin-bottom: .55rem; }
.fc-tcard-name { font-size: .9rem; font-weight: 600; color: var(--fc-sombre); margin-bottom: .2rem; }
.fc-tcard-desc { font-size: .72rem; color: var(--fc-gris); line-height: 1.4; }

/* --- Form Rows & Fields --- */
.fc-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: .9rem; }
.fc-field        { display: flex; flex-direction: column; gap: .28rem; flex: 1 1 180px; }
.fc-field--sm    { flex: 0 0 110px; }
.fc-field--lg    { flex: 1 1 220px; }
.fc-field--full  { flex: 1 1 100%; }
.fc-field--inline { flex-direction: row; align-items: flex-start; gap: .6rem; }
.fc-label { font-size: .78rem; font-weight: 600; color: var(--fc-sombre); }
.fc-label--check { font-size: .84rem; font-weight: 400; cursor: pointer; line-height: 1.5; }
.req { color: var(--fc-rouge); margin-left: 2px; }
.fc-checkbox { width: 16px; height: 16px; flex-shrink: 0; margin-top: .2rem; accent-color: var(--fc-bleu-l); cursor: pointer; }
.fc-input {
  width: 100%; box-sizing: border-box;
  padding: .6rem .85rem;
  border: 1.5px solid var(--fc-bord); border-radius: 8px;
  font-family: var(--fc-font-b); font-size: .9rem;
  color: var(--fc-sombre); background: var(--fc-blanc);
  outline: none; transition: border-color var(--fc-trans);
  -webkit-appearance: none;
}
.fc-input:focus { border-color: var(--fc-bleu-l); box-shadow: 0 0 0 3px rgba(42,82,152,.1); }
.fc-textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
.fc-select { cursor: pointer; }

/* --- Domain Tags --- */
.fc-domain-grid { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .4rem; }
.fc-dtag {
  padding: .35rem .9rem;
  border: 1.5px solid var(--fc-bord);
  border-radius: 99px;
  font-size: .78rem; cursor: pointer;
  transition: all var(--fc-trans);
  color: var(--fc-gris);
  background: var(--fc-blanc);
  user-select: none;
}
.fc-dtag:hover { border-color: var(--fc-bleu-l); color: var(--fc-bleu-l); }
.fc-dtag.active { border-color: var(--fc-bleu-l); background: var(--fc-bleu-vl); color: var(--fc-bleu-l); font-weight: 600; }

/* --- Ressources --- */
.fc-res-card {
  display: flex; align-items: center; gap: .9rem;
  background: var(--fc-gris-c);
  border-radius: 9px; padding: .85rem 1rem;
  margin-bottom: .5rem;
}
.fc-res-ico { font-size: 1.4rem; width: 36px; text-align: center; flex-shrink: 0; }
.fc-res-info { flex: 1; }
.fc-res-info strong { display: block; font-size: .86rem; font-weight: 600; color: var(--fc-sombre); margin-bottom: .12rem; }
.fc-res-info span   { font-size: .75rem; color: var(--fc-gris); }
.fc-toggle { position: relative; width: 44px; height: 24px; cursor: pointer; flex-shrink: 0; }
.fc-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.fc-tslider {
  position: absolute; inset: 0;
  background: var(--fc-bord); border-radius: 99px;
  transition: background var(--fc-trans);
}
.fc-tslider::before {
  content: ''; position: absolute;
  left: 3px; top: 3px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%;
  transition: transform var(--fc-trans);
}
.fc-toggle input:checked + .fc-tslider { background: var(--fc-bleu-l); }
.fc-toggle input:checked + .fc-tslider::before { transform: translateX(20px); }
.fc-res-detail { display: none; padding: .6rem 1rem .2rem; }
.fc-res-detail.open { display: block; }

/* --- Info / Warning Boxes --- */
.fc-info-box {
  background: #EFF6FF; border: 1.5px solid #BFDBFE;
  border-radius: 8px; padding: .75rem 1rem;
  font-size: .82rem; color: #1E40AF; margin-bottom: 1.25rem;
  line-height: 1.6;
}
.fc-warn-box {
  background: #FFFBEB; border: 1.5px solid #FDE68A;
  border-radius: 8px; padding: .75rem 1rem;
  font-size: .82rem; color: #92400E; margin-bottom: 1.1rem;
  line-height: 1.6;
}

/* --- Upload Cards --- */
.fc-upload-card {
  display: flex; align-items: center; gap: .9rem;
  background: var(--fc-gris-c);
  border: 2px dashed var(--fc-bord);
  border-radius: 10px; padding: .9rem 1.1rem;
  margin-bottom: .75rem;
  transition: all var(--fc-trans);
}
.fc-upload-card:hover { border-color: var(--fc-bleu-l); background: var(--fc-bleu-vl); border-style: solid; }
.fc-upload-card.has-file { border-color: var(--fc-vert); background: #F0FDF4; border-style: solid; }
.fc-upload-icon { font-size: 1.55rem; flex-shrink: 0; width: 42px; text-align: center; }
.fc-upload-info { flex: 1; min-width: 0; }
.fc-upload-info strong { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .86rem; color: var(--fc-sombre); margin-bottom: .12rem; }
.fc-upload-info span   { font-size: .74rem; color: var(--fc-gris); }
.fc-req-badge { font-size: .62rem; font-weight: 700; padding: .18rem .55rem; background: #FEE2E2; color: #991B1B; border-radius: 99px; font-family: var(--fc-font-b); }
.fc-opt-badge { font-size: .62rem; font-weight: 600; padding: .18rem .55rem; background: var(--fc-gris-c); color: var(--fc-gris); border-radius: 99px; font-family: var(--fc-font-b); border: 1px solid var(--fc-bord); }
.fc-upload-label { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; cursor: pointer; }
.fc-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; clip: rect(0,0,0,0); }
.fc-upload-btn {
  display: inline-block; padding: .42rem .85rem;
  background: var(--fc-bleu-l); color: #fff;
  border-radius: 6px; font-size: .78rem; font-weight: 600;
  white-space: nowrap; transition: background var(--fc-trans);
}
.fc-upload-card:hover .fc-upload-btn { background: var(--fc-bleu); }
.fc-upload-card.has-file .fc-upload-btn { background: var(--fc-or); }
.fc-file-name { font-size: .73rem; color: var(--fc-gris); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Recap --- */
.fc-recap {
  background: var(--fc-gris-c);
  border-radius: 10px; padding: 1.2rem 1.4rem;
  margin-bottom: 1.25rem;
}
.fc-recap-section { margin-bottom: .85rem; }
.fc-recap-section:last-child { margin-bottom: 0; }
.fc-recap-title {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--fc-bleu-l);
  margin-bottom: .5rem; padding-bottom: .35rem;
  border-bottom: 1px solid var(--fc-bord);
}
.fc-recap-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: .32rem 0; border-bottom: 1px solid rgba(229,231,235,.6);
  font-size: .85rem; gap: 1rem;
}
.fc-recap-row:last-child { border-bottom: none; }
.fc-recap-row span:first-child { color: var(--fc-gris); flex-shrink: 0; }
.fc-recap-row span:last-child  { font-weight: 500; color: var(--fc-sombre); text-align: right; }
.fc-tag-ok { display: inline-block; background: #DCFCE7; color: var(--fc-vert); padding: .15rem .6rem; border-radius: 99px; font-size: .74rem; font-weight: 600; }

/* --- Buttons --- */
.fc-btn-row { display: flex; justify-content: flex-end; gap: .65rem; margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--fc-gris-c); }
.fc-btn-row--between { justify-content: space-between; }
.fc-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .7rem 1.35rem; border-radius: 8px;
  font-family: var(--fc-font-b); font-size: .9rem; font-weight: 600;
  cursor: pointer; border: none; outline: none;
  transition: all var(--fc-trans);
}
.fc-btn-next   { background: var(--fc-bleu-l); color: #fff; }
.fc-btn-next:hover { background: var(--fc-bleu); }
.fc-btn-prev   { background: var(--fc-gris-c); color: var(--fc-sombre); }
.fc-btn-prev:hover { background: #E5E7EB; }
.fc-btn-submit { background: var(--fc-or); color: #fff; }
.fc-btn-submit:hover:not(:disabled) { background: #b8750a; box-shadow: 0 4px 15px rgba(200,134,10,.3); }
.fc-btn-submit:disabled { opacity: .45; cursor: not-allowed; }
.fc-arr { font-size: .9rem; }
.fc-spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: fc-spin .7s linear infinite; flex-shrink: 0;
}
@keyframes fc-spin { to { transform: rotate(360deg); } }

/* --- Confirmation --- */
.fc-confirmation {
  background: var(--fc-blanc); border: 1px solid var(--fc-bord);
  border-top: none; border-radius: 0 0 var(--fc-rayon) var(--fc-rayon);
  padding: 3rem 2rem; text-align: center;
  animation: fcFadeIn .35s ease;
}
.fc-confirm-icon { font-size: 4rem; margin-bottom: .9rem; }
.fc-confirm-titre { font-family: var(--fc-font-t); font-size: 1.75rem; color: var(--fc-bleu-l); margin: 0 0 .7rem; font-weight: 600; }
.fc-confirm-texte { font-size: .95rem; color: var(--fc-sombre); margin-bottom: 1rem; }
.fc-confirm-details {
  background: var(--fc-gris-c); border-radius: 9px; padding: 1rem 1.3rem;
  display: inline-block; font-size: .86rem; text-align: left;
  margin-bottom: 1.25rem; min-width: 280px;
}
.fc-confirm-details div { padding: .25rem 0; color: var(--fc-sombre); }
.fc-confirm-details span { color: var(--fc-gris); margin-right: .5rem; }
.fc-confirm-note { font-size: .83rem; color: var(--fc-gris); max-width: 480px; margin: 0 auto; line-height: 1.65; }

/* --- Responsive --- */
@media (max-width: 640px) {
  .fc-fieldset { padding: 1.25rem 1rem; }
  .fc-header   { padding: 1.75rem 1rem 1.5rem; }
  .fc-progress-bar { padding: 1rem .75rem; }
  .fc-step-label { font-size: .62rem; }
  .fc-type-grid { grid-template-columns: 1fr 1fr; }
  .fc-upload-card { flex-wrap: wrap; }
  .fc-upload-label { width: 100%; }
}
@media (max-width: 400px) {
  .fc-type-grid { grid-template-columns: 1fr; }
  .fc-row { flex-direction: column; }
}
