@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300..800;1,300..800&family=Montserrat:wght@300..800&family=Poppins:wght@400;600;700;800;900&display=swap');

body{
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    width: calc(100vw - 42px);
    background-color: rgb(255, 255, 250);
    margin: 0;
    padding: 0;
    margin-left: 42px;
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-variant-emoji: text;
    color: rgb(67, 72, 73);
}

/* Charte graphique Salon des Gérants — typographie */
h1, h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
}

h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
}

* {
    box-sizing: border-box;
    font-family: inherit;
}

#contenu {
    transition: filter 0.3s;
    display: flex;
    align-items: center;
    flex-direction: column;
    width: 100%;
}

.top-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0% 1%;
    & > img {
        width: 100px;
    }
    & > h2#page-title {
        margin: 0;
        font-size: clamp(1.15rem, 3.25vw, 1.625rem);
        font-weight: 700;
    }
}

.UserTitle {
    font-size: clamp(1.2rem, 4vw, 2rem);
    cursor: pointer;
}

.UserTitle:hover {
    background: linear-gradient(90deg, rgb(67, 72, 73), rgb(147, 147, 147), rgb(67, 72, 73));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: wave-color 2s linear infinite;
}

@keyframes wave-color {
    0%   { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0 0.9rem 0.75rem;
}

.nav-title-box{
    line-height: 0;
}

.nav-logo {
    display: block;
    height: 36px;
    width: auto;
}

.admin-menu.open {
    transform: translateX(0);
}

#menu-button {
    display: flex;
    flex-direction: column;
    padding-right: 3rem;
}

#menu-button .btn {
    cursor: pointer;
    width: 100%;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border: none;
    border-radius: 0;
    background-color: transparent;
    font-size: 125%;
    transition: background-color 0.4s, color 0.4s, font-size 0.4s;
}

#menu-button .btn:hover {
    width: 100%;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border: none;
    background-color: rgb(67, 72, 73);
    color: rgb(250, 250, 245);
    font-size: 140%;
}

#menu-button.open {
    display: flex;
    flex-direction: column;
    padding-right: 0;
}

.btn-hamburger {
    z-index: 20;
    align-self: center;
    background: none;
    border: none;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    position: relative;
    margin-right: 5px;
}

.btn-hamburger span {
    display: block;
    width: 100%;
    height: 4px;
    background: rgb(67, 72, 73);
    border-radius: 2px;
    position: absolute;
    left: 0;
    transition: transform 0.3s, opacity 0.3s, top 0.3s;
}

.btn-hamburger span:nth-child(1) { top: 4px; }
.btn-hamburger span:nth-child(2) { top: 14px; }
.btn-hamburger span:nth-child(3) { top: 24px; }

.admin-menu.open .btn-hamburger span:nth-child(1) {
    top: 14px;
    transform: rotate(45deg);
}

.admin-menu.open .btn-hamburger span:nth-child(2) {
    opacity: 0;
}

.admin-menu.open .btn-hamburger span:nth-child(3) {
    top: 14px;
    transform: rotate(-45deg);
}

#contenu.blur {
    filter: blur(3px);
    pointer-events: none;
}

.admin-menu {
    display: flex;
    flex-direction: column;
    align-self: flex-start;
    position: fixed;
    transform: translateX(-86%);
    transition: transform 0.3s;
    background-color: rgb(250, 250, 245);
    height: 100%;
    width: 300px;
    border-right: 1px solid rgb(147, 147, 147);
    z-index: 100;
    left: 0;
}

.vue {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    margin: 0 auto;
    align-items: stretch;
}

@media (width > 900px) {
    #vue-live {
        margin-top: -60px;
    }
}

.vue * {
    text-align: left;
    max-width: 30vw;
    min-width: 235px;
}

.vue button {
    min-width: auto;
    max-width: 100%;
    width: fit-content;
    font-size: 125%;
    background-color: rgb(250, 250, 245);
    border: 1px solid rgb(67, 72, 73);
    color: rgb(67, 72, 73);
    border-radius: 20px;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.4s, color 0.4s
}

