/* ==========================================================================
   RECHARGE — Consultations (template-consultations.php / single-consultation.php)
   Chargé uniquement sur ces pages (voir includes/consultations.php)
   ========================================================================== */

:root {
  --rc-green: #66cc99;
  --rc-text: #4a4a4a;
  --rc-grey: #9b9b9b;
  --rc-grey-light: #dedede;
  --rc-orange: #ff6633;
  --rc-placeholder: #e94e1b;
  --rc-shadow-card: 2px 3px 4px 3px rgba(0, 0, 0, 0.05);
  --rc-shadow-field: 2px 2px 5px 2px rgba(0, 0, 0, 0.05);
}

.rc-consult-hero,
.rc-consult-intro,
.rc-consult-list,
.rc-feedback-modal {
  font-family: acumin-pro, sans-serif;
}

/* ---------- Hero ---------- */
.rc-consult-hero {
  background-color: #f4f4f4;
}
.rc-consult-hero__title {
  font-size: 48px;
  line-height: 55px;
  font-weight: 300;
  color: var(--rc-text);
  margin: 0;
}
.rc-consult-hero__title--mobile {
  display: none;
}

/* ---------- Intro (contenu fixe du haut) ---------- */
.rc-consult-intro {
  padding: 53px 0 40px;
}
.rc-consult-intro__title {
  font-size: 36px;
  line-height: 45px;
  font-weight: 300;
  color: var(--rc-green);
  margin: 0 0 24px;
}
.rc-consult-intro__text {
  max-width: 774px;
  font-size: 16px;
  line-height: 26px;
  font-weight: 300;
  color: var(--rc-text);
}
.rc-consult-intro__text p:last-child {
  margin-bottom: 0;
}
.rc-consult-placeholder {
  color: var(--rc-placeholder);
}

/* ---------- Liste ---------- */
.rc-consult-list {
  padding: 90px 0 120px;
}
.rc-consult-list--single {
  padding-top: 80px;
}
.rc-consult-item + .rc-consult-item {
  margin-top: 120px;
}
.rc-consult-item__header {
  margin-bottom: 34px;
}
.rc-consult-item__title {
  max-width: 727px;
  font-size: 24px;
  line-height: 29px;
  font-weight: 300;
  color: var(--rc-green);
  margin: 0 0 8px;
}
.rc-consult-item__title a,
.rc-consult-item__title a:hover,
.rc-consult-item__title a:focus {
  color: inherit;
  font-weight: inherit;
}
.rc-consult-bar {
  display: block;
  width: 270px;
  max-width: 100%;
  height: 5px;
  background-image: linear-gradient(to right, #ffc800, #b6e100);
}

/* Carte */
.rc-consult-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--rc-shadow-card);
  padding: 40px 48px 40px 40px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 300;
  color: var(--rc-grey);
}
.rc-consult-card p {
  margin: 0 0 20px;
}
.rc-consult-card strong,
.rc-consult-card b,
.rc-consult-docs__title {
  font-weight: 700;
  color: var(--rc-text);
}
.rc-consult-card a {
  color: var(--rc-green);
}
.rc-consult-card a:hover,
.rc-consult-card a:focus {
  text-decoration: underline;
  font-weight: inherit;
}
.rc-consult-card ul {
  padding-left: 21px;
  margin: 0 0 20px;
}
.rc-consult-card > :last-child,
.rc-consult-card__content > :last-child {
  margin-bottom: 0;
}
.rc-consult-card__content + .rc-consult-docs,
.rc-consult-docs + .rc-consult-card__content {
  margin-top: 20px;
}
.rc-consult-card__cover {
  width: 336px;
  max-width: 100%;
  height: 168px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 32px;
  background: #f4f4f4;
}
.rc-consult-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rc-consult-docs__title {
  margin: 0 0 20px;
}
.rc-consult-docs__list li + li {
  margin-top: 0;
}

/* Colonne droite */
.rc-consult-aside {
  padding-top: 15px;
}
.rc-consult-aside__btn {
  margin-bottom: 55px;
}
.rc-consult-period {
  font-size: 14px;
  line-height: 20px;
  color: var(--rc-text);
}
.rc-consult-period p {
  margin: 0;
}
.rc-consult-period__label {
  font-weight: 700;
  position: relative;
  padding-bottom: 18px;
  margin-bottom: 20px !important;
}
.rc-consult-period__label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 160px;
  height: 1px;
  background: var(--rc-grey-light);
}
.rc-consult-period__dates {
  font-weight: 700;
}
.rc-consult-period__key {
  color: var(--rc-green);
}
.rc-consult-period__note {
  font-weight: 300;
  color: var(--rc-grey);
}

