/*
Design by CeUf - Modernized
*/

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f4f6f9;
    /* Light gray background */
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 0;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: none;
}

hr {
    border: 0;
    border-top: 1px solid #ddd;
    margin: 20px 0;
}

/* Layout Containers */
#main {
    width: 100%;
    max-width: 100%;
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#main2,
#main3 {
    width: 100%;
    background: none;
    padding: 0;
    flex: 1;
}

/* Header - Professional Design */
#header {
    width: 100%;
    background: #2b84be;
    color: #fff;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#logo {
    height: 35px;
    min-height: 35px;
    background: none;
    padding: 5px 20px;
    display: flex;
    align-items: center;
    position: relative;
}

/* User info at top-right */
#logo span {
    position: absolute;
    top: 3px;
    right: 20px;
    font-size: 10px;
    color: #fff;
}

#logo span a {
    color: #fff;
    font-weight: 500;
    margin-left: 5px;
}

#logo span a:hover {
    color: #d4e9f7;
}

/* Logo/Brand at top-left */
#logo img {
    height: 28px;
    width: auto;
    position: absolute;
    left: 20px;
    top: 4px;
}

/* Title text at bottom-right */
#logo h2 {
    position: absolute;
    bottom: 5px;
    right: 20px;
    font-size: 11px;
    font-weight: 400;
    color: #87ceeb;
    margin: 0;
    letter-spacing: 0.3px;
}

#logo h1 {
    font-size: 18px;
    color: #fff;
    margin: 0;
    font-weight: 600;
    letter-spacing: 1px;
}

#logo h1 a {
    color: #fff;
}

#logo .user-info {
    text-align: right;
    color: #b0c4de;
    font-size: 11px;
}

/* Navigation Menu */
/* Navigation Menu */
#menu {
    width: 100%;
    height: auto;
    background: #34495e;
    /* Slightly lighter navy */
    padding: 0;
    border-bottom: 4px solid #3498db;
}

#menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    /* Center menu items */
}

#menu li {
    display: block;
}

#menu a {
    display: block;
    padding: 15px 25px;
    text-decoration: none;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: #ecf0f1;
    text-transform: uppercase;
    transition: background 0.3s ease, color 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

#menu a:hover {
    background: #18181a;
    color: #fff;
}

/* Content Area */
#content {
    width: 100%;
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Specific Classes Mapping */
/* Specific Classes Mapping */
.title {
    background: transparent !important;
    color: #1a252f !important;
    padding: 10px 0;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    border: none !important;
    margin-bottom: 15px;
    text-shadow: none !important;
}

/* Main Form Titles & Sidebar Titles (Blue Banner) */
/* Main Form Titles & Sidebar Titles (Blue Banner) */
/* Main Form Titles & Sidebar Titles (Menu Style) */
.st1 .title,
.st3 .title,
#st31 h2.title,
#st11 .st1 .title {
    /* Using the exact style of the menu items if possible, or a matching solid/gradient */
    /* Based on analysis, #menu usually has #34495e or similar in this theme, or it's the blue button style */
    background: #34495e !important;
    /* Start with this dark blue/slate common in the theme */
    background: linear-gradient(to bottom, #34495e 0%, #2c3e50 100%) !important;
    /* Adding slight gradient for depth */

    color: #fff !important;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
    margin-top: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.st1 .title span,
.st3 .title span,
#st31 h2.title span,
#st11 .st1 .title span {
    color: #fff !important;
}

.st1 .title img,
.st3 .title img,
#st31 h2.title img,
#st11 .st1 .title img {
    filter: none !important;
    /* FORCE original colors */
    opacity: 1 !important;
}


.st1 .title span,
.st3 .title span {
    color: #fff !important;
}

.st1 .title img,
.st3 .title img {
    filter: brightness(0) invert(1);
    /* Make icons white */
}

/* Ensure h2 titles in st3 have correct spacing */
h2.title {
    margin: 0;
    line-height: normal;
}

