/* CTA on Listeo registration form */
.ctinst-cta-wrap{margin:14px 0 18px;padding:12px 14px;border:1px solid rgba(0,0,0,.08);border-radius:8px;}
.ctinst-cta-button{display:inline-block;padding:10px 14px;border-radius:6px;text-decoration:none;font-weight:600;}
.ctinst-cta-note{margin-top:6px;font-size:.92em;opacity:.75;}

/* Institution register form (shortcode) */
.ctinst-register-wrap{max-width:720px;margin:0 auto;}
.ctinst-register-wrap form{margin-top:12px;}
.ctinst-register-wrap label{display:block;font-weight:600;margin:10px 0 6px;}
.ctinst-register-wrap input[type="text"],
.ctinst-register-wrap input[type="email"],
.ctinst-register-wrap input[type="password"]{width:100%;padding:10px 12px;border:1px solid rgba(0,0,0,.18);border-radius:6px;}
.ctinst-register-wrap .ctinst-check{display:flex;gap:10px;align-items:flex-start;margin:10px 0;}
.ctinst-register-wrap .ctinst-check input{margin-top:3px;}
.ctinst-register-wrap .ctinst-submit{margin-top:14px;}

/* --- CT Institutions : Système de Messages Standardisé --- */
.ctinst-msg {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-left: 4px solid transparent; /* La couleur sera définie par le modifier */
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-size: 14px;
    line-height: 1.5;
}