/* Boutons */
.rc-consult-btn {
  display: inline-block;
  min-width: 166px;
  height: 43px;
  padding: 0 24px;
  border: 2px solid var(--rc-green);
  border-radius: 21.5px;
  background: #fff;
  color: var(--rc-green);
  font-family: acumin-pro, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 39px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.rc-consult-btn:hover,
.rc-consult-btn:focus,
.rc-consult-btn.is-active {
  background: var(--rc-green);
  color: #fff;
  outline: none;
}
.rc-consult-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(102, 204, 153, 0.35);
}
.rc-consult-btn.is-disabled,
.rc-consult-btn.is-disabled:hover {
  background: var(--rc-grey-light);
  border-color: var(--rc-grey-light);
  color: var(--rc-grey);
  cursor: not-allowed;
}

.rc-consult-empty,
.rc-consult-back {
  font-size: 16px;
  font-weight: 300;
  color: var(--rc-text);
}
.rc-consult-back {
  margin: 60px 0 0;
}

/* ==========================================================================
   Popup feedback
   ========================================================================== */
.rc-feedback-modal .modal-dialog {
  max-width: 646px;
}
.rc-feedback-modal .modal-content {
  position: relative;
  border: 0;
  border-radius: 10px;
  box-shadow: var(--rc-shadow-card);
  padding: 28px 120px 40px;
  color: var(--rc-text);
}
.rc-feedback-modal__close {
  position: absolute;
  top: 12px;
  right: 18px;
  border: 0;
  background: none;
  font-size: 28px;
  line-height: 1;
  color: var(--rc-grey);
  cursor: pointer;
  z-index: 2;
}
.rc-feedback-modal__close:hover {
  color: var(--rc-green);
}
.rc-feedback-modal__title {
  font-size: 20px;
  line-height: 45px;
  font-weight: 600;
  color: var(--rc-green);
  text-align: center;
  margin: 0;
}
.rc-feedback-modal__subtitle {
  font-size: 14px;
  line-height: 20px;
  font-weight: 300;
  color: var(--rc-grey);
  text-align: center;
  margin: 0;
}
.rc-feedback-modal__subtitle:empty {
  display: none;
}

/* Champs */
.rc-feedback-form .rc-field {
  margin-bottom: 18px;
}
.rc-feedback-modal__body {
  padding-top: 18px;
}
.rc-feedback-form label {
  display: block;
  font-size: 16px;
  line-height: 30px;
  font-weight: 400;
  color: var(--rc-text);
  margin: 0 0 4px 20px;
}
.rc-req {
  color: var(--rc-orange);
}
.rc-feedback-form .wpcf7-form-control-wrap {
  display: block;
  position: relative;
}
.rc-feedback-form input[type="text"],
.rc-feedback-form input[type="email"],
.rc-feedback-form select {
  display: block;
  width: 100%;
  height: 36px;
  padding: 0 20px;
  border: 0;
  border-radius: 20px;
  background-color: #fff;
  box-shadow: var(--rc-shadow-field);
  font-family: acumin-pro, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--rc-green);
  outline: none;
  transition: box-shadow 0.2s ease;
}
.rc-feedback-form input[type="text"]:focus,
.rc-feedback-form input[type="email"]:focus,
.rc-feedback-form select:focus {
  box-shadow: 2px 2px 5px 2px rgba(0, 0, 0, 0.05), 0 0 0 2px rgba(102, 204, 153, 0.35);
}
.rc-feedback-form select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 48px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M1.5 1.5l6.5 6.5 6.5-6.5' fill='none' stroke='%239b9b9b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
}
.rc-feedback-form select.is-empty {
  color: #979797;
}
.rc-feedback-form select option {
  color: var(--rc-text);
}
.rc-feedback-form .rc-help {
  display: block;
  font-size: 13px;
  line-height: 18px;
  color: var(--rc-text);
  margin: 8px 0 0 20px;
}

/* Erreurs CF7 */
.rc-feedback-form .wpcf7-not-valid-tip {
  font-size: 14px;
  line-height: 20px;
  color: var(--rc-orange);
  margin: 6px 0 0 20px;
}
.rc-feedback-form .wpcf7-not-valid {
  box-shadow: 2px 2px 5px 2px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(255, 102, 51, 0.6) !important;
}
.rc-feedback-modal .wpcf7 form .wpcf7-response-output {
  margin: 20px 0 0;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 20px;
}
.rc-feedback-modal .wpcf7 form.sent .wpcf7-response-output {
  display: none;
}

