/*------------------------------------------*/
/* La vache aux yeux bleus - Time - v2.0    */
/* Mobile first : designed for smartphones  */
/*------------------------------------------*/
:root
{
   --sky:        #85D7EC;
   --sky-deep:   #1F9BC4;
   --navy:       #16465A;
   --grass:      #8ED174;
   --grass-deep: #4DAF5E;
   --ink:        #24323A;
   --muted:      #6B7C85;
   --line:       #E4EEF2;
   --card:       rgba(255, 255, 255, 0.96);
   --danger:     #E5484D;
   --radius:     22px;
   --shadow:     0 10px 30px rgba(22, 70, 90, 0.16);
}

*
{
   box-sizing: border-box;
   -webkit-tap-highlight-color: transparent;
}

/*-----------------------------------*/
/* Body Background and general style */
/*-----------------------------------*/
body
{
   margin: 0;
   min-height: 100vh;
   font-family: "Nunito", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
   font-size: 16px;
   line-height: 1.4;
   color: var(--ink);
   background-color: var(--sky);
   background-image: url("lvayb_background.png");
   background-position: center bottom;
   background-repeat: no-repeat;
   background-size: cover;
   background-attachment: fixed;
}

/* Tablet / desktop : the cow stays complete, the grass goes on both sides */
@media (min-width: 700px)
{
   body
   {
      background-image: url("lvayb_background.png"), linear-gradient(to top, var(--grass) 0, var(--grass) 16vh, var(--sky) 16vh);
      background-size: auto 100vh, cover;
   }
}

/* Quirks mode : the tables don't inherit the font */
table
{
   font-size: inherit;
   color: inherit;
   border-collapse: separate;
}

table, th, td
{
   background-color: transparent;
   border: 0;
}

/*-----*/
/* DIV */
/*-----*/
#div_top
{
   position: fixed;
   top: 0;
   left: 0;
   right: 0;
   height: 64px;
   z-index: 2;
   display: flex;
   align-items: center;
   padding: 0 16px;
   background: rgba(255, 255, 255, 0.82);
   -webkit-backdrop-filter: blur(14px);
   backdrop-filter: blur(14px);
   box-shadow: 0 2px 18px rgba(22, 70, 90, 0.12);
}

#div_user
{
   position: fixed;
   top: 0;
   right: 12px;
   height: 64px;
   z-index: 3;
   display: flex;
   align-items: center;
}

#div_main
{
   position: absolute;
   top: 84px;
   left: 0;
   right: 0;
   width: 100%;
   max-width: 560px;
   margin: 0 auto;
   padding: 0 14px 110px 14px;
   z-index: 1;
}

#div_submain
{
   position: relative;
   left: 0;
   z-index: 2;
}

#div_bottom
{
   position: fixed;
   left: 0;
   right: 0;
   bottom: 0;
   z-index: 2;
   padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
   text-align: center;
   background: rgba(255, 255, 255, 0.55);
   -webkit-backdrop-filter: blur(10px);
   backdrop-filter: blur(10px);
}

/*--------*/
/* Header */
/*--------*/
.brand
{
   display: flex;
   align-items: center;
   gap: 10px;
   min-width: 0;
   padding-right: 120px;
}

.brand_logo
{
   flex: 0 0 auto;
   width: 42px;
   height: 42px;
   border-radius: 50%;
   background: white url("../icones/lvayb_logo.png") 50% 8% / 175% auto no-repeat;
   box-shadow: 0 0 0 3px var(--sky), 0 4px 10px rgba(22, 70, 90, 0.2);
}

#div_top h1
{
   margin: 0;
   font-family: "Fredoka", "Nunito", sans-serif;
   font-size: 17px;
   font-weight: 600;
   line-height: 1.05;
   color: var(--navy);
   white-space: nowrap;
}

/* title on 2 lines, like a logo */
#div_top h1 span
{
   display: block;
   font-size: 20px;
   color: var(--sky-deep);
}

#div_user a
{
   display: inline-flex;
   align-items: center;
   gap: 8px;
   padding: 5px 14px 5px 5px;
   border-radius: 999px;
   background: white;
   box-shadow: 0 3px 12px rgba(22, 70, 90, 0.15);
   font-size: 15px;
}

#div_user a::before
{
   content: "";
   width: 30px;
   height: 30px;
   border-radius: 50%;
   background: var(--grass) url("../icones/account.png") center / 20px no-repeat;
}

#div_user h2
{
   margin: 0;
   font-family: "Nunito", sans-serif;
   font-size: 15px;
   font-weight: 800;
   color: var(--navy);
   max-width: 110px;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
}

/*-------------*/
/* Animations  */
/*-------------*/
@keyframes rise
{
   from { opacity: 0; transform: translateY(14px); }
   to   { opacity: 1; transform: none; }
}

.panel, .menu, .msg
{
   animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.menu       { animation-delay: 0.06s; }
#div_submain .panel { animation-delay: 0.12s; }

/*--------------*/
/* Cards        */
/*--------------*/
.panel
{
   width: 100%;
   margin: 0 0 16px 0;
   padding: 10px 8px;
   border-spacing: 0;
   background: white;
   border-radius: var(--radius);
   box-shadow: var(--shadow);
}

.panel td
{
   padding: 8px 12px;
   vertical-align: middle;
}

/* Card title */
.panel h2
{
   margin: 4px 0 2px 0;
   font-family: "Fredoka", "Nunito", sans-serif;
   font-size: 24px;
   font-weight: 600;
   color: var(--navy);
}

/*-------------------*/
/* Summary (balance) */
/*-------------------*/
.panel.panel_summary
{
   position: relative;
   overflow: hidden;
   padding: 14px 10px;
   color: white;
   background: linear-gradient(135deg, #1F9BC4 0%, #4FC0DF 55%, #8ED174 130%);
   box-shadow: 0 14px 34px rgba(31, 155, 196, 0.35);
}

.panel.panel_summary::after
{
   content: "";
   position: absolute;
   right: -40px;
   top: -40px;
   width: 160px;
   height: 160px;
   border-radius: 50%;
   background: rgba(255, 255, 255, 0.14);
   pointer-events: none;
}

.panel_summary h2
{
   margin: 0;
   font-family: "Nunito", sans-serif;
   font-size: 13px;
   font-weight: 800;
   letter-spacing: 0.08em;
   text-transform: uppercase;
   color: rgba(255, 255, 255, 0.85);
}

.panel_summary h3
{
   margin: 0;
   text-align: right;
   font-family: "Fredoka", "Nunito", sans-serif;
   font-size: 34px;
   font-weight: 600;
   line-height: 1.1;
   letter-spacing: 0;
   text-transform: none;
   color: white;
   white-space: nowrap;
}

.panel_summary tr + tr h3
{
   font-size: 22px;
   color: rgba(255, 255, 255, 0.92);
}

/*------*/
/* Menu */
/*------*/
.menu
{
   width: 100%;
   margin: 0 0 16px 0;
   border-spacing: 10px 0;
   table-layout: fixed;
   margin-left: -10px;
   width: calc(100% + 20px);
}

.menu td
{
   padding: 0;
   text-align: center;
}

.menu_tile
{
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   gap: 8px;
   min-height: 104px;
   padding: 14px 6px 12px 6px;
   border-radius: 20px;
   background: var(--card);
   -webkit-backdrop-filter: blur(12px);
   backdrop-filter: blur(12px);
   box-shadow: var(--shadow);
   cursor: pointer;
   transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
   user-select: none;
}

.menu_tile img
{
   width: 44px;
   height: 44px;
   transition: transform 0.2s ease;
}

.menu_tile span
{
   font-size: 13px;
   font-weight: 800;
   line-height: 1.15;
   color: var(--navy);
}

.menu_tile:hover img
{
   transform: scale(1.08) rotate(-4deg);
}

.menu_tile:active
{
   transform: scale(0.96);
}

.menu_tile.active
{
   background: white;
   box-shadow: 0 0 0 3px var(--grass), var(--shadow);
}

/*-----------------*/
/* Forms (stacked) */
/*-----------------*/
form .panel
{
   padding: 14px 6px 10px 6px;
}

form .panel tr
{
   display: flex;
   flex-wrap: wrap;
   align-items: center;
}

form .panel td
{
   display: block;
   flex: 1 1 100%;
   padding: 4px 12px;
}

form .panel tr:first-child td
{
   padding-bottom: 8px;
}

/* icon + field on the same line (login) */
form .panel td:has(> img)
{
   flex: 0 0 auto;
   padding-right: 0;
}

form .panel td:has(> img) + td
{
   flex: 1 1 0;
   min-width: 0;
}

form .panel td > img
{
   display: block;
   width: 40px;
   height: 40px;
   padding: 7px;
   border-radius: 14px;
   background: #EEF7FA;
}

/* captcha : answer and hint side by side */
form .panel table
{
   width: 100%;
   border-spacing: 0;
}

form .panel table tr
{
   flex-wrap: nowrap;
   gap: 10px;
}

form .panel table td
{
   padding: 0;
   flex: 0 0 auto;
}

form .panel table td:first-child
{
   flex: 0 0 110px;
}

form .panel h4 center
{
   text-align: left;
}

/* buttons row */
form .panel td[colspan]:has(.button)
{
   display: flex;
   flex-wrap: wrap;
   justify-content: center;
   gap: 10px;
   padding-top: 12px;
   font-size: 0;
}

/* buttons side by side share the width */
form .panel td[colspan] .button
{
   flex: 1 1 0;
   min-width: 0;
   max-width: 260px;
   padding: 10px 16px;
   text-align: center;
   line-height: 1.15;
}

form .panel tr:has(.button) + tr:has(.button) td
{
   padding-top: 2px;
}

/*----------------------*/
/* Form configuration   */
/*----------------------*/
.input
{
   display: block;
   width: 100%;
   margin: 0;
   padding: 13px 15px;
   font-family: inherit;
   font-size: 17px;
   font-weight: 600;
   color: var(--ink);
   background-color: #F4F9FB;
   border: 2px solid var(--line);
   border-radius: 14px;
   outline: none;
   transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
   -webkit-appearance: none;
   appearance: none;
}

.input:focus
{
   background-color: white;
   border-color: var(--sky-deep);
   box-shadow: 0 0 0 4px rgba(133, 215, 236, 0.45);
}

select.input
{
   padding-right: 42px;
   background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%231F9BC4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
   background-repeat: no-repeat;
   background-position: right 16px center;
}

textarea.input
{
   resize: vertical;
   min-height: 110px;
   line-height: 1.4;
}

input[type="date"].input
{
   min-height: 52px;
}

/* field in error (inline style from the PHP) */
.input[style*="background-color"]
{
   background-color: #FFF1F1 !important;
   border-color: var(--danger);
}

/*---------*/
/* Buttons */
/*---------*/
.button
{
   display: inline-flex;
   align-items: center;
   justify-content: center;
   min-height: 52px;
   min-width: 150px;
   padding: 12px 28px;
   font-family: "Fredoka", "Nunito", sans-serif;
   font-size: 18px;
   font-weight: 600;
   color: white;
   text-decoration: none;
   background: linear-gradient(135deg, #8ED174 0%, #4DAF5E 100%);
   border: 0;
   border-radius: 999px;
   box-shadow: 0 8px 20px rgba(77, 175, 94, 0.38);
   cursor: pointer;
   transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.button:hover
{
   color: white;
   filter: brightness(1.05);
   transform: translateY(-2px);
   box-shadow: 0 12px 24px rgba(77, 175, 94, 0.42);
}

.button:active
{
   transform: scale(0.97);
}

/* secondary button (return, cancel) */
a.button,
.button.button_secondary
{
   color: var(--sky-deep);
   background: white;
   box-shadow: inset 0 0 0 2px var(--line), 0 4px 12px rgba(22, 70, 90, 0.10);
}

a.button:hover,
.button.button_secondary:hover
{
   color: var(--navy);
   box-shadow: inset 0 0 0 2px var(--sky), 0 6px 16px rgba(22, 70, 90, 0.14);
}

/*-------------*/
/* Links       */
/*-------------*/
a
{
   color: var(--sky-deep);
   text-decoration: none;
}

a:hover
{
   color: var(--navy);
}

a.bottom
{
   font-size: 11px;
   font-weight: 700;
   color: var(--navy);
   opacity: 0.75;
}

a.button_return
{
   font-size: 16px;
   color: var(--grass-deep);
}

/*------------------*/
/* History (table)  */
/*------------------*/
#div_submain > .panel
{
   padding: 10px 6px;
}

#div_submain > .panel tr:nth-child(2) td
{
   padding-bottom: 6px;
   border-bottom: 2px solid var(--line);
}

#div_submain > .panel tr:nth-child(n+3) td
{
   border-bottom: 1px solid var(--line);
}

#div_submain > .panel tr:last-child td
{
   border-bottom: 0;
}

/*------------*/
/* Text style */
/*------------*/
h1, h2, h3, h4, h5, h6
{
   margin: 0;
}

h3
{
   font-size: 12px;
   font-weight: 800;
   letter-spacing: 0.08em;
   text-transform: uppercase;
   color: var(--muted);
}

h4
{
   margin: 6px 0 2px 2px;
   font-size: 14px;
   font-weight: 800;
   color: var(--grass-deep);
}

h5
{
   font-size: 16px;
   font-weight: 600;
   color: var(--ink);
}

/* history : positive / negative hours (inline colors from the PHP) */
h5[style*="color:green"]
{
   color: var(--grass-deep) !important;
   font-weight: 800;
}

h5[style*="color:red"]
{
   color: var(--danger) !important;
   font-weight: 800;
}

h5[style*="line-through"]
{
   opacity: 0.55;
}

h6
{
   font-size: 12px;
   font-weight: 600;
   color: var(--muted);
}

p
{
   font-size: 16px;
   color: var(--ink);
}

/*-------------------------*/
/* Error / success message */
/*-------------------------*/
.msg
{
   display: flex;
   align-items: center;
   gap: 12px;
   margin: 0 0 16px 0;
   padding: 12px 16px;
   border-radius: 18px;
   box-shadow: var(--shadow);
   background: white;
}

.msg img
{
   flex: 0 0 auto;
   width: 34px;
   height: 34px;
}

.msg h2
{
   margin: 0;
   font-size: 16px;
   font-weight: 800;
}

.msg_error
{
   background: #FFF1F1;
   box-shadow: inset 4px 0 0 var(--danger), var(--shadow);
}

.msg_error h2
{
   color: #B4232A;
}

.msg_success
{
   background: #EFFBF1;
   box-shadow: inset 4px 0 0 var(--grass-deep), var(--shadow);
}

.msg_success h2
{
   color: #23743A;
}

/*----------------*/
/* Small screens  */
/*----------------*/
@media (max-width: 370px)
{
   #div_top h1                { font-size: 16px; }
   .brand                     { padding-right: 100px; }
   #div_user h2               { max-width: 70px; }
   .panel_summary h3          { font-size: 28px; }
   .menu_tile span            { font-size: 12px; }
}

/*-------------------------------*/
/* Login : fields with an icon   */
/*-------------------------------*/
.panel h6.subtitle
{
   margin: 2px 0 6px 0;
   font-size: 14px;
   font-weight: 600;
   color: var(--muted);
}

.input.input_user,
.input.input_pwd
{
   padding-left: 52px;
   background-repeat: no-repeat;
   background-position: 15px center;
   background-size: 24px 24px;
}

.input.input_user { background-image: url("../icones/account.png"); }
.input.input_pwd  { background-image: url("../icones/password.png"); }

.input::placeholder
{
   color: #9AACB4;
   font-weight: 600;
}

/*-------------------------------*/
/* Captcha (anti-robot calcul)   */
/*-------------------------------*/
.captcha
{
   margin-top: 6px;
   padding: 12px 14px 10px 14px;
   border-radius: 18px;
   background: linear-gradient(135deg, #EEF9FD 0%, #F1FAEC 100%);
   border: 2px dashed #CBE9F3;
}

.captcha h4
{
   display: flex;
   align-items: center;
   gap: 8px;
   margin: 0 0 10px 0;
   font-size: 13px;
   letter-spacing: 0.04em;
   text-transform: uppercase;
   color: var(--sky-deep);
}

.captcha h4::before
{
   content: "";
   width: 22px;
   height: 22px;
   background: url("../icones/captcha.png") center / contain no-repeat;
}

.captcha_row
{
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   gap: 8px;
}

.captcha_chip
{
   padding: 8px 14px;
   border-radius: 12px;
   background: white;
   box-shadow: 0 3px 10px rgba(22, 70, 90, 0.10);
   font-family: "Fredoka", "Nunito", sans-serif;
   font-size: 20px;
   font-weight: 600;
   color: var(--navy);
}

.captcha_op
{
   font-family: "Fredoka", "Nunito", sans-serif;
   font-size: 24px;
   font-weight: 600;
   color: var(--grass-deep);
}

.input.captcha_input
{
   display: inline-block;
   width: 68px;
   padding: 8px 6px;
   text-align: center;
   font-family: "Fredoka", "Nunito", sans-serif;
   font-size: 22px;
   background-color: white;
   border-color: #CBE9F3;
}

.captcha h6
{
   margin-top: 8px;
   font-size: 12px;
}
