/**
 * styles commun pour les pages web.
 * @version 2024-07_initiale @author CETU-LaurentBEAUJEU
 * @version 2025-07_actuelle @author CETU-LaurentBEAUJEU
 * @licence Propriétaire CETU (Centre d'Etude des TUnnels)
*/


/*
=====   COULEURS DU SITE   =====
*/

:root {
  /* Logo CETU: hsl(248, 32%, 46%)   Initial: hsl(210, 100%, 50%) */
  --cBase: hsl(220, 50%, 50%);
  /* sert uniquement à définir les autres couleurs */
  --cBackground: oklch(from var(--cBase) 100% 0 h);
  --cBackLight: oklch(from var(--cBase) 93% calc(c/3) h);
  --cBackStrong: oklch(from var(--cBase) 65% c h);
  --cFront: oklch(from var(--cBase) 40% c h);
  --cText: oklch(from var(--cBase) 0% 0 h);
  --cAttention: oklch(from var(--cBase) 50% 100% calc(h + 120));
}

/*
=====   NORMALISATION BASIQUE  =====
*/
html, body, div, section, p, span, a, ul, li, table, thead, tbody, tr, th, td, form, fieldset, label, input, select, option, textarea, button {
  box-sizing: border-box;
  background-color: transparent;
  color: inherit;
  font-family: arial, helvetica, sans-serif;
  font-size: 1rem;
  font-weight: normal;
  margin: 0;
  padding: 0;
  text-align: left;
  vertical-align: baseline;
  word-spacing: normal;
  letter-spacing: normal;
  border-collapse: collapse;
  border: none;
  line-height: 1.4rem;
}

html {
  scroll-behavior: auto;
  font-size: 12pt;
}

td, th {
  padding: 1px 3px;
}


/*
###########################################
##   I N T E R F A C E   D U   S I T E   ##
###########################################
*/
/*
=====   BODY + GRILLE   =====
*/
body {
  background-color: var(--cBackground);
  color: var(--cText);
  min-width: 720px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 5px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}

.col-1 {
  grid-column: span 1
}
.col-2 {
  grid-column: span 2;
}
.col-3 {
  grid-column: span 3;
}
.col-4 {
  grid-column: span 4;
}
.col-5 {
  grid-column: span 5;
}
.col-6 {
  grid-column: span 6;
}


@media only screen and (width <=1280px) {
  .grid {
    grid-template-columns: 1fr;
  }
  [class*="col-"] {
    grid-column: span 1;
  }
}

/*
=====   LES TRUCS CLIQUABLES / ACTIF   =====
*/
.active-text {
  color: var(--cFront);
  text-decoration: none;
}
.active-text:hover {
  text-decoration: underline 2px;
}
.active-text:active {
  color: var(--cText);
  text-decoration: underline 2px;
}
.action.active-text {
  font-size: 0.9rem;
  font-weight: bold;
}

/* A SUPPRIMER SI ICONE ACTION EN TEXTE (VOIR AUSSI LISTINCIDENT.PHP) */
.active-icone {
  text-decoration: none;
}
.active-icone:hover {
  text-shadow: 0px 1px var(--cFront), 0px -1px var(--cFront), 1px 0px var(--cFront), -1px 0px var(--cFront);
}
.active-icone:active {
  text-shadow: 0px 1px var(--cBackStrong), 0px -1px var(--cBackStrong), 1px 0px var(--cBackStrong), -1px 0px var(--cBackStrong);
}
.action.active-icone {
  font-size: 1.2rem;
  vertical-align: bottom;
}

.action+.action {
  margin-left: 0.5rem;
}

.bouton {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.1rem;
  padding: 4px 10px 2px 10px;
  border-radius: 5px;
  text-decoration: none;
  color: var(--cBackground);
  background-color: var(--cFront);
  background-image: linear-gradient(5deg, var(--cFront), var(--cBackStrong));
}
.bouton:hover {
  background-image: none;
}
.bouton:active {
  background-image: none;
  background-color: var(--cBackStrong);
}

/*
=====   ERREURS   =====
*/
.error-text {
  color: var(--cAttention) !important;
}

.error-border {
  border-color: var(--cAttention) !important;
  outline: 1px solid var(--cAttention);
}

