/*
Theme Name: Airfact
Theme URI: http://airfact.fr
Author: OlivdeViv + AI
Author URI: http://airfact.fr
Description: A basic custom WordPress theme.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: airfact.fr
*/

/* Root Variables */
:root {
    --primary-color: #007b38;
    --secondary-color: #ff9414;
    --background-color: #f4f7f9;
    --white-background: #ffffff;
    --text-color: #333;
    --text-muted-color: #555;
    --border-color: #e3e6ea;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-color-strong: rgba(0, 0, 0, 0.2);
    --font-family: 'Arial', sans-serif;
    --font-size-base: 1rem;
    --border-radius: 5px;
    --transition-time: 0s;
    --side-header-width: 220px;
}

/* General Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    color: var(--text-color);
    font-family: var(--font-family);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
}

a {
    color: var(--text-color);
    text-decoration: none;
}

h1 {
    color: var(--primary-color);
    text-align: left;
}

h2 {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
}

h3 {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 700;
}

h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 400;
}

.hidden {
    display: none;
}
.flex {
    display: flex;
}

.audio-player-container {
  background-color: #f0f0f0;
  padding: 10px;
  border: 2px solid #ccc;
  border-radius: 5px;
  max-width: 400px;
  margin: 20px auto;
}


audio {
  width: 100%;
  max-width: 300px; /* Set the max width */
  margin: 20px auto;
  display: block;
}


/* Navigation */

/* Full-page overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 220px;
    width: calc(100% - 220px);
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent background */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Loading Spinner */
.loading-spinner {
    display: block;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%; /* Full height including padding */
    width: var(--side-header-width);
    background-color: var(--primary-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
}

.header-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-top {
    padding-left: var(--side-header-width);
}

.logo-container {
    width:100%;
    height: 80px;
    text-align: center;
}

.logo-container img {
    max-width: 90%;
}

.main-navigation {
    width: 100%;
    flex-grow: 1;
}

.menu-toggle {
    display: none;
    background-color: var(--secondary-color);
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    cursor: pointer;
    margin-bottom: 20px;
}

.menu-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.menu-group {
    margin-bottom: 20px;
}

.menu-group h3 {
    color: white;
    font-size: 18px;
    margin-bottom: 10px;
    padding-left: 10px;
    border-left: 3px solid white;
}

.menu-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-group ul li {
    margin-bottom: 10px;
}

.menu-group ul li a {
    color: white;
    width: fit-content;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-time);
}

.menu-group ul li a:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Active (Click) Effect */
.menu-group ul li a:active {
    transform: scale(0.95); /* Slightly reduce the size on click */
    background-color: var(--secondary-color); /* Change to a different color if needed */
}

.active-menu {
    background-color: var(--primary-color);
    color: white;
}

/* General Styles */

input, select {
    width: 100%;
    padding: 10px 15px;
    font-size: 16px;
    box-shadow: 0 0 0px 1px #ccc;
    border-radius: var(--border-radius);
    transition: border-color var(--transition-time) ease;
    outline: none;
    border:none;
}

input:focus,input:focus-visible,select:focus,select:focus-visible {
    border: none;
    box-shadow: 0 0 0px 1px var(--primary-color);
    outline: none;
    border: none;
}

button,input[type="submit"],.button {
    color: white;
    width: fit-content;
    height: fit-content;
    text-decoration: none;
    padding: 10px 15px;
    display: inline-block;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-time);
    background-color: var(--primary-color);
    border: none;
    font-size: 16px;
    cursor: pointer;
}

button:hover,input[type="submit"]:hover,.button:hover {
    background-color: var(--secondary-color);
}

button:active,input[type="submit"]:active,.button:active {
    transform: scale(0.95); /* Slightly reduce the size on click */
    background-color: var(--secondary-color); /* Change to a different color if needed */
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: #007b38;
    box-shadow: 0 0 0px 0px #ccc;
}

.form-group-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 2fr));
    gap: 20px;
}

.form-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.form-group label {
    display: block;
    color: var(--text-muted-color);
    font-size: 14px;
    margin-bottom: 8px;
}


/* Content Wrapper */
.content-wrapper {
    display: flex;
    flex-wrap: nowrap;
    margin-left: var(--side-header-width); /* Ensure this matches the width of your side menu */
    padding: 20px;
    box-sizing: border-box;
}

/* Main Content Area */
.content-area {
    flex: 1;
    padding: 20px;
}

/* Primary Sidebar */
.primary-sidebar {
    width: 20%;
    margin-left: 20px; /* Space between the content and the sidebar */
}

/* Responsive Styles for Smaller Screens */
@media (max-width: 768px) {
    .site-header {
        width: 100%;
        height: auto;
        position: relative;
        padding: 10px 15px;
        box-shadow: none;
    }

    .menu-toggle {
        display: block;
    }

    .menu-container {
        display: none;
        width: 100%;
    }

    .menu-container.active {
        display: flex;
        flex-direction: column;
    }

    .content-wrapper {
        flex-direction: column;
        margin-left: 0;
    }

    .primary-sidebar {
        margin-left: 0;
        margin-top: 20px;
    }

    .content-area {
        margin-left: 0;
    }
}

