/******************
    User custom CSS
    ---------------

    In this file you can add your own custom CSS
    It will be loaded last, so you can override any other property.
    Also, it will never be updated. So if you inheritate a core template and just add here some CSS, you'll still benefit of all the updates
*/

/* --------------------------------------------------
   TABLES
-------------------------------------------------- */

.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td {
  border: 1px solid #dadada;
}

.table > :not(:first-child) {
  border-top: 2px solid #e0e1ec;
}

[class*="array-"] .answer-container.col-12 {
 padding-left: 0;
 padding-right: 0;
}


/* --------------------------------------------------
   NAVBAR
-------------------------------------------------- */

.container-fluid {
  justify-content: initial !important;
}

.navbar {
 padding-top: 0;
}

#navbar {
  padding-top: 0 !important;    
  padding-bottom: 40px;
}

#survey-nav {
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.075),
    0 10px 0 rgba(0,0,0,0.01);
}

.navbar-toggler {
  border-color: rgba(0,0,0,.1);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(0, 0, 0, 0.55)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.navbar-nav {
  flex-direction: unset;
  float: right;
}

.progress-bar {
  background-color:#152a7a;
}

.top-container {
  margin-top: 0 !important;
  margin-left: auto;
  margin-right: auto;
}


/* --------------------------------------------------
   TYPOGRAPHIE & COULEURS
-------------------------------------------------- */

body, html {
    font-family: "Noto Sans" !important;
    /*font-size: initial;*/
}

body {
  color: #152a7a;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
}

html, body {
  height: 100%;
  margin: 0;
}

a {
  color: #337ab7;
  text-decoration: none;
}

.text-info {
  color: #46507A !important;
}

.text-danger,
.text-warning {
  color: #EF7757 !important;
  top: 0;
}

.text-primary {
  color: #337ab7 !important;
}

.text-danger.fa.fa-asterisk.small {
  margin-right: 5px;
}

.h1, h1 {
  font-size: 24px;
}

.survey-name {
  margin: 2rem;
  text-align: left !important;
  font-size: 24px;
}

.radio-item label::before,
.checkbox-item label::before {
    border-color: #A2A2A2;
}

.bg-danger {
  background-color: whitesmoke !important;
}

.bg-warning {
  background-color: whitesmoke !important;
}

.dropdown-item.disabled,
.dropdown-item:disabled {
  color:#777;
}

.table,
.table-hover>tbody>tr:hover>* {
  color:inherit;
}

.bg-primary {
    background-color: #f7f7f7 !important;
}

/*.ls-label-question {
  font-size: 16px;
  line-height: 24px;
}*/


/* Cible toutes les questions, mais surtout les questions à choix (radio) */
#limesurvey .question-text,
#limesurvey .question-text * {
  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: inherit !important;
  font-style: 24px !important;
  line-height: inherit !important;
  /*color: inherit !important;*/
}

/* Optionnel : neutralise les balises <font> collées depuis Word/Google Docs */
#limesurvey font,
#limesurvey font * {
  all: unset !important;
  font-family: inherit !important;
  font-size: inherit !important;
}



/* --------------------------------------------------
   BOUTONS
-------------------------------------------------- */

.btn-success,
.btn-info,
.btn-primary {
  color: #fff;
  background-color: #152a7a;
  border-color: #20204F;
}

.btn-success:hover,
.btn-info:hover,
.btn-primary:hover,
.btn-success:focus,
.btn-info:focus,
.btn-primary:focus,
.btn-success.active,
.btn-info.active,
.btn-primary.active {
  color: #fff;
  background-color: #5970B4;
  border-color: #475A91;
}


/* --------------------------------------------------
   BLOCS & CONTENEURS
-------------------------------------------------- */

.bg-light {
  background: #FFF !important;
}

.footer {
  background-color: #F3F3F3;
  border-width: 0;
  margin-top: 21px;
  padding: 15px 0 15px 30px;
  display: flex;
}


.link-cerema a,
.link-cerema a:hover,
.link-cerema a:focus {
  color: #EF7757;
  text-decoration: none;
}

.group-title {
  background: #152a7a;
  padding: 1rem;
  text-align: left !important;
  text-transform: uppercase;
  color: white;
}

.group-description {
  margin-left: 0;
  margin-right: 0;
  margin-top: -1.5em;
}

.question-container {
  margin-left: 0;
  margin-right: 0;
  background-color: transparent;
}

.question-title-container {
  background: #e0e1ec;
}

.question-help-container,
.question-valid-container {
  background: whitesmoke;
}

.ls-questionhelp {
  margin: 10px 0;
}

.ls-question-mandatory {
  margin-top: 15px;
  margin-bottom: 15px;
}


.row {
  --bs-gutter-x: 25px;
}


.question-item.answer-item.checkbox-item {
  margin-bottom: 14px !important;
}

article {
  flex: 1 1 auto;
}

.container {
  height: inherit;
}