/* Re-styling the dashboard icons bar */
div.barre {
    border: none !important;
    background: #fff;
    padding: 4px 20px;
    margin-bottom: 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    /* Push items apart */
    align-items: center;
    flex-wrap: nowrap;
    /* Prevent wrapping */
    gap: 0;
}

div.barre table {
    width: auto !important;
    float: none !important;
    margin: 0;
}

/* Home icon container */
div.barre>span {
    float: none !important;
    margin-left: auto !important;
    /* Force to right */
    display: flex;
    align-items: center;
}

div.barre table tr td {
    padding: 0 8px;
    /* Spacing between icons */
    transition: transform 0.2s;
}

div.barre table tr td img {
    width: 32px;
    height: 32px;
}

div.barre table tr td:hover {
    border: none !important;
    background: transparent !important;
    transform: scale(1.1);
    cursor: pointer;
}

/* Boxes/Containers */
.st1,
.st3 {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    margin-bottom: 20px;
    width: 100%;
    /* Force full width preference */
    float: none;
}

#st11,
#st31 {
    width: 100%;
    float: none;
    display: block;
}

/* Force grid layout for dashboard if possible, or flex */
#cent {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

#st11 {
    flex: 3;
    min-width: 600px;
}

#st31 {
    flex: 1;
    min-width: 300px;
}


/* Inputs and Textareas Global */
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 14px;
    color: #495057;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    width: 100%;
    /* Full width inputs by default inside cells */
    max-width: 400px;
    /* But don't get too wide */
}

input:focus,
textarea:focus,
select:focus {
    border-color: #3498db;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Footer */
#footer {
    background: #2c3e50;
    color: #bdc3c7;
    padding: 20px;
    text-align: center;
    margin-top: auto;
    /* Push to bottom */
    font-size: 13px;
    height: auto;
}

#footer a {
    color: #fff;
    text-decoration: underline;
}

/* Utility / Legacy Overrides */
.nbr {
    text-align: right;
}

img {
    border: 0;
    vertical-align: middle;
}

/* Calendar Widget override */
#calendar {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#calendar table {
    width: 100%;
    border-collapse: collapse;
}

/* Actualité ticker */
marquee {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
}

/* Remove legacy backgrounds */
#page,
.page2,
#content .top,
#content .title,
#bot_tb,
#bg {
    background: none;
}

/* ========================================
   AUTHENTICATION PAGE STYLES
   ======================================== */

/* Auth page full-screen centered layout */
body.auth-page {
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 50%, #34495e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Login container (#tib) */
#tib {
    margin: 0 auto !important;
    border: none !important;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 0;
    overflow: hidden;
    width: 450px !important;
    max-width: 90vw;
}

#tib tr td,
#tib tr th {
    padding: 15px 25px;
    border: none;
}

#tib .title {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-align: center !important;
    letter-spacing: 1px;
    padding: 20px !important;
    text-transform: uppercase;
}

#tib .title img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

#tib input[type="text"],
#tib input[type="password"] {
    width: 100% !important;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #f8f9fa;
}

#tib input[type="text"]:focus,
#tib input[type="password"]:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15);
    background: #fff;
    outline: none;
}

#tib input[type="submit"] {
    width: 100%;
    padding: 14px 30px;
    background: linear-gradient(135deg, #27ae60 0%, #219150 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

#tib input[type="submit"]:hover {
    background: linear-gradient(135deg, #219150 0%, #1e8449 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

#tib td[align="right"] {
    text-align: left !important;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

#msg {
    color: #e74c3c !important;
    font-weight: bold;
    font-size: 13px;
    text-align: center;
    margin-bottom: 10px;
}

/* ========================================
   IMPROVED HEADER STYLES
   ======================================== */

#content {
    width: 100%;
    padding: 0;
    max-width: 100%;
    margin: 0;
}

#logo {
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%) !important;
    min-height: 70px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#logo img {
    height: 50px;
    width: auto;
}

