* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Tahoma !important;
    background-color: #efefef;
    color: #333;
    padding: 0;
}

/* Barre de navigation */
.navigation-bar {
    background: white;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.nav-container {
    margin: 0;
    padding: 0 20px;
    max-width: none;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: flex-start;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 16px 24px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: #333;
    background-color: #f8f9fa;
}

.nav-link.active {
    color: #006666;
    border-bottom-color: #006666;
    background-color: #f8fbfa;
}

/* Classes pour cacher des onglets selon le contexte */
.nav-item.hidden {
    display: none !important;
}

.nav-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-list {
        flex-wrap: wrap;
    }
    
    .nav-link {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .container {
        grid-template-columns: 1fr;
        max-width: 300px;
    }
    
    .card {
        width: 100%;
    }
}

.container {
    display: grid;
    grid-template-columns: 240px 240px;
    grid-template-rows: auto auto auto auto auto;
    column-gap: 60px;
    row-gap: 10px;
    max-width: 500px;
    margin-left: 30px;
}

.card {
    background: white;
    border-radius: 0;
    padding: 15px;
    box-shadow: 0 8px 16px -8px rgba(0,0,0,0.18);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    width: 250px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
    border: 3px solid transparent;
}

.card:hover {
    background: white;
    border: 3px solid #bdbdbd;
}

.card.small {
    height: 120px;
    width: 120px;
    padding: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card.small .card-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-grow: 1;
    justify-content: center;
    padding-bottom: 0;
}

.card.small .card-title {
    font-size: 12px;
    text-align: center;
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 16px);
    line-height: 1.2;
}

.card.small .icon {
    margin-right: 0;
    margin-bottom: 0;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    top: -5px;
}

.icon {
    width: 48px;
    height: 48px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-left: 0;
    display: block;
    align-self: center;
}

.plus-overlay {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background-color: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 8px;
    font-weight: bold;
    border: 1px solid white;
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    flex: 1;
}

.card-subtitle {
    position: absolute;
    left: 20px;
    bottom: 12px;
    font-size: 12px;
    color: #666;
    margin: 0;
    font-family: Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 500;
    text-align: left;
}

@media (max-width: 520px) {
    .container {
        grid-template-columns: 1fr;
        max-width: 300px;
    }
    
    .card {
        width: 100%;
    }
}

.card.existing-folder .card-header {
    justify-content: flex-start;
    gap: 15px;
}
.card.existing-folder .icon {
    margin-right: 15px;
    margin-left: 0;
}
.card.existing-folder .card-title {
    text-align: left;
    margin-left: 0;
    font-size: 14px;
    font-family: Tahoma, Geneva, Verdana, sans-serif;
}

/* Icône document pour les petites cartes */
.document-icon {
    font-size: 32px;
    width: auto;
    height: auto;
}

.top-banner {
    width: 100%;
    background: #111 url('../images/WGC.ico') no-repeat 30px center;
    background-size: 32px 32px;
    color: #fff;
    font-size: 1.3rem;
    font-weight: bold;
    padding: 14px 0 14px 74px; /* 30px + 32px + 12px gap */
    letter-spacing: 1px;
    margin-bottom: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    line-height: 1;
}

.top-banner span {
    transform: translateY(-4px); /* Ajustez la valeur selon le besoin */
}

.form-label {
    text-align: right;
    margin-right: 10px;
    min-width: 120px !important; /* Increased width to accommodate longer labels */
    white-space: nowrap;
    display: inline-block;
}

.form-group {
    display: flex;
    align-items: center;
    min-width: 250px;
    margin-right: 20px;
    margin-bottom: 5px;
}

.login-required {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    font-size: 18px;
    color: #666;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.navigation-bar {
    transition: opacity 0.3s ease-in-out;
}

/* Styles pour la fenêtre de connexion (style Sage) */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-box {
    width: 380px;
    background-color: white;
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0;
    overflow: hidden;
}

.login-header {
    background-color: #000;
    color: white;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: normal;
    text-align: center;
}

.login-content {
    padding: 25px 40px 30px 40px;
}

.login-title {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

.login-field {
    margin-bottom: 20px;
    position: relative;
}

.login-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
    color: #333;
    font-size: 14px;
}

.login-field input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 0;
    font-size: 14px;
}

.login-field .modify-link {
    position: absolute;
    right: 0;
    top: 0;
    color: #00855d;
    text-decoration: none;
    font-size: 14px;
}

.login-field .modify-link:hover {
    text-decoration: underline;
}

.login-buttons {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
}

.login-button {
    padding: 10px;
    border-radius: 0;
    cursor: pointer;
    font-weight: bold;
    border: none;
    font-size: 14px;
    text-align: center;
    width: 100%;
}

.login-button.primary {
    background-color: #00855d;
    color: white;
}

.login-button.secondary {
    background-color: transparent;
    color: #00855d;
    border: none;
    margin-top: 10px;
    font-weight: normal;
    text-decoration: underline;
}

.login-button:hover {
    opacity: 0.9;
}

.login-links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 13px;
}

.login-links a {
    color: #00855d;
    text-decoration: none;
}

.login-links a:hover {
    text-decoration: underline;
}

.login-divider {
    margin: 20px 0;
    border-top: 1px solid #eee;
}

.login-signup {
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
}

.login-signup a {
    color: #00855d;
    text-decoration: none;
    margin-left: 5px;
}

.login-signup a:hover {
    text-decoration: underline;
}

.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo img {
    max-width: 100px;
    height: auto;
}