/* Bloc légal + consentement */
.rc-feedback-form .rc-sep {
  border: 0;
  border-top: 1px solid var(--rc-grey-light);
  margin: 30px -20px 22px;
}
.rc-feedback-form .rc-legal {
  font-size: 13px;
  line-height: 17px;
  color: var(--rc-text);
}
.rc-feedback-form .rc-legal p {
  margin: 0 0 16px;
}
.rc-feedback-form .rc-legal strong {
  font-weight: 700;
}
.rc-feedback-form .rc-consent {
  margin: 20px 0 0;
}
.rc-feedback-form .rc-consent .wpcf7-list-item {
  margin: 0;
}
.rc-feedback-form .rc-consent label {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin: 0;
  font-size: 13px;
  line-height: 20px;
  cursor: pointer;
}
.rc-feedback-form .rc-consent input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1px solid #979797;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  position: relative;
}
.rc-feedback-form .rc-consent input[type="checkbox"]:checked {
  border-color: var(--rc-green);
  background: var(--rc-green);
  box-shadow: inset 0 0 0 4px #fff;
}
.rc-feedback-form .rc-consent input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(102, 204, 153, 0.5);
  outline-offset: 2px;
}

/* Pièce jointe + envoi */
.rc-feedback-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  position: relative;
}
.rc-feedback-form .rc-attach {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--rc-text);
  cursor: pointer;
}
.rc-feedback-form .rc-attach .wpcf7-form-control-wrap {
  position: absolute;
  left: 0;
  top: 100%;
  white-space: nowrap;
}
.rc-feedback-form .rc-attach input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
.rc-feedback-form .rc-attach .wpcf7-not-valid-tip {
  margin-left: 0;
}
.rc-attach__icon {
  position: relative;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}
.rc-attach__icon::before,
.rc-attach__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.rc-attach__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}
.rc-attach__label {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rc-attach__status {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  background: rgba(74, 74, 74, 0.2);
  transition: background-color 0.2s ease;
}
.rc-attach:hover,
.rc-attach.has-file {
  color: var(--rc-green);
}
.rc-attach.has-file .rc-attach__status {
  background: var(--rc-green);
}
.rc-feedback-form .rc-submit {
  margin-left: auto;
  padding: 0 16px;
}
.rc-feedback-form .rc-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.rc-feedback-form .rc-submit:disabled:hover {
  background: #fff;
  color: var(--rc-green);
}
.rc-feedback-modal .wpcf7-spinner {
  position: absolute;
  right: -34px;
  top: 50%;
  margin: -12px 0 0;
}

/* Vue "Thank you!" */
.rc-feedback-modal__view--thanks {
  text-align: center;
  padding: 10px 0 0;
}
.rc-feedback-modal__check {
  display: block;
  position: relative;
  width: 50px;
  height: 50px;
  margin: 0 auto 26px;
  border-radius: 50%;
  background: var(--rc-green);
}
.rc-feedback-modal__check::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 12px;
  height: 12px;
  border-right: 4px solid #fff;
  border-bottom: 4px solid #fff;
  border-radius: 2px;
  transform: translate(-50%, -50%) rotate(45deg);
}
.rc-feedback-modal__thanks-title {
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
  color: var(--rc-green);
  margin: 0 0 26px;
}
.rc-feedback-modal__thanks-text {
  font-size: 20px;
  line-height: 26px;
  font-weight: 300;
  color: var(--rc-green);
  margin: 0 0 10px;
}

/* --------------------------------------------------------------------------
   Neutralise les styles CF7 globaux du thème (style.css : .wpcf7-form,
   .wpcf7-form select, .wpcf7-form input[type=submit], .wpcf7-list-item…)
   uniquement dans le popup de consultation.
   -------------------------------------------------------------------------- */
#rc-feedback-modal .wpcf7-form {
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
}
#rc-feedback-modal .wpcf7-form input[type="text"],
#rc-feedback-modal .wpcf7-form input[type="email"],
#rc-feedback-modal .wpcf7-form select {
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0 20px;
  border: 0;
  border-radius: 20px;
  box-shadow: var(--rc-shadow-field);
  background-color: #fff;
  font-family: acumin-pro, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 36px;
  text-align: left;
  color: var(--rc-green);
}
#rc-feedback-modal .wpcf7-form select {
  padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M1.5 1.5l6.5 6.5 6.5-6.5' fill='none' stroke='%239b9b9b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  text-align-last: left;
}
#rc-feedback-modal .wpcf7-form select.is-empty {
  color: #979797;
}
#rc-feedback-modal .wpcf7-form input[type="text"]:hover,
#rc-feedback-modal .wpcf7-form input[type="email"]:hover,
#rc-feedback-modal .wpcf7-form select:hover {
  border: 0;
}
#rc-feedback-modal .wpcf7-form input[type="text"]:focus,
#rc-feedback-modal .wpcf7-form input[type="email"]:focus,
#rc-feedback-modal .wpcf7-form select:focus {
  border: 0;
  outline: none;
  box-shadow: var(--rc-shadow-field), 0 0 0 2px rgba(102, 204, 153, 0.35);
}
#rc-feedback-modal .wpcf7-form .wpcf7-not-valid {
  box-shadow: var(--rc-shadow-field), 0 0 0 1px rgba(255, 102, 51, 0.6);
}

