/* ==========================================================================
   APP.CSS — NOYAU GLOBAL STARFACE
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {

    --bg-page: #f4f6f9;
    --bg-panel: #ffffff;

    --text-main: #1f2937;
    --text-soft: #6b7280;

    --border: #dbe1e8;
    --border-strong: #c7d0db;

    --primary: #2563eb;
    --primary-soft: #e8f0ff;

    --danger: #c0392b;

    --shadow-soft: 0 2px 8px rgba(0,0,0,0.05);

    --radius: 14px;

    --nav-height: 60px;
}

/* ==========================================================================
   Page d authentification
   ========================================================================== */
.login-page {
    min-height: 100vh;
    margin: 0;
    background: #f4f6f8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
}

.login-card {
    width: 360px;
    background: #fff;
    border: 1px solid #d5dde5;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    text-align: center;
}

.login-logo {
    text-align: center;
}

.login-logo img {
    display: block;
    max-width: 180px;
    margin: 0 auto 25px auto;
}

.login-card h2 {
    margin: 0 0 25px;
    font-size: 24px;
}

.login-card .form-group {
    text-align: left;
    margin-bottom: 18px;
}

.login-card label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.login-card input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid #cbd5df;
    border-radius: 8px;
    font-size: 16px;
}

.login-submit {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #111;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.login-submit:hover {
    background: #333;
}

.login-error {
    background: #ffecec;
    color: #b00000;
    border: 1px solid #ffb8b8;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 18px;
}


/* ==========================================================================
   BASE
   ========================================================================== */

html,
body {
    margin: 0;
    padding: 0;
}

body {

    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--bg-page);
    color: var(--text-main);

    line-height: 1.45;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}


/* ==========================================================================
   TOPBAR
   ========================================================================== */

.topbar {

    position: sticky;
    top: 0;
    z-index: 1100;

    display: flex;
    align-items: center;
    gap: 20px;

    min-height: var(--nav-height);

    padding: 10px 18px;

    background: rgba(255,255,255,0.96);

    backdrop-filter: blur(8px);

    border-bottom: 1px solid var(--border);

    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}


/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.top-nav {

    display: flex;
    align-items: center;
    gap: 10px;

    flex-wrap: wrap;
}

.nav-tab {

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;

    padding: 0 16px;

    border-radius: 999px;

    border: 1px solid transparent;

    background: #eef2f7;

    text-decoration: none;

    color: #334155;

    font-size: 14px;
    font-weight: 500;

    transition:
        background 0.18s ease,
        transform 0.08s ease,
        color 0.18s ease;
}

.nav-tab:hover {

    background: #dde7f5;

    transform: translateY(-1px);
}

.nav-tab--active {

    background: var(--primary-soft);

    border-color: #bfd3ff;

    color: var(--primary);

    font-weight: 600;
}


/* ==========================================================================
   ACTION BAR
   ========================================================================== */

.forms-bar {

    display: flex;
    align-items: center;
    gap: 14px;

    flex-wrap: wrap;

    margin-left: auto;
}

.forms-bar .group {

    display: flex;
    align-items: center;
    gap: 8px;

    flex-wrap: wrap;
}


/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;

    padding: 0 16px;

    border: none;
    border-radius: 10px;

    background: #4b5563;

    color: white;

    font-size: 14px;
    font-weight: 500;

    text-decoration: none;

    cursor: pointer;

    transition:
        transform 0.08s ease,
        opacity 0.18s ease,
        background 0.18s ease;
}

.btn:hover {

    opacity: 0.94;

    transform: translateY(-1px);
}

.btn:active {

    transform: translateY(1px);
}

.btn.primary {

    background: var(--primary);
}

.btn.danger {

    background: var(--danger);
}


/* ==========================================================================
   ICONES TOPBAR
   ========================================================================== */

.topbar img {

    object-fit: contain;

    transition:
        opacity 0.18s ease,
        transform 0.12s ease;
}

.topbar a:hover img {

    opacity: 1;

    transform: scale(1.06);
}


/* ==========================================================================
   LAYOUT PRINCIPAL
   ========================================================================== */

#main-layout {

    width: 100%;

    padding: 22px;
}

#workspace {

    display: flex;
    flex-direction: column;

    gap: 18px;

    width: 100%;
}

#content-row {

    display: flex;
    align-items: flex-start;

    gap: 20px;

    width: 100%;
}

#view-wrapper {

    flex: 1;
    min-width: 0;
}


/* ==========================================================================
   PANELS
   ========================================================================== */

.view-panel {

    background: var(--bg-panel);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    box-shadow: var(--shadow-soft);

    padding: 20px;
}


/* ==========================================================================
   TITRES
   ========================================================================== */

h1,
h2,
h3 {

    margin-top: 0;

    color: #111827;

    letter-spacing: -0.02em;
}

h1 {

    font-size: 28px;
}

h2 {

    font-size: 22px;
}

h3 {

    font-size: 18px;
}


/* ==========================================================================
   LIENS UTILITAIRES
   ========================================================================== */

a.link-to-grid,
a.link-to-preview {

    color: var(--primary);

    text-decoration: none;
}

a.link-to-grid:hover,
a.link-to-preview:hover {

    text-decoration: underline;
}


/* ==========================================================================
   PAGER
   ========================================================================== */

.preview-pager {

    display: grid;

    grid-template-columns: 48px auto 48px;

    align-items: center;
    justify-content: center;

    gap: 14px;

    margin: 20px auto;
}

.pager-slot {

    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.pager-arrow {

    width: 42px;
    height: 42px;

    border-radius: 50%;

    background: #4b5563;

    color: white;

    text-decoration: none;

    font-size: 28px;
    font-weight: bold;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        background 0.18s ease,
        transform 0.08s ease;
}

.pager-arrow:hover {

    background: #374151;

    transform: scale(1.05);
}

.pager-count {

    min-width: 80px;

    text-align: center;

    font-weight: 600;

    color: var(--text-soft);
}



/* bouton lien */

.btn-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;

    color: black;
    text-decoration: underline;
    cursor: pointer;

    font: inherit;
}