.vue button:hover {
    background-color: rgb(67, 72, 73);
    color: rgb(250, 250, 245);
}

.vue input {
    min-width: auto;
}

.vue img {
    min-width: auto;
}

h3 {
    font-size: 175%;
}

p, li, label, span, input {
    font-size: 125%;
}

input {
    font-size: 125%;
    background-color: transparent;
    border: 1px solid rgb(67, 72, 73);
    border-radius: 10px;
}

input:focus {
    outline: none;
}

input[type="number"] {
    appearance: textfield;
}

button[type="submit"] {
    border: 1px solid rgb(67, 72, 73);
    border-radius: 20px;
    padding: 10px;
    background-color: rgb(250, 250, 245);
    color: rgb(67, 72, 73);
    cursor: pointer;
    transition: background-color 0.4s, color 0.4s;
}

button[type="submit"]:hover {
    background-color: rgb(67, 72, 73);
    color: rgb(250, 250, 245);
}

input[type="file"]::file-selector-button {
  border: 1px solid rgb(67, 72, 73);
  border-radius: 9px;
  background-color: rgb(250, 250, 245);
  color: rgb(67, 72, 73);
  cursor: pointer;
  font-size: 100%;
  transition: background-color 0.4s, color 0.4s
}

input[type="file"]::file-selector-button:hover {
  background-color: rgb(67, 72, 73);
  color: rgb(250, 250, 245);
}

.avatar-entreprise {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    max-width: none;
}

.avatar-initiale {
    color: rgb(250, 250, 245);
    font-weight: 600;
    user-select: none;
}

#planning-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.planning-slot {
    background: rgb(255, 255, 253);
    border: 1px solid rgb(218, 218, 212);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.planning-slot > h3 {
    margin: 0 0 0.6rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgb(228, 228, 222);
    font-size: 0.95rem;
}

.planning-slot.slot-passe {
    opacity: 0.45;
    box-shadow: none;
}

.planning-slot.slot-actuel {
    background: #f3f9e4;
    border: 2px solid #96c11e;
    box-shadow: 0 3px 10px rgba(150, 193, 30, 0.12);
}

.planning-slot.slot-actuel > h3 {
    border-bottom-color: #cfe4a0;
}

.slot-status-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
    background-color: #96c11e;
    color: white;
}

.planning-matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(max(250px, 24%), 1fr));
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.planning-match {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 250px;
}

/* Tables de 4–5 entreprises : la carte occupe deux colonnes de la grille pour
   laisser à chaque entreprise autant de place que sur une table de 2–3. */
.planning-match--large {
    grid-column: span 2;
}

.pmatch-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgb(90, 90, 90);
    text-align: center;
    letter-spacing: 0.03em;
}

.pmatch-card {
    position: relative;
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border: 1.5px solid #434849;
    border-radius: 30px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.10);
    min-height: 52px;
    overflow: hidden;
}

.pmatch-side {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.45rem 0.55rem;
    text-align: center;
    min-width: 0;
}


.pmatch-name {
    font-size: 0.72rem;
    line-height: 1.2;
    word-break: break-word;
    color: #434849;
}

/* Badge « Ent. 1 / Ent. 2 » sous chaque entreprise dans le planning complet. */
.pmatch-role {
    margin-top: 0.1rem;
    font-size: 0.6rem;
    padding: 0.05em 0.45em;
}

/* « vs » entre deux entreprises : pastille blanche posée sur une ligne
   verticale. Rendu identique que la table compte 2, 3, 4 ou 5 entreprises. */
.pmatch-vs {
    flex: 0 0 auto;
    align-self: center;
    position: relative;
    z-index: 1;
    font-size: 0.65rem;
    font-weight: 700;
    color: #434849;
    background: white;
    padding: 0.06rem 0.3rem;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

.pmatch-vs::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -100px;
    bottom: -100px;
    width: 1.5px;
    background: #434849;
    transform: translateX(-50%);
    z-index: -1;
}

.vue #planning-content,
.vue #planning-content * {
    min-width: 0;
    max-width: none;
}