/* Bouton "Send your feedback" (contour vert, plein quand le formulaire est complet) */
#rc-feedback-modal .wpcf7-form input[type="submit"] {
  width: auto;
  min-width: 166px;
  height: 43px;
  margin: 0 0 0 auto;
  padding: 0 16px;
  border: 2px solid var(--rc-green);
  border-radius: 21.5px;
  background: #fff;
  color: var(--rc-green);
  font-family: acumin-pro, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 39px;
  cursor: pointer;
}
#rc-feedback-modal .wpcf7-form input[type="submit"]:hover,
#rc-feedback-modal .wpcf7-form input[type="submit"]:focus,
#rc-feedback-modal .wpcf7-form input[type="submit"].is-active {
  background: var(--rc-green);
  color: #fff;
}
#rc-feedback-modal .wpcf7-form input[type="submit"]:disabled {
  opacity: 0.55;
  background: #fff;
  color: var(--rc-green);
  cursor: not-allowed;
}

/* Case de consentement */
#rc-feedback-modal .wpcf7-list-item {
  display: block;
  position: static;
  padding-left: 0;
  margin: 0;
  font-size: 13px;
}
#rc-feedback-modal .wpcf7-list-item input {
  position: relative;
}
#rc-feedback-modal .wpcf7-list-item-label {
  font-size: 13px;
  line-height: 20px;
  color: var(--rc-text);
}
#rc-feedback-modal .wpcf7-list-item-label::before,
#rc-feedback-modal .wpcf7-list-item-label::after {
  display: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1199.98px) {
  .rc-consult-card {
    padding: 32px;
  }
}

@media (max-width: 991.98px) {
  .rc-consult-item__header {
    margin-bottom: 30px;
  }
  .rc-consult-period {
    font-size: 16px;
    line-height: 22px;
    margin-bottom: 36px;
  }
  .rc-consult-period__label {
    font-weight: 400;
    padding-bottom: 0;
    margin-bottom: 0 !important;
  }
  .rc-consult-period__label::after {
    display: none;
  }
  .rc-consult-aside {
    padding-top: 40px;
    text-align: center;
  }
  .rc-consult-aside__btn {
    margin-bottom: 0;
  }
}

@media (max-width: 767.98px) {
  .rc-consult-hero__title--desktop {
    display: none;
  }
  .rc-consult-hero__title--mobile {
    display: block;
    font-size: 24px;
    line-height: 30px;
    margin: 0 0 22px;
  }
  .rc-consult-intro {
    padding: 22px 0 10px;
  }
  .rc-consult-intro__title {
    font-size: 24px;
    line-height: 30px;
    margin-bottom: 26px;
  }
  .rc-consult-intro__text {
    font-size: 15px;
    line-height: 26px;
  }
  .rc-consult-list {
    padding: 50px 0 80px;
  }
  .rc-consult-list--single {
    padding-top: 22px;
  }
  .rc-consult-item + .rc-consult-item {
    margin-top: 80px;
  }
  .rc-consult-item__title {
    font-size: 24px;
    line-height: 30px;
    margin-bottom: 14px;
  }
  .rc-consult-period {
    font-size: 15px;
  }
  .rc-consult-card {
    padding: 24px 18px;
    font-size: 13px;
  }
  .rc-consult-card__cover {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 1;
  }

  .rc-feedback-modal .modal-dialog {
    margin: 12px;
  }
  .rc-feedback-modal .modal-content {
    padding: 24px 20px 30px;
  }
  .rc-feedback-form label {
    margin-left: 12px;
  }
  .rc-feedback-form .rc-help,
  .rc-feedback-form .wpcf7-not-valid-tip {
    margin-left: 12px;
  }
  .rc-feedback-form .rc-sep {
    margin-left: 0;
    margin-right: 0;
  }
  .rc-feedback-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .rc-feedback-form .rc-submit,
  #rc-feedback-modal .wpcf7-form input[type="submit"] {
    margin: 0 auto;
  }
  .rc-feedback-modal .wpcf7-spinner {
    right: 0;
    top: auto;
    bottom: -32px;
  }
  .rc-feedback-modal__thanks-text {
    font-size: 17px;
  }
}