.ctinst-msg-title {
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

/* NIVEAU : INFO (Bleu) */
.ctinst-msg--info {
    border-left-color: #2271b1; /* Bleu WP Admin */
    background-color: #f0f6fc;
    color: #1d2327;
}
.ctinst-msg--info .ctinst-msg-title { color: #2271b1; }

/* NIVEAU : SUCCESS (Vert) */
.ctinst-msg--success {
    border-left-color: #46b450; /* Vert WP */
    background-color: #edfaef;
    color: #1d2327;
}
.ctinst-msg--success .ctinst-msg-title { color: #46b450; }

/* NIVEAU : WARNING (Jaune/Orange) */
.ctinst-msg--warning {
    border-left-color: #f5b900; /* Jaune WP */
    background-color: #fcf9e8;
    color: #1d2327;
}
.ctinst-msg--warning .ctinst-msg-title { color: #d69e00; }

/* NIVEAU : ERROR (Rouge) */
.ctinst-msg--error {
    border-left-color: #d63638; /* Rouge WP */
    background-color: #fbeaea;
    color: #1d2327;
}
.ctinst-msg--error .ctinst-msg-title { color: #d63638; }

/* --- CT Institutions : Profil Institution (cascade) --- */
.ctinst-profile-wrap{max-width:900px;margin:0 auto;}
.ctinst-section{margin:0 0 22px;}
.ctinst-section-sub{opacity:.8;margin-top:-8px;}
.ctinst-divider{margin:22px 0;opacity:.25;}
.ctinst-grid{display:grid;gap:14px;}
.ctinst-grid--2{grid-template-columns:repeat(2,minmax(0,1fr));}
.ctinst-grid--1{grid-template-columns:1fr;}
.ctinst-field{margin:0;}
.ctinst-field label{display:block;font-weight:600;margin:10px 0 6px;}
.ctinst-field input[type="text"],
.ctinst-field input[type="email"]{width:100%;padding:10px 12px;border:1px solid rgba(0,0,0,.18);border-radius:6px;}

/* Champs verrouillés (readonly) : gris + curseur interdit */
.ctinst-profile-wrap input[readonly]{
  background:#efefef;
  cursor:not-allowed;
}
.ctinst-field--half{grid-column:1 / span 1;}
.ctinst-actions{margin-top:18px;}

/* Boutons d'action alignés */
.ctinst-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;}

/* Messages dismissible (fermeture) */
.ctinst-msg--dismissible{position:relative;padding-right:44px;}
.ctinst-msg-close{
  position:absolute;
  top:10px;
  right:10px;
  width:28px;
  height:28px;
  border:0;
  background:transparent;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  opacity:.55;
}
.ctinst-msg-close:hover{opacity:.9;}
@media(max-width:760px){
  .ctinst-grid--2{grid-template-columns:1fr;}
  .ctinst-field--half{grid-column:auto;}
}

/* Institution register form aligned with CT Users Manager front UI */
.ctinst-register-wrap--ct-ui{max-width:none;margin:0;}
.ctinst-ct-form{margin-top:20px;}
.ctinst-ct-grid{display:grid;gap:20px;}
.ctinst-ct-grid--2{grid-template-columns:repeat(2,minmax(0,1fr));}
.ctinst-ct-field--full{grid-column:1 / -1;}
.ctinst-ct-field{margin:0;}
.ctinst-ct-field{position:relative;margin:0;}
.ctinst-ct-field .input-text{
  width:100%;
  min-height:58px;
  padding:0 20px 0 64px;
  border:1px solid #BDBDBD;
  border-radius:4px;
  background:#fff;
  color:#808080;
  font-weight:400;
  box-sizing:border-box;
}
.ctinst-ct-icon{
  position:absolute;
  left:20px;
  top:50%;
  transform:translateY(-50%);
  width:24px;
  height:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#808080;
  pointer-events:none;
  font-size:20px;
  line-height:1;
}
.ctinst-ct-field .input-text::placeholder{color:#808080;opacity:1;font-weight:400;}
.ctinst-ct-checks{margin-top:20px;display:flex;flex-direction:column;gap:20px;}
.ctinst-ct-check{display:flex;align-items:flex-start;gap:14px;margin:0;font-weight:400;color:#4f4f4f;}
.ctinst-ct-check input[type="checkbox"]{
  width:24px;height:24px;min-width:24px;margin:0;position:relative;top:2px;
}
.ctinst-ct-check a{color:inherit;text-decoration:none;}
.ctinst-ct-check a:hover{text-decoration:underline;}
.ctinst-required{color:#cc4b4c;}
.ctinst-ct-submit{margin-top:20px;}
.ctinst-ct-submit .button,
.ctinst-ct-submit .button.button-primary{
  border-radius:999px;
}
@media(max-width:767px){
  .ctinst-ct-grid--2{grid-template-columns:1fr;}
  .ctinst-ct-field--full{grid-column:auto;}
}

/* v0.7.3 - institution form fields aligned with CT Users Manager */
.ctinst-register-wrap--ct-ui .ctinst-ct-field{position:relative!important;margin:0!important;}
.ctinst-register-wrap--ct-ui .ctinst-ct-field label{display:none!important;}
.ctinst-register-wrap--ct-ui .ctinst-ct-field .input-text{
  width:100%!important;
  min-height:58px!important;
  height:58px!important;
  padding:0 20px 0 64px!important;
  line-height:58px!important;
  border:1px solid #BDBDBD!important;
  border-radius:4px!important;
  background:#fff!important;
  color:#808080!important;
  font-weight:400!important;
  box-sizing:border-box!important;
}
.ctinst-register-wrap--ct-ui .ctinst-ct-field .input-text::placeholder{
  color:#808080!important;
  opacity:1!important;
  font-weight:400!important;
}
.ctinst-register-wrap--ct-ui .ctinst-ct-field .input-text:focus{outline:none!important;}
.ctinst-register-wrap--ct-ui .ctinst-ct-icon{
  position:absolute!important;
  left:20px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:24px!important;
  height:24px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:#808080!important;
  pointer-events:none!important;
  font-size:20px!important;
  line-height:1!important;
}


/* v0.7.4 - reuse CT Users Manager front field system */
.ctinst-generated-form{display:grid;gap:20px;}
.ctinst-generated-form .ctuth-generated-form__grid{display:flex;flex-wrap:wrap;gap:20px;}
.ctinst-generated-form .ctuth-generated-form__field{margin:0;width:100%;flex:0 0 100%;}
.ctinst-generated-form .ctuth-generated-form__field--half{width:calc(50% - 10px);flex:0 0 calc(50% - 10px);}
.ctinst-generated-form .ctuth-generated-form__input-wrap{position:relative;}
.ctinst-generated-form .ctuth-generated-form__input-wrap.has-icon input{padding-left:56px !important;}
.ctinst-generated-form .ctuth-generated-form__field input[type="text"],
.ctinst-generated-form .ctuth-generated-form__field input[type="email"],
.ctinst-generated-form .ctuth-generated-form__field input[type="password"]{width:100%;height:51px;min-height:51px;line-height:51px;border-radius:3px;border:1px solid #BDBDBD;padding:0 20px;margin:0 !important;background:#fff;color:#808080;font-family:var(--e-global-typography-text-font-family, inherit);font-size:15px;font-weight:400;box-shadow:none;}
.ctinst-generated-form .ctuth-generated-form__field input::placeholder{color:#808080;opacity:1;font-weight:400;}
.ctinst-generated-form .ctuth-generated-form__field input:focus{color:#808080;border-color:#BDBDBD;box-shadow:none;}
.ctinst-generated-form .ctuth-generated-form__icon{position:absolute;top:50%;left:16px;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;color:#808080;font-size:21px;line-height:21px;width:20px;height:20px;pointer-events:none;}
.ctinst-generated-form .ctuth-generated-form__checkbox{display:inline-flex;align-items:center;gap:12px;margin:0;color:#5f6062;font-family:var(--e-global-typography-text-font-family, inherit);font-size:16px;line-height:1.45;font-weight:400;}
.ctinst-generated-form .ctuth-generated-form__checkbox input[type="checkbox"]{appearance:auto;-webkit-appearance:checkbox;accent-color:#2C4E53;width:20px !important;min-width:20px !important;max-width:20px !important;height:20px !important;min-height:20px !important;line-height:20px !important;margin:0 !important;padding:0 !important;border:1px solid #BDBDBD;background:#fff;box-shadow:none;flex:0 0 20px;}
.ctinst-generated-form .ctuth-generated-form__checkbox a{color:#2C4E53;text-decoration:none;}
.ctinst-generated-form .ctuth-generated-form__checkbox a:hover,.ctinst-generated-form .ctuth-generated-form__checkbox a:focus{text-decoration:underline;}
.ctinst-generated-form .ctuth-generated-form__required{color:#b42318;}
.ctinst-generated-form .ctuth-router-inline-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-top:18px;}
.ctinst-generated-form .ctuth-router-inline-actions .ctinst-router-back{order:2;margin-left:auto;}
.ctinst-generated-form .ctuth-router-inline-actions > button[type="submit"]{order:1;}
@media(max-width:767px){.ctinst-generated-form .ctuth-generated-form__field--half{width:100%;flex-basis:100%;}}