/*
=====   BANNIERE FIXE   =====
- #stickytop est en position sticky, car avec fixed le scroll horizontal ne fonctionne pas sur l'élément.
- #stickytop::before permet de créer un espace en haut de #stickytop, 
  car margin/padding-top génèrent un decalage lors d'un scroll vertical avec sticky.
*/
#stickytop {
  width: 100%;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 100;
  border-bottom: 2px solid var(--cFront);
  background-color: var(--cBackground);
  box-shadow: 0 8px 2px var(--cBackground);
  #banner {
    display: flex;
    flex-direction: row;
    margin: 0 5px 5px 5px;
    #banner_left {
      width: 100px;
      img {
        width: 90px;
        margin-left: 2px;
      }
      button, a {
        width: 100%;
      }
    }
    #banner_main {
      background-image: url("../img/tunnel.png");
      background-repeat: no-repeat;
      background-position: right top;
      background-size: contain;
      display: flex;
      flex-direction: column;
      width: 100%;
      justify-content: space-between;
      #banner_center {
        text-align: left;

        #banner_bigtitle {
          margin-top: 20px;
          margin-left: 20px;
          font-size: 3rem;
          font-weight: bold;
          color: var(--cBackStrong);
          letter-spacing: 0.2rem;
          word-spacing: 0.2rem;
          text-shadow: 0px 1px var(--cFront), 0px -1px var(--cFront), 1px 0px var(--cFront), -1px 0px var(--cFront);
        }
        #banner_title {
          margin-top: 8px;
          font-size: 1.5rem;
          font-weight: bold;
          white-space: nowrap;
        }
        #banner_info {
          font-family: 'Courier New', Courier, monospace;
          font-size: 1rem;
          margin-left: 10px;
          white-space: nowrap;
        }
      }
      #banner_slidy_right {
        margin-top: 5px;
        display: flex;
        flex-direction: row-reverse;
        align-items: flex-end;
        #field_error_msg {
          margin-right: 10px;
          margin-left: 20px;
          text-align: right;
        }
        button#save {
          margin-left: 20px;
          min-width: 250px;
          text-align: center;
        }
        #form_save_msg {
          font-size: 0.9rem;
          font-weight: bold;
          color: var(--cFront);
        }
      }
    }
  }
}

#stickytop::before {
  content: '';
  display: block;
  height: 5px;
}


/*
=====   DIALOG   =====
*/
dialog {
  padding: 25px;
  border: 3px solid var(--cBackStrong);
  border-radius: 5px;
  box-shadow: 0px 0px 20px var(--cBackLight);
  div {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  button {
    margin-top: 20px;
    font-size: 1rem !important;
    padding: 10px 20px 8px 20px !important;
  }
}

dialog::backdrop {
  background-color: rgb(from var(--cText) r g b / 0.5);
}



/*
#############################
##   F O R M U L A I R E   ##
#############################
*/


fieldset {
  display: inline-block;
  padding: 5px;
  border: 1px solid var(--cBackLight);
  width: fit-content;
  border-radius: 3px;
}

input, select, textarea {
  border: 1px solid var(--cBackLight);
  color: var(--cText);
  background-color: var(--cBackground);
  padding: 2px 5px 1px 5px;
  border-radius: 3px;
}

input[data-type="frnumber"], input[data-type="frdatetime"] {
  padding-bottom: 0px;
}


input[type="radio"] {
  appearance: none;
  border: 2px solid var(--cBackStrong);
  border-radius: 50%;
  width: 1rem;
  height: 1rem;
  vertical-align: -5%;
  margin: 0px 4px 0px 3px;
}

input[type="checkbox"] {
  appearance: none;
  border: 2px solid var(--cBackStrong);
  border-radius: 20%;
  width: 1rem;
  height: 1rem;
  vertical-align: -5%;
  margin: 0px 8px 0px 3px;
}

input:checked {
  border-color: var(--cBackStrong);
  background-color: var(--cBackStrong);
}
input:checked:disabled {
  border-color: var(--cBackStrong);
  background-color: var(--cBackLight);
}

input:hover, select:hover, textarea:hover, fieldset:hover {
  border-color: var(--cFront);
}

input[type="text"]:focus, select:focus, textarea:focus {
  outline: none;
}

input:disabled, select:disabled, textarea:disabled, fieldset:disabled {
  border-color: var(--cBackStrong);
}

fieldset.inactive {
  border-color: var(--cBackStrong);
}

.legend {
  font-weight: bold;
  margin-bottom: 0.2rem;
  white-space: nowrap;
}

.field {
  margin-bottom: 1rem;
}

.field>input, .field>select, .field>fieldset {
  margin-left: 10px;
}

.ident {
  margin-left: 30px;
}

.identbloc {
  margin-left: 5px;
  padding-left: 22px;
  border-left: 3px solid var(--cBackStrong);
}


/*
#######################################
##   S T Y L E S   B A S I Q U E S   ##
#######################################
*/
.left {
  text-align: left;
}
.right {
  text-align: right;
}
.center {
  text-align: center;
}
.large {
  width: 100%;
}
.bold {
  font-weight: bold;
}


th {
  font-size: 0.9rem;
  font-weight: bold;
  background-color: var(--cBackLight);
  text-align: center;
}

.border, table.border th, table.border td {
  border: 1px solid var(--cFront);
}

.title {
  font-size: 1.2rem;
  padding: 5px 0px
}

tbody>tr:hover {
  background-color: rgb(from var(--cAttention) r g b / 0.1);
}

/*
NE SERT PAS/PLUS

.lightBg {
  background-color: var(--colorUI01);
}

.tranparentBg {
  background-color: transparent;
}

.clearfix::after {
  content: ""; clear: both; display: table;
}
*/