#logo h2 {
    color: #ecf0f1;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-align: right;
    flex: 1;
    margin: 0 20px;
}

#logo span {
    color: #ecf0f1;
    font-size: 13px;
}

#logo span a {
    color: #3498db;
    font-weight: 600;
}

#logo span a:hover {
    color: #fff;
    text-decoration: underline;
}

.lnkLogout {
    color: #e74c3c !important;
    font-weight: 600 !important;
}

.lnkLogout:hover {
    color: #c0392b !important;
}

/* ========================================
   IMPROVED FORM ORDERING / FILTER BARS
   ======================================== */

/* Filter/Search bars */
div.barre {
    border: none !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    padding: 4px 20px;
    margin: 0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Form filter tables */
table.formulaire {
    width: auto !important;
    max-width: 100%;
    float: none !important;
    margin: 0;
}

/* Inline form elements */
table.formulaire td,
table.formulaire th {
    padding: 8px 12px;
    vertical-align: middle;
}

/* Button bar for forms */
table.formulaire tr th:first-child {
    background: #34495e;
    border-radius: 8px 8px 0 0;
}

/* Action buttons styling */
input[type="button"][value="IMPRIMER"],
input[type="button"][value="NOUVEAU"],
input[type="button"][value="RETOUR"],
input[type="button"][value="GESTION RÉSERVATION"] {
    padding: 12px 24px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    margin: 5px;
}

input[type="button"][value="NOUVEAU"] {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
    color: #fff !important;
}

input[type="button"][value="IMPRIMER"] {
    background: linear-gradient(135deg, #27ae60 0%, #219150 100%) !important;
    color: #fff !important;
}

input[type="button"][value="RETOUR"] {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%) !important;
    color: #fff !important;
}

input[type="button"][value="GESTION RÉSERVATION"] {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%) !important;
    color: #fff !important;
}

/* Search form inputs */
table.formulaire input[type="text"],
table.formulaire select {
    min-width: 150px;
}

/* ========================================
   SIDEBAR STYLING (Calendar, Quick Links)
   ======================================== */

#st31 {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    max-width: 320px;
}

#st31 .st3 {
    margin-bottom: 20px;
    border: none;
    box-shadow: none;
}

/* Removed conflicting #st31 h2.title block */

#st31 .back {
    padding: 15px;
}

#st31 .back ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#st31 .back ul li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

#st31 .back ul li:last-child {
    border-bottom: none;
}

#st31 .back ul li a {
    color: #3498db;
    font-size: 13px;
    transition: all 0.2s;
    display: block;
}

#st31 .back ul li a:hover {
    color: #2980b9;
    padding-left: 5px;
}

/* Date/Time display */
.ft {
    font-size: 24px;
    font-weight: 300;
    color: #2c3e50;
    text-align: center;
    display: block;
}

/* ========================================
   MAIN CONTENT AREA IMPROVEMENTS
   ======================================== */

#main3 {
    padding: 0 20px 20px 20px;
}

.middle_back {
    padding: 20px !important;
    background: #fff;
}

#st11 {
    flex: 1;
    min-width: 0;
}

.st1 {
    border-radius: 12px;
    overflow: hidden;
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.st1 .title {
    background: transparent !important;
    padding: 15px 20px;
    font-size: 15px;
    border-radius: 0;
    margin-bottom: 0;
    color: #1a252f !important;
    text-shadow: none !important;
}

.st1 .title a {
    color: #f1f4f7 !important;
}

.st1 .title img {
    float: right;
    margin-top: -5px;
}

/* ========================================
   MODERN GLASSMORPHISM LOGIN PAGE
   ======================================== */

body.login-page {
    background: url('../images/png/auth-bg.png') no-repeat center center fixed !important;
    background-size: cover !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    margin: 0 !important;
    overflow: hidden !important;
}

body.login-page #content,
body.login-page #main,
body.login-page #main2,
body.login-page #main3 {
    background: transparent !important;
    border: none !important;
    width: 100% !important;
    height: 100vh !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
}