.vue #plan-content,
.vue #plan-content * {
    min-width: 0;
    max-width: none;
}

.page-layout {
    position: relative;
    display: flex;
    align-items: flex-start;
    width: 92vw;
    min-width: 900px;
    max-width: 1500px;
    margin-bottom: 5vw;
    gap: 2.5rem;
}

.page-main {
    max-width: none;
    min-width: 0;
    flex: 3 1 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Le contenu de la colonne principale remplit toute sa largeur
   (on lève le plafond 30vw hérité de .vue *) pour éviter un vide central. */
.page-main, .page-main * {
    max-width: none;
}

.page-doc {
    flex: 2 1 0;
    max-width: 560px;
    min-width: 300px;
    align-self: flex-start;
    position: sticky;
    top: 1rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid rgb(67, 72, 73);
    border-radius: 15px;
    background-color: rgb(250, 250, 245);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    z-index: 5;
}

.list-box {
    min-width: 50%;
    min-height: 120px;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem;
    border: 1px solid rgb(200, 200, 200);
    border-radius: 12px;
    background-color: rgb(250, 250, 245);
    margin-bottom: 1rem;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.02);
}

.list-box, .list-box * {
    max-width: none;
    min-width: 0;
    
}

.list-box::-webkit-scrollbar {
    width: 8px;
}

.list-box::-webkit-scrollbar-track {
    background: transparent;
}

.list-box::-webkit-scrollbar-thumb {
    background: rgb(200, 200, 200);
    border-radius: 4px;
}

.list-box::-webkit-scrollbar-thumb:hover {
    background: rgb(150, 150, 150);
}

.list-box > p {
    margin: 0;
    opacity: 0.7;
}

 .page-doc, .page-doc * {
    max-width: none;
    min-width: 0;
}

.doc-title {
    margin: 0 0 0.25rem;
    font-size: 135%;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgb(200, 200, 200);
}

/* Sections de documentation repliables (fermées par défaut) */
.doc-section {
    border-bottom: 1px solid rgba(67, 72, 73, 0.15);
}

.doc-section > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 105%;
    transition: color 0.2s;
}

.doc-section > summary::-webkit-details-marker {
    display: none;
}

.doc-section > summary::after {
    content: '';
    flex-shrink: 0;
    width: 0.55em;
    height: 0.55em;
    margin-right: 0.15em;
    border-right: 2px solid #96c11e;
    border-bottom: 2px solid #96c11e;
    transform: rotate(45deg);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.doc-section[open] > summary::after {
    transform: rotate(-135deg);
}

.doc-section > summary:hover {
    color: #96c11e;
}

.doc-section[open] {
    padding-bottom: 0.5rem;
}

.doc-section > *:not(summary):first-of-type {
    margin-top: 0;
}

.page-doc p,
.page-doc li {
    line-height: 1.45;
    margin: 0.45rem 0;
    font-size: 105%;
}

.page-doc ul {
    padding-left: 1.25rem;
    margin: 0.3rem 0 0.6rem;
}

.page-doc code {
    background-color: rgb(235, 235, 225);
    padding: 0.1rem 0.4rem;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 95%;
}

.vue .entreprise-row,
.vue .entreprise-row * {
    min-width: 0;
    max-width: none;
}

.entreprise-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid rgb(200, 200, 200);
    overflow-wrap: anywhere;
    flex-wrap: wrap;
}

.entreprise-info {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: fit-content;
    gap: 0.5rem;
}

@media (max-width: 900px) {
    .page-layout {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-width: 0;
        max-width: none;
    }
    .page-doc {
        position: static;
        top: auto;
        right: auto;
        left: auto;
        width: 100%;
        flex: 0 0 auto;
        min-width: 0;
        max-width: none;
        max-height: none;
        overflow-y: visible;
        order: 1;
        margin-bottom: 1.5rem;
    }
    .page-main {
        order: 2;
        flex: 0 0 auto;
        padding-left: 1rem;
        padding-right: 1rem;
        min-width: 0;
    }
    .vue * {
        max-width: 100%;
        min-width: 0;
    }
}