li.nav-item.ls-no-js-hidden {
  padding-left: 8px;
}

.control-label {
  margin-bottom: 5px;
}

.control-label.label-radio {
  padding-bottom: 5px;
}

.save-survey-label.control-label,
.load-survey-label.control-label {
  margin-bottom: 5px;
}

.sortable-choice.sortable-list.list-group,
.sortable-rank.sortable-list.list-group {
 margin-top: 5px;
}

.leaflet-container {
 margin-top: 15px;
 margin-bottom: 15px;
}

.row.alert.alert-warning.alert-dismissible.fade.in.show {
 --bs-gutter-x: 0;
 /*margin-bottom: 2.5rem;*/
}

.question-text .ls-label-question table {
    max-width: fit-content;
}

.question-text tbody, td, tfoot, th, thead, tr {
    border-width: 0;
}

.survey-description {
  text-align: left !important;
}

.ls-privacy-head {
  padding-top: 1rem;
}


/* --------------------------------------------------
   RESPONSIVE
-------------------------------------------------- */

@media (min-width: 768px) {
  .navbar-toggler {
    display: none;
  }
  
  .marianne-footer {
  margin-right: 30px;
}

.dropdown-menu {
  right: 0 !important;
  left: auto !important;
}

.navbar-expand-md .navbar-nav .nav-link {
  padding-left:15px;
  padding-right:15px;
}

.ls-link-saveall, .ls-link-loadall, .ls-link-clearall, .ls-link-resume, .dropdown-toggle {
  padding-left: 15px !important;
  padding-right: 15px !important;
}
  
.dropdown-toggle,  
a[data-limesurvey-submit*="saveall"],
a[data-limesurvey-submit*="loadall"],
a[data-limesurvey-submit*="clearall"],
a[data-limesurvey-submit*="resume"] {
    font-weight: 500;
    color: #152a7a !important; /* bleu discret */
    /*text-decoration: underline;*/
    padding: 15px;
    border-radius: 3px;
    transition: color 0.2s ease, background 0.2s ease;
}

a.dropdown-toggle:hover,
a[data-limesurvey-submit*="saveall"]:hover,
a[data-limesurvey-submit*="loadall"]:hover,
a[data-limesurvey-submit*="clearall"]:hover,
a[data-limesurvey-submit*="resume"]:hover {
    background: #f5f5f5;
    color: #00345a !important;
}

a[data-limesurvey-submit]::after {
    font-family: Fontawesome;
    content: "\f105";
    margin-left: 0.2rem;
}
}

@media (min-width: 1200px) {
  .h1, h1 {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  .answer-container {
  padding: 1rem;
  }

/*.question-container .answer-container.only-hidden.col-12 {
  padding: 0 !important;
}*/

  .control-label {
    margin-bottom: 0.5rem;
  }
    
    .navbar{
    padding: 0.5rem;
    }
    
  .navbar-nav {
    flex-direction: column;
    float: left;
  }
}

@media only screen and (max-device-width: 760px) {
  .question-title-container {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}

@media (min-width:768px) {
  .top-container {
    max-width:720px
  }
}


@media (min-width:992px) {
  .top-container {
    max-width:960px
  }
}
@media (min-width:1200px) {
  .top-container {
    max-width:1140px;
  }
}

/*@media (min-width:1400px) {
  .top-container {
    max-width:1320px;
  }
}*/

@media (min-width: 1400px) {
.container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
max-width: 1140px;
}
}


a[target="_blank"]::after {
    font-family: Fontawesome;
    content: "\f08e"; /* icône lien externe */
    font-weight: 500; /* solide mais tu peux mettre 400 pour plus fin */
    font-size: 0.85em;
    opacity: 0.8;
    margin-right: 0.35rem;
    margin-left: 0.35rem;
    position: relative;
}

.display-none {
  display: none;
}

/* --------------------------------------------------
   ADMIN
-------------------------------------------------- */


#theme-options-tabs .nav-item:nth-child(2) {
  display: none !important;
}

button.nav-link.tab_action_hide_on_inherit {
    display: none !important;
}

#theme-options-tabs > li:nth-child(2) {
  display: none !important;
}

#theme-options-tabs > li:nth-child(3) {
  visibility: hidden !important;
}


/* --------------------------------------------------
   IMAGE
-------------------------------------------------- */


/* 1. Empêcher les images de déborder du questionnaire */
#limesurvey, 
#limesurvey .survey-wrapper,
#limesurvey .question-container {
  overflow: hidden;
}

/* 2. Rendre les images responsives et contenues */
#limesurvey img {
  max-width: 100%;
  height: auto;
  /*display: block;*/
  margin: 0 auto;          /* centre l'image */
}

/* 3. Si l'image est en fond dans un bloc spécifique */
#limesurvey .question-container .some-image-class {
  background-size: contain;   /* l'image reste entièrement visible */
  background-repeat: no-repeat;
  background-position: center;
}