/* Additional Aesthetic Touches */
.site-header::-webkit-scrollbar {
    width:2px;
}

.site-header::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: var(--border-radius);
}

.site-header::-webkit-scrollbar-track {
    background-color: var(--secondary-color);
}

/* Stats */

.stats-page {
    max-width: 800px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}

.stats-page h1, .stats-page h3 {
    text-align: center;
    margin-bottom: 20px;
}

.stats-section {
    margin-bottom: 30px;
    margin-top: 30px;
}

.stats-section table {
    width: 100%;
    border-collapse: collapse;
}

#chart_total_ventes, #chart_total_pax, #chart_prix_moyen {
    width: 100%;
    height: 500px;
}


/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

/* Totals Section */
.totals-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.totals-item label {
    font-size: 16px;
    color: var(--text-muted-color);
}

.totals-item span {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-color);
}

#subtotal, #tax, #total {
    font-weight: bold;
    font-size: 16px;
    color: var(--primary-color);
}

/* Modal Styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1;
    right: 0;
    top: 0;
    width: calc(100% - 250px);
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5); /* Dark overlay */
}

.modal-content {
    background-color: #fff;
    padding: 15% auto;
    padding: 20px;
    width: 100%;
    min-height: 100%;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: var(--text-color);
    text-decoration: none;
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Pagination */
.pagination {
    margin-top: 20px;
}

.pagination a {
    margin: 0 5px;
    padding: 5px 10px;
    background-color: #f2f2f2;
    text-decoration: none;
    border-radius: 3px;
}

.pagination a.active {
    background-color: var(--secondary-color);
    color: #fff;
}

/* Search Form */
.search-form-container {
    width: 100%;
}

.search-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}


/* Search Results */
.search-results-container {
    margin-top: 20px;
    width: 100%;
}

.search-results-container table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    word-wrap: break-word;
}

.search-results-container th,
.search-results-container td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
    white-space: normal; /* Allow text to wrap */
}

.search-results-container th {
    background-color: #f4f4f4;
    font-weight: bold;
}

.search-results-container tr:hover {
    background-color: #f9f9f9;
}

/* Ensure numbers are formatted correctly */
.numeric-cell {
    text-align: right;
    white-space: nowrap; /* Keep numbers on one line */
}

/* Clients Invoices */
.clients-invoices-container {
    margin: 20px 0;
}

.clients-invoices-container h2 {
    margin-bottom: 20px;
}

.clients-invoices-table {
    width: 100%;
    border-collapse: collapse;
}

.clients-invoices-container form {
    margin-bottom: 20px;
}

/* TTI Content */

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.chart-container {
    padding: 10px;
    background-color: #f4f7f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    .statistics-grid {
        grid-template-columns: 1fr;
    }
}

.tti-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Statistic Blocks */
.stats-blocks {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0px;
}

.stats-block {
    flex: 1;
    min-width: 250px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stats-block.no-background {
    background-color: transparent;
    box-shadow: none;
}

.stats-block h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #007b38;
}

.stats-block p {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
    color: #333;
}

.stats-block small {
    font-size: 14px;
    color: #666;
    display: block;
    margin-top: 10px;
}

/* Best Sellers and Best Points of Sale */
.stats-table-container {
    margin-top: 20px;
}

.stats-table-container h2 {
    margin-bottom: 20px;
    font-size: 28px;
    color: #007b38;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    word-wrap: break-word;
}

th,td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
    white-space: normal; /* Allow text to wrap */
}

th {
    background-color: #f4f4f4;
    font-weight: bold;
}

tr:hover {
    background-color: #f9f9f9;
}

/* Ensure numbers are formatted correctly */
.stats-table-container .numeric-cell {
    text-align: right;
    white-space: nowrap; /* Keep numbers on one line */
}


.author-card {
    border-bottom: 1px solid var(--border-color);
}

.author-image img {
    width: 100%;
    max-width: 100px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.author-details p {
    margin: 0 0 10px;
}

.post-container {
    display: flex;
    flex-direction: row;
}

.post-entry {
    background-color: var(--white-background);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow var(--transition-time);
}


.entry-header .entry-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.entry-content {
    margin-top: 20px;
}

.widget {
    margin-bottom: 20px;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    margin-bottom: 10px;
}

.widget ul li a {
    color: var(--text-color);
    text-decoration: none;
    transition: color var(--transition-time);
}

.widget ul li a:hover {
    color: var(--primary-color);
}

.widget .btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--white-background);
    border-radius: var(--border-radius);
    text-decoration: none;
    text-align: center;
    transition: background-color var(--transition-time);
}

.widget .btn:hover {
    background-color: var(--secondary-color);
}