.search-widget {
    border: 1.5px solid rgb(210, 210, 205);
    border-radius: 14px;
    overflow: hidden;
    background: rgb(250, 250, 245);
    margin-bottom: 1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}


.search-widget .company-search {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0.65rem 0.9rem 0.65rem 2.5rem;
    border: none;
    border-bottom: 1px solid rgb(220, 220, 215);
    border-radius: 0;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 0.75rem center;
    background-size: 16px 16px;
    font-size: 100%;
    color: inherit;
}

.search-widget .company-search:focus {
    outline: none;
    box-shadow: none;
    border-bottom-color: rgb(220, 220, 215);
}

.search-widget .list-box {
    border: none;
    border-radius: 0;
    background: transparent;
    margin: 0;
    box-shadow: none;
}

.company-search {
    width: 100%;
    max-width: 420px;
    padding: 0.5rem 0.9rem;
    border: 1.5px solid rgb(210, 210, 205);
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 100%;
    background-color: rgb(250, 250, 245);
}

.company-search:focus {
    outline: none;
    border-color: rgb(67, 72, 73);
    box-shadow: 0 0 0 3px rgba(21, 21, 21, 0.07);
}

mark.highlight {
    background-color: rgb(223, 223, 149);
}

.tab-stats {
    text-align: right;
    font-size: 90%;
    opacity: 0.7;
    margin-bottom: 0.5rem;
    padding-right: 0.5rem;
    font-weight: 600;
}

.modal-message-content {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 0;
    font-style: italic;
    color: rgb(50, 50, 50);
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(21, 21, 21, 0.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.open {
    display: flex;
}

.modal-box {
    background: rgb(250, 250, 245);
    border: 1px solid rgb(67, 72, 73);
    border-radius: 16px;
    width: min(480px, 94vw);
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(21, 21, 21, 0.18);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-weight: 700;
    font-size: 115%;
    overflow-wrap: anywhere;
}

.modal-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 130%;
    line-height: 1;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.modal-close-btn:hover {
    background-color: rgb(230, 230, 225);
}

.modal-warning {
    display: none;
    background: rgb(255, 245, 220);
    border: 1px solid rgb(210, 175, 80);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font-size: 93%;
    color: rgb(100, 70, 0);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-body label {
    font-weight: 600;
}

.modal-textarea {
    width: 100%;
    min-height: 90px;
    padding: 0.6rem 0.8rem;
    border: 1px solid rgb(67, 72, 73);
    border-radius: 10px;
    font-family: inherit;
    font-size: 100%;
    resize: vertical;
    background-color: rgb(250, 250, 245);
    box-sizing: border-box;
}

.modal-textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(21, 21, 21, 0.15);
}

.modal-charcount {
    text-align: right;
    font-size: 82%;
    opacity: 0.55;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.btn-modal-secondary {
    padding: 0.5rem 1.1rem;
    border: 1px solid rgb(67, 72, 73);
    border-radius: 10px;
    background: rgb(250, 250, 245);
    cursor: pointer;
    font-size: 100%;
    transition: background-color 0.2s;
}

.btn-modal-secondary:hover {
    background: rgb(230, 230, 225);
}

.btn-modal-primary {
    padding: 0.5rem 1.1rem;
    border: 1px solid rgb(67, 72, 73);
    border-radius: 10px;
    background: rgb(67, 72, 73);
    color: rgb(250, 250, 245);
    cursor: pointer;
    font-size: 100%;
    transition: opacity 0.2s;
}

.btn-modal-primary:hover:not(:disabled) {
    opacity: 0.8;
}

.btn-modal-primary:disabled {
    opacity: 0.45;
    cursor: default;
}

.fiche-link {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    font-size: 110%;
    color: rgb(67, 72, 73);
    text-decoration: none;
    border: 1px solid rgb(67, 72, 73);
    border-radius: 20px;
    background-color: rgb(250, 250, 245);
    flex-shrink: 0;
    min-width: 0;
    transition: background-color 0.3s, color 0.3s;
}

.fiche-link:hover {
    background-color: rgb(67, 72, 73);
    color: rgb(250, 250, 245);
}