/* ═══════════════════════════════════════
   global.css – Alien Comptabilité
   Base partagée par toutes les pages
═══════════════════════════════════════ */

*{ box-sizing:border-box; }

body{
    margin:0;
    padding:0;
    background:#dcdcdc;
    font-family:Arial, Helvetica, sans-serif;
    font-size:16px;
    color:#000;
}

/* ── Topbar ── */
.topbar{
    background:#3a3a3a;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:8px 14px;
    font-weight:bold;
    font-size:18px;
}
.topbar-subtitle{
    font-weight:normal;
    font-size:14px;
    opacity:.70;
    margin-left:8px;
}

/* ── Nav ── */
.nav{
    background:#cfcfcf;
    border-bottom:2px solid #8f8f8f;
    display:flex;
    flex-wrap:wrap;
    align-items:stretch;
    padding:0 6px;
    user-select:none;
    position:relative;
    z-index:100;
}
.nav.nav-open{
    display:flex;
    flex-direction:column;
    padding:6px;
}
.nav-item{ position:relative; }
.nav-link{
    display:block;
    padding:10px 18px;
    font-size:17px;
    font-weight:bold;
    color:#000;
    cursor:pointer;
    white-space:nowrap;
    border:1px solid transparent;
    text-decoration: none;
}
.nav-link:hover,
.nav-item.active > .nav-link{
    background:#e8e8e8;
    border-color:#999;
}

/* ── Dropdown ── */
.dropdown{
    display:none;
    position:absolute;
    top:100%; left:0;
    background:#cfcfcf;
    border:1px solid #888;
    box-shadow:2px 2px 5px rgba(0,0,0,.2);
    min-width:240px;
    z-index:200;
}
.nav-item.active .dropdown{ display:block; }
.nav.nav-open .dropdown{
    position:static;
    box-shadow:none;
    border:none;
    border-left:4px solid #555;
    margin-left:10px;
    background:#c5c5c5;
}
.dropdown-item{
    display:block;
    padding:10px 24px;
    font-size:16px;
    color:#000;
    cursor:pointer;
    white-space:nowrap;
    text-decoration:none;
}
.dropdown-item:hover{ background:#555; color:#fff; }
.dropdown-divider{ height:1px; background:#999; margin:4px 8px; }

/* ── Hamburger ── */
.hamburger{
    display:none;
    flex-direction:column;
    gap:5px;
    cursor:pointer;
    padding:4px;
    background:none;
    border:none;
}
.hamburger span{
    display:block;
    width:24px; height:2px;
    background:#fff;
    border-radius:2px;
    transition:transform .2s, opacity .2s;
}
.hamburger.active span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2){ opacity:0; }
.hamburger.active span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* ── Wrapper ── */
.wrapper{
    margin:10px;
    background:#cfcfcf;
    border:1px solid #8f8f8f;
    box-shadow:inset 1px 1px 0 #efefef;
    padding:8px;
}

/* ── Btn ── */
.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    box-sizing:border-box;
    height:28px;
    line-height:normal;
    vertical-align:middle;
    border:1px solid #777;
    background:linear-gradient(#efefef, #cfcfcf);
    font-size:15px;
    font-weight:bold;
    color:#000;
    cursor:pointer;
    padding:0 12px;
    white-space:nowrap;
    text-decoration: none;
}
.btn a { text-decoration: none; }
.btn:hover{ background:linear-gradient(#fff, #ddd); }
.btn:active{ background:linear-gradient(#ccc, #e8e8e8); }

/* ── Form controls ── */
.form-control{
    width:100%;
    height:26px;
    padding:2px 6px;
    border:1px solid #7f7f7f;
    background:#ffffff;
    font-size:14px;
    line-height:22px;
    color:#000;
    font-family:Arial, Helvetica, sans-serif;
    font-weight: 550;
}
.form-control:focus{
    outline:2px solid #555;
    outline-offset:-1px;
}
.form-control[readonly]{
    background:#fff;
    border:none;
}
.form-control-sm{ max-width:65px; }
.form-control-xs{ max-width:44px; }

/* ── Label ── */
.label{
    white-space:nowrap;
    font-size:13px;
    font-weight:bold;
    color:#000;
}
.label-right{ text-align:right; }

/* ── Card ── */
.card{
    border:1px solid #8d8d8d;
    background:#d7d7d7;
    padding:6px;
}
.card-title{
    font-weight:bold;
    font-style:italic;
    text-decoration:underline;
    font-size:18px;
    margin-bottom:6px;
    color:#000;
}

/* ── Row ── */
.row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
}

/* ── Footer ── */
.footer{
    margin-top:10px;
    display:flex;
    justify-content:flex-end;
    gap:8px;
    flex-wrap:wrap;
}

/* ── Responsive ── */
@media (max-width:900px){
    .row{ grid-template-columns:1fr; }
    .hamburger{ display:flex; }
    .nav{ display:none; }
}
@media (max-width:560px){
    .footer .btn{ flex:1; height:34px; font-size:16px; }
}

/* ═══════════════════════════════════════
   Modal overlay (groupes, clients, etc.)
═══════════════════════════════════════ */

.modal-overlay{
    display:none;
    position:fixed;
    top:0; left:0;
    width:100%; height:100%;
    background:rgba(0,0,0,.5);
    z-index:500;
    align-items:center;
    justify-content:center;
}
.modal-overlay.open{ display:flex; }

.modal-box{
    background:#cfcfcf;
    border:2px solid #8f8f8f;
    box-shadow:4px 4px 12px rgba(0,0,0,.4);
    width:90%;
    max-width:560px;
    max-height:90vh;
    display:flex;
    flex-direction:column;
    overflow:hidden;
}
.modal-header{
    background:#3a3a3a;
    color:#fff;
    padding:8px 14px;
    font-size:16px;
    font-weight:bold;
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-shrink:0;
}
.modal-close{
    background:none;
    border:none;
    color:#fff;
    font-size:20px;
    cursor:pointer;
    line-height:1;
    padding:0 4px;
}
.modal-close:hover{ color:#faa; }
.modal-body{
    flex:1;
    overflow:auto;
}
.modal-body iframe{
    width:100%;
    height:100%;
    min-height:320px;
    border:none;
    display:block;
}

/* ── Mode modal : cache topbar, nav, footer ── */
.modal-mode .topbar,
.modal-mode .nav,
.modal-mode .hamburger,
.modal-mode .footer{ display:none !important; }

.modal-mode .wrapper{
    margin:0;
    border:none;
    box-shadow:none;
    background:#cfcfcf;
    padding:10px;
}
.modal-mode .card{ margin-bottom:0; }