/* Hide header text/logo on login page for clean look */
body.login-page #logo {
    display: none !important;
}

.login-card {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
    padding: 40px !important;
    width: 380px !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37) !important;
    margin: 0 !important;
    border-collapse: separate !important;
}

.login-card tr,
.login-card td {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    display: block !important;
    width: 100% !important;
}

.glass-title {
    color: #fff !important;
    font-size: 32px !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin-bottom: 30px !important;
    letter-spacing: 1px !important;
    font-family: 'Roboto', sans-serif !important;
}

.login-card input[type="text"],
.login-card input[type="password"] {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50px !important;
    padding: 15px 25px !important;
    color: #fff !important;
    width: 100% !important;
    margin-bottom: 20px !important;
    font-size: 15px !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
}

.login-card input[type="text"]:focus,
.login-card input[type="password"]:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1) !important;
}

.login-card input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.login-card input[type="submit"] {
    background: #fff !important;
    color: #3d3d3d !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 15px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    width: 100% !important;
    cursor: pointer !important;
    margin-top: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.login-card input[type="submit"]:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
}

#msg {
    color: #ff7675 !important;
    font-size: 14px !important;
    text-align: center !important;
    margin-bottom: 10px !important;
    font-weight: 500 !important;
}

/* Validation colors for glassmorphism */
.textfieldRequiredMsg,
.passwordRequiredMsg {
    color: #ff7675 !important;
    display: block !important;
    font-size: 12px !important;
    margin-top: -15px !important;
    margin-bottom: 15px !important;
    text-align: left !important;
    padding-left: 20px !important;
}

/* ========================================
   MODERN LOGIN PAGE STYLES
   ======================================== */

.login-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: none !important;
    margin-top: 60px;
    margin-bottom: 60px;
    border-collapse: separate !important;
    overflow: hidden;
    width: 450px !important;
    /* Slightly wider for better spacing */
}

/* Header of the Login Card */
.login-card tr:first-child td {
    background: #2980b9 !important;
    /* Professional Blue */
    color: #fff !important;
    font-family: 'Roboto', 'Segoe UI', sans-serif !important;
    font-size: 18px;
    font-weight: 500;
    text-transform: uppercase;
    padding: 20px 25px !important;
    letter-spacing: 1px;
    text-align: center !important;
    background-image: none !important;
    border-bottom: 4px solid #1f618d;
}

.login-card tr:first-child td img {
    vertical-align: middle;
    margin-right: 15px;
    filter: brightness(0) invert(1);
    /* Make icon white */
    width: 24px;
    height: auto;
}

/* Form Body */
.login-card td {
    padding: 15px 25px;
    color: #34495e;
    font-size: 14px;
    background: #fff;
}

/* Labels */
.login-card td[align="right"] {
    font-weight: 600;
    color: #555;
    padding-right: 15px;
}

/* Inputs */
.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dfe6e9;
    border-radius: 4px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    outline: none;
    font-size: 14px;
    box-sizing: border-box;
    /* IMPORTANT for padding */
}

.login-card input[type="text"]:focus,
.login-card input[type="password"]:focus {
    border-color: #3498db;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Submit Button Container */
.login-card tr:last-child td {
    padding: 20px 25px;
    background: #f1f2f6;
    /* Light gray footer */
    border-top: 1px solid #eee;
}

/* Submit Button */
.login-card input[type="submit"] {
    background: #27ae60;
    /* Success Green */
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    float: none !important;
    display: block;
    width: 100%;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(39, 174, 96, 0.2);
}

.login-card input[type="submit"]:hover {
    background: #2ecc71;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

/* Error Message */
#msg {
    color: #e74c3c;
    font-size: 13px;
    margin-bottom: 10px;
    text-align: center;
    width: 100%;
    float: none !important;
}

/* Validation Stars */
.textfieldRequiredMsg,
.passwordRequiredMsg {
    color: #e74c3c;
    font-size: 16px;
    margin-left: 5px;
    vertical-align: middle;
}