
  :root{
    --bg: #f8f7ef;
    --bg-raised: #ffffff;
    --bg-card: #ffffff;
    --line: #c5d6e8;
    --line-soft: #dce6f2;
    --gold: #18713e;
    --gold-dim: #649342;
    --emerald: #218143;
    --amber: #c78017;
    --red: #dc3f4a;
    --discord: #5865F2;
    --discord-hover: #6a74f5;
    --text: #101a2b;
    --text-dim: #4d6376;
    --text-faint: #7c93a8;
    --accent-grad: linear-gradient(120deg, #18713e 0%, #369346 55%, #c78017 130%);
    --radius: 10px;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  *{box-sizing:border-box;}
  html{scroll-padding-top: env(safe-area-inset-top, 0px);}
  html,body{height:100%;}

  /* ================================================================
     INTERACTIVITÉ / ANIMATIONS — couche appliquée à toute l'app,
     sans changer la structure ni le comportement fonctionnel.
     ================================================================ */
  button, .subtab, .dir-cat, .corr-type-btn, .freq-chip, .day-chip, .file-upload-btn{
    transition: transform .12s ease, box-shadow .12s ease, background .15s ease, color .15s ease, border-color .15s ease, filter .15s ease;
  }
  button:active:not(:disabled){ transform: scale(0.95); }
  .ad-submit, .btn-accept{
    position: relative; overflow: hidden;
  }
  .ad-submit:hover:not(:disabled), .btn-accept:hover{
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,.32);
    filter: brightness(1.06);
  }
  .ad-submit:active:not(:disabled), .btn-accept:active{
    transform: translateY(0) scale(0.97);
  }
  .btn-ripple{
    position:absolute; width:12px; height:12px; margin:-6px;
    border-radius:50%; background: rgba(255,255,255,.55);
    transform: scale(0); animation: rippleAnim .6s ease-out forwards; pointer-events:none;
  }
  @keyframes rippleAnim{ to{ transform: scale(20); opacity: 0; } }

  .active-ad-card, .account-row, .kpi, .request-card, .history-item, .chat-bubble{
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  }
  .active-ad-card:hover, .account-row:hover, .kpi:hover, .request-card:hover{
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(0,0,0,.3);
  }

  @keyframes panelFadeIn{
    from{ opacity: 0; transform: translateY(10px); }
    to{ opacity: 1; transform: translateY(0); }
  }
  .panel.active, .subpanel.active{ animation: panelFadeIn .35s ease; }

  input[type="checkbox"]{ transition: transform .15s ease; }
  input[type="checkbox"]:checked{ animation: checkPop .3s ease; }
  @keyframes checkPop{
    0%{ transform: scale(1); } 45%{ transform: scale(1.4); } 100%{ transform: scale(1); }
  }

  #globalToast.show{ animation: toastBounce .45s cubic-bezier(.34,1.56,.64,1); }
  @keyframes toastBounce{
    0%{ transform: translateX(-50%) translateY(30px) scale(.9); opacity:0; }
    60%{ transform: translateX(-50%) translateY(-4px) scale(1.02); opacity:1; }
    100%{ transform: translateX(-50%) translateY(0) scale(1); }
  }

  .confetti-piece{
    position: fixed; top: -20px; width: 8px; height: 14px; z-index: 9998;
    animation-name: confettiFall; animation-timing-function: linear; animation-fill-mode: forwards;
    pointer-events:none; border-radius:2px;
  }
  @keyframes confettiFall{
    to{ transform: translateY(105vh) rotate(720deg); opacity: 0.25; }
  }

  @media (prefers-reduced-motion: reduce){
    button, .active-ad-card, .account-row, .kpi, .request-card, .panel, .subpanel, input[type="checkbox"]{
      animation: none !important; transition: none !important;
    }
  }

  body{
    margin:0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
  }

  /* ===================== INTRO — le logo vole en éclats (verre brisé) ===================== */
  .logo-explode-overlay{
    position: fixed; inset: 0; z-index: 300;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    perspective: 900px;
    transition: background-color 1.3s ease, opacity 1.1s ease .2s;
  }
  .logo-explode-overlay.fade-out{
    background-color: transparent;
    opacity: 0;
    pointer-events: none;
  }
  .logo-explode-grid{
    position: relative; width: 140px; height: 140px;
    transform-style: preserve-3d;
    animation: logo-windup 1050ms cubic-bezier(.4,0,.2,1);
  }
  .logo-explode-grid.shake{ animation: logo-shake 380ms ease; }
  @keyframes logo-windup{
    0%{ transform: scale(1); filter: drop-shadow(0 0 0 rgba(120,190,255,0)); }
    55%{ transform: scale(.93); filter: drop-shadow(0 0 6px rgba(120,190,255,.25)); }
    85%{ transform: scale(1.05); filter: drop-shadow(0 0 22px rgba(120,190,255,.7)); }
    100%{ transform: scale(1.08); filter: drop-shadow(0 0 30px rgba(120,190,255,.85)); }
  }
  @keyframes logo-shake{
    0%, 100%{ transform: translate(0,0) rotate(0deg); }
    20%{ transform: translate(-3px, 2px) rotate(-1deg); }
    40%{ transform: translate(3px, -2px) rotate(1deg); }
    60%{ transform: translate(-2px, -2px) rotate(-1deg); }
    80%{ transform: translate(2px, 2px) rotate(1deg); }
  }
  .logo-frag{
    position: absolute;
    transform-style: preserve-3d;
    transform: translate3d(0,0,0) rotateX(0) rotateY(0) rotateZ(0) scale(1);
    opacity: 1;
    filter: blur(0px) brightness(1) saturate(1);
    box-shadow: 0 0 0 rgba(150,205,255,0);
    transition: transform 1.8s cubic-bezier(.1,.7,.15,1), opacity 1.5s ease, filter 1.3s ease;
  }
  .logo-frag.go{
    transform: translate3d(var(--tx), var(--ty), var(--tz, 0px)) rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(var(--rot)) scale(var(--sc, .4));
    opacity: 0;
    filter: blur(4px) brightness(1.7) saturate(1.3);
    box-shadow: 0 0 14px rgba(150,205,255,.5);
  }
  .shock-ring{
    position: absolute; top: 50%; left: 50%;
    width: 20px; height: 20px; margin: -10px 0 0 -10px;
    border-radius: 50%;
    border: 2px solid #a9d8ff;
    opacity: 0;
    transform: scale(1);
    pointer-events: none;
  }
  .shock-ring.go{
    animation: shock-expand 1.15s cubic-bezier(.1,.6,.25,1) forwards;
  }
  @keyframes shock-expand{
    0%{ opacity: .95; transform: scale(1); border-width: 3px; }
    100%{ opacity: 0; transform: scale(18); border-width: .5px; }
  }
  .shock-ring2{
    position: absolute; top: 50%; left: 50%;
    width: 20px; height: 20px; margin: -10px 0 0 -10px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.8);
    opacity: 0;
    transform: scale(1);
    pointer-events: none;
  }
  .shock-ring2.go{
    animation: shock-expand2 900ms cubic-bezier(.1,.6,.25,1) 120ms forwards;
  }
  @keyframes shock-expand2{
    0%{ opacity: .8; transform: scale(1); }
    100%{ opacity: 0; transform: scale(11); }
  }
  .flash-pulse{
    position: absolute; inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,.95) 0%, rgba(120,190,255,.4) 35%, rgba(0,0,0,0) 70%);
    opacity: 0;
    pointer-events: none;
  }
  .flash-pulse.go{
    animation: flash-fire 600ms ease-out forwards;
  }
  @keyframes flash-fire{
    0%{ opacity: 0; }
    15%{ opacity: 1; }
    100%{ opacity: 0; }
  }

  /* ===================== LOGIN SCREEN ===================== */
  #loginScreen{
    min-height: 100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding: 24px;
    padding-top: calc(24px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    position: relative;
    overflow: hidden;
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='210' height='130'%3E%3Ctext x='-10' y='90' font-family='Oswald, sans-serif' font-weight='800' font-size='44' letter-spacing='2' fill='rgba(255,255,255,0.09)' transform='rotate(-10 105 65)'%3EPERICO NEWS%3C/text%3E%3C/svg%3E"),
      linear-gradient(135deg, #0b1c30 0%, #123a5e 42%, #17417a 68%, #c07f2e 135%);
    background-repeat: repeat, no-repeat;
    background-size: 210px 130px, cover;
    background-position: 0 0, center;
  }
  .login-box{
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    padding: 32px;
    position: relative;
    z-index: 1;
    box-shadow: 0 24px 60px rgba(5,20,40,0.4);
  }
  .login-brand{
    display:flex; align-items:center; gap:12px; margin-bottom: 28px;
  }
  .login-brand .mark{
    width: 36px; height: 36px;
    display:flex;align-items:center;justify-content:center;
    flex-shrink:0; overflow:hidden;
  }
  .login-brand .mark img{ width:100%; height:100%; object-fit: contain; }
  .login-brand .name{ font-family:'Inter', sans-serif; font-weight:600; font-size: 19px; }
  .login-brand .name small{
    display:block; font-family:'Inter', monospace; font-weight:400;
    font-size: 10.5px; color: var(--text-faint); letter-spacing: 0.5px;
  }
  .role-toggle{
    display:flex; border: 1px solid var(--line); margin-bottom: 24px;
  }
  .role-toggle button{
    flex:1; padding: 11px 6px; background: var(--bg-raised); border:none;
    color: var(--text-dim); font-family:'Inter', sans-serif; font-weight:500;
    font-size: 13px; cursor:pointer;
  }
  .role-toggle button.active{ background: var(--gold); color: var(--bg); font-weight:600; }
  .maintenance-block{
    text-align:center; padding: 32px 16px; background: var(--bg-raised);
    border: 1px solid var(--red); border-radius: 8px; color: var(--text);
  }
  .login-form{ display:none; flex-direction:column; gap: 16px; }
  .login-form.active{ display:flex; }
  .login-form .field label{
    display:block; font-family:'Inter', monospace; font-size: 11px;
    letter-spacing:0.4px; text-transform:uppercase; color: var(--text-faint); margin-bottom: 8px;
  }
  .login-form .field input{
    width:100%; background: var(--bg-raised); border: 1px solid var(--line); color: var(--text);
    font-family:'Inter', sans-serif; font-size: 14px; padding: 10px 12px; border-radius: 2px;
  }
  .login-form .field input:focus{ outline:none; border-color: var(--gold); }
  .login-submit{
    background: var(--gold); color: var(--bg); border:none; font-family:'Inter', sans-serif;
    font-weight:600; font-size: 14px; padding: 12px; cursor:pointer; border-radius: 2px; margin-top: 4px;
  }
  .login-submit:hover{ background: #2f74c0; }
  .login-hint{ font-size: 11.5px; color: var(--text-faint); margin-top:16px; line-height:1.5; }
  .login-error{ font-size:12.5px; color: var(--red); display:none; }
  .login-error.show{ display:block; }

  .discord-btn{
    display:flex; align-items:center; justify-content:center; gap: 10px;
    background: var(--discord); color: #fff; border:none;
    font-family:'Inter', sans-serif; font-weight:600; font-size: 14px;
    padding: 12px; cursor:pointer; border-radius: 2px; margin-top: 4px;
    transition: background .15s ease;
  }
  .discord-btn:hover{ background: var(--discord-hover); }
  .discord-btn svg{ flex-shrink:0; }
  .discord-btn.loading{ opacity: .7; cursor:default; }
  .discord-desc{ font-size: 12.5px; color: var(--text-dim); line-height:1.5; }

  /* ===================== APP ===================== */
  #app{ display:none; }

  .topbar{
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 50;
    display:flex;
    align-items:center;
    gap: 20px;
    padding: 14px 24px;
    background: linear-gradient(120deg, #ffffff 0%, #f3f8fd 55%, #eaf1fa 100%);
    border-bottom: 1px solid var(--line);
  }
  .brand{
    display:flex;
    align-items:center;
    gap:10px;
    padding-right: 18px;
    border-right: 1px solid var(--line);
  }
  .brand .mark{
    width: 30px; height: 30px;
    display:flex;align-items:center;justify-content:center;
    flex-shrink:0; overflow:hidden;
  }
  .brand .mark img{ width:100%; height:100%; object-fit: contain; }
  .brand .name{
    font-family:'Inter', sans-serif;
    font-weight:600;
    font-size: 16px;
    letter-spacing: 0.3px;
    line-height:1.1;
  }
  .brand .name small{
    display:block;
    font-family:'Inter', monospace;
    font-weight:400;
    font-size: 10px;
    color: var(--text-faint);
    letter-spacing: 0.5px;
  }

  .server-tag{
    font-family:'Inter', monospace;
    font-size: 11px;
    color: var(--text-faint);
    border: 1px solid var(--line);
    padding: 3px 8px;
    margin-right: 4px;
    white-space: nowrap;
  }
  @media (max-width: 760px){ .server-tag{ display:none; } }

  nav.tabs{ display:flex; gap: 4px; flex:1; }
  nav.tabs button{
    appearance:none; border:none; background:transparent;
    color: var(--text-dim);
    font-family:'Inter', sans-serif;
    font-weight:600; font-size: 14px;
    padding: 10px 18px; cursor:pointer; border-radius: 999px;
    border: 1px solid transparent;
    transition: color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
  }
  nav.tabs button:hover{ color: var(--gold); background: rgba(24,87,164,0.08); transform: translateY(-1px); }
  nav.tabs button.active{
    color:#fff; background: var(--accent-grad); font-weight:700;
    box-shadow: 0 6px 16px rgba(24,87,164,0.35);
  }
  nav.tabs button:focus-visible{ outline: 2px solid var(--gold); outline-offset:2px; }
  nav.tabs button.hidden-tab{ display:none; }
  .subtabs .subtab.hidden-tab{ display:none; }

  .clearance{
    display:flex; align-items:center; gap: 14px;
    font-family:'Inter', monospace;
    font-size: 11.5px; color: var(--text-faint); white-space:nowrap;
  }
  .clearance .dot{ width:7px;height:7px;border-radius:50%; background: var(--emerald); box-shadow: 0 0 6px var(--emerald); }
  .clearance b{ color: var(--gold); font-weight:600; letter-spacing:0.4px; }
  .logout-btn{
    background:transparent; border: 1px solid var(--line); color: var(--text-dim);
    font-family:'Inter', monospace; font-size: 11px; padding: 6px 10px; cursor:pointer;
  }
  .logout-btn:hover{ border-color: var(--red); color: var(--red); }

  @media (max-width: 760px){
    .clearance b{ display:none; }
    .brand .name{ font-size:14px; }
    nav.tabs button{ padding: 8px 10px; font-size:13px; }
    /* Barre d'onglets glissable horizontalement uniquement sur petits écrans. */
    nav.tabs{ min-width:0; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
    nav.tabs::-webkit-scrollbar{ display:none; }
    nav.tabs button{ flex-shrink:0; white-space:nowrap; }
    .brand{ flex-shrink:0; }
    .clearance{ flex-shrink:0; }
    .subtabs{ overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
    .subtabs::-webkit-scrollbar{ display:none; }
    .subtabs .subtab{ flex-shrink:0; white-space:nowrap; }
    .request-actions{ flex-wrap:wrap; }
    #gradePermissionsTable{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
    .perm-table{ min-width:640px; }
  }
  @media (max-width: 480px){
    .topbar{ padding: 10px 12px; gap: 10px; }
    .brand{ padding-right: 10px; gap:6px; }
    .brand .name small{ display:none; }
    nav.tabs button{ padding: 7px 9px; font-size:12.5px; }
    .logout-btn{ padding: 6px 8px; font-size:10px; }
  }
  /* Empêche le zoom automatique de Safari iOS quand on touche un champ
     (qui se déclenche dès que le texte affiché fait moins de 16px). */
  @media (max-width: 600px){
    input, select, textarea{ font-size:16px !important; }
  }

  main{ max-width: 1180px; margin: 0 auto; padding: 32px 24px 64px; }
  section.panel{ display:none; }
  section.panel.active{ display:block; animation: fadein .25s ease; }
  @keyframes fadein{ from{opacity:0; transform:translateY(4px);} to{opacity:1; transform:translateY(0);} }

  .panel-head{
    display:flex; align-items:baseline; justify-content:space-between;
    gap: 16px; margin-bottom: 26px; flex-wrap:wrap;
  }
  .panel-head h1{ font-family:'Inter', sans-serif; font-weight:600; font-size: 26px; margin:0; letter-spacing:0.2px; }
  .panel-head p{ margin: 4px 0 0; color: var(--text-dim); font-size: 14px; max-width: 560px; }
  .panel-meta{ font-family:'Inter', monospace; font-size: 12px; color: var(--text-faint); text-align:right; }

  /* ===================== TAB 1 — ENTREPRISES : demande d'annonce ===================== */
  .ad-grid{
    display:grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
    align-items:start;
  }
  @media (max-width: 900px){ .ad-grid{ grid-template-columns: 1fr; } }

  .ad-form{
    background: var(--bg-card);
    border: 1px solid var(--line);
    padding: 22px;
    display:flex;
    flex-direction:column;
    gap: 20px;
  }
  .company-tag{
    font-family:'Inter', monospace; font-size: 11.5px; color: var(--text-faint);
    border-bottom: 1px solid var(--line-soft); padding-bottom: 14px;
  }
  .company-tag b{ color: var(--gold); }
  .field label{
    display:block;
    font-family:'Inter', monospace;
    font-size: 11px;
    letter-spacing:0.4px;
    text-transform:uppercase;
    color: var(--text-faint);
    margin-bottom: 8px;
  }
  .field textarea, .field input, .field select{
    width:100%;
    background: var(--bg-raised);
    border: 1.5px solid var(--line);
    color: var(--text);
    font-family:'Inter', sans-serif;
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 6px;
    transition: border-color .15s ease, box-shadow .15s ease;
  }
  .field textarea{ resize: vertical; min-height: 80px; line-height:1.4; }
  .field textarea:focus, .field input:focus, .field select:focus{
    outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(24,87,164,0.15);
  }
  .counter-row{
    display:flex; justify-content:flex-end; margin-top:6px;
    font-family:'Inter', monospace; font-size: 11.5px; color: var(--text-faint);
  }
  .counter-row.limit{ color: var(--red); }

  .star-picker{ display:flex; gap:6px; font-size:34px; line-height:1; }
  .star-picker .star{
    color: var(--line); cursor:pointer; transition: color .12s, transform .12s;
    user-select:none;
  }
  .star-picker .star:hover{ transform: scale(1.12); }
  .star-picker .star.filled{ color: var(--gold); }
  .star-rating-display{ display:inline-flex; gap:2px; font-size:16px; color: var(--line); }
  .star-rating-display .star.filled{ color: var(--gold); }


  .field-pair{ display:grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  @media (max-width: 520px){ .field-pair{ grid-template-columns: 1fr; } }

  .freq-options{ display:flex; flex-wrap:wrap; gap:8px; }
  .freq-chip{
    font-family:'Inter', monospace;
    font-size: 12px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    background: var(--bg-raised);
    color: var(--text-dim);
    cursor:pointer;
    border-radius: 2px;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
  }
  .freq-chip:hover{ color: var(--text); }
  .freq-chip.selected{ border-color: var(--gold); color: var(--gold); background: rgba(31,95,168,0.08); }

  .corr-type-toggle{ display:flex; gap:8px; }
  .corr-type-btn{
    appearance:none; border: 1px solid var(--line); background: var(--bg-raised);
    color: var(--text-dim); font-family:'Inter', sans-serif; font-size:13px;
    padding: 9px 16px; cursor:pointer; border-radius: 2px;
  }
  .corr-type-btn:hover{ color: var(--text); }
  .corr-type-btn.active{ border-color: var(--gold); color: var(--gold); background: rgba(31,95,168,0.08); font-weight:600; }

  .ad-submit{
    align-self:flex-start;
    background: var(--accent-grad);
    background-size: 160% 160%;
    color: #fff;
    border:none;
    font-family:'Inter', sans-serif;
    font-weight:700;
    font-size: 14px;
    padding: 12px 24px;
    cursor:pointer;
    border-radius: 7px;
    box-shadow: 0 6px 16px rgba(24,87,164,0.3);
    transition: background-position .4s ease, box-shadow .18s ease, transform .18s ease;
  }
  .ad-submit:hover{ background-position: 100% 100%; box-shadow: 0 10px 22px rgba(24,87,164,0.4); }
  .ad-reset{
    align-self:flex-start;
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--line);
    font-family:'Inter', sans-serif;
    font-weight:500;
    font-size: 14px;
    padding: 11px 22px;
    cursor:pointer;
    border-radius: 2px;
    transition: border-color .15s ease, color .15s ease;
  }
  .ad-reset:hover{ border-color: var(--red); color: var(--red); }
  .ad-confirm{
    display:none;
    font-family:'Inter', monospace;
    font-size: 12.5px;
    color: var(--emerald);
    border: 1px solid var(--emerald);
    padding: 10px 14px;
  }
  .ad-confirm.show{ display:block; }

  .recap{
    background: var(--bg-card);
    border: 1px solid var(--line);
    padding: 22px;
    position:sticky;
    top: calc(72px + env(safe-area-inset-top, 0px));
  }
  .recap h2{
    font-family:'Inter', sans-serif; font-size: 15px; font-weight:600;
    margin: 0 0 16px; letter-spacing:0.2px;
  }
  .recap-row{
    display:flex; justify-content:space-between; align-items:baseline;
    font-size: 13px; padding: 9px 0; border-bottom: 1px solid var(--line-soft);
    color: var(--text-dim);
  }
  .recap-row span.v{ color: var(--text); font-weight:500; text-align:right; max-width:60%; }
  .recap-row.total{ border-bottom:none; margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
  .recap-row.total span:first-child{ font-family:'Inter', monospace; text-transform:uppercase; font-size:11px; letter-spacing:0.4px; color: var(--text-faint); }
  .recap-row.total span.v{ font-family:'Inter', sans-serif; font-size: 24px; font-weight:600; color: var(--gold); }

  .recap-note{ margin-top:16px; font-size:11.5px; color: var(--text-faint); line-height:1.5; }

  .history-block{ margin-top: 28px; }
  .history-empty{ font-size: 13px; color: var(--text-faint); font-style:italic; }
  .paste-zone{
    margin-top: 10px;
    border: 1.5px dashed var(--line);
    border-radius: 4px;
    padding: 14px;
    font-size: 12.5px;
    color: var(--text-faint);
    text-align: center;
    cursor: pointer;
    max-width: 320px;
  }
  .paste-zone:focus{ outline: none; border-color: var(--gold); color: var(--text-dim); }
  .paste-zone.drag-over{ border-color: var(--gold); background: var(--bg-raised); color: var(--text-dim); }
  .file-upload-btn{
    display:inline-flex; align-items:center; gap:6px; margin-top:8px; position:relative;
    font-family:'Inter', monospace; font-size:11.5px; color: var(--gold);
    border: 1px solid var(--gold); padding: 6px 10px; border-radius:2px; cursor:pointer;
  }
  .file-upload-btn:hover{ background: var(--bg-raised); }
  .file-upload-btn input[type="file"]{
    position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
    clip:rect(0,0,0,0); white-space:nowrap; border:0;
  }

  /* ---------- Chat privé ---------- */
  .chat-unread-badge{
    display:inline-flex; align-items:center; justify-content:center;
    min-width:16px; height:16px; padding:0 4px; margin-left:4px;
    background: var(--red); color:#fff; border-radius:8px;
    font-family:'Inter', monospace; font-size:10px; font-weight:700; line-height:16px;
  }
  .chat-thread{
    display:flex; flex-direction:column; gap:10px;
    max-height:420px; overflow-y:auto; padding:14px;
    background: var(--bg-raised); border:1px solid var(--line); border-radius:2px;
    margin-bottom:14px;
  }
  .chat-bubble-row{ display:flex; }
  .chat-bubble-row.mine{ justify-content:flex-end; }
  .chat-bubble-row.theirs{ justify-content:flex-start; }
  .chat-bubble{
    max-width:78%; background: var(--bg-card); border:1px solid var(--line);
    border-radius:6px; padding:9px 12px;
  }
  .chat-bubble-row.mine .chat-bubble{ background: rgba(31,95,168,0.12); border-color: var(--gold); }
  .chat-bubble-from{
    font-family:'Inter', sans-serif; font-weight:600; font-size:11.5px;
    color: var(--gold); margin-bottom:3px;
  }
  .chat-bubble-text{ font-size:13.5px; color: var(--text); white-space:pre-wrap; word-break:break-word; }
  .chat-bubble-time{ font-family:'Inter', monospace; font-size:10px; color: var(--text-faint); margin-top:5px; }
  .chat-input-row textarea{
    width:100%; min-height:70px; resize:vertical;
    background: var(--bg-raised); border:1px solid var(--line); color: var(--text);
    font-family:'Inter', sans-serif; font-size:14px; padding:10px 12px; border-radius:2px;
  }
  .chat-input-actions{
    display:flex; align-items:center; gap:10px; margin-top:10px; flex-wrap:wrap;
  }
  .chat-image-preview-name{ font-family:'Inter', monospace; font-size:11px; color: var(--text-dim); }
  @media (max-width:600px){ .chat-bubble{ max-width:90%; } }

  #globalToast{
    position: fixed; left:50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
    background: var(--bg-card); border: 1px solid var(--gold); color: var(--text);
    font-family:'Inter', sans-serif; font-size: 13.5px;
    padding: 12px 20px; border-radius: 4px; box-shadow: 0 6px 24px rgba(0,0,0,0.35);
    max-width: 90vw; text-align:center; z-index: 9999;
    opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  }
  #globalToast.show{ opacity: 1; transform: translateX(-50%) translateY(0); }

  /* ---------- Banderole d'information défilante ---------- */
  .ticker-banner{
    width:100%; overflow:hidden; background: var(--bg-raised);
    border-bottom: 1px solid var(--gold); padding: 7px 0;
  }
  .ticker-track{
    display:inline-flex; white-space:nowrap; width:max-content;
    animation: ticker-scroll linear infinite;
    font-family:'Inter', monospace; font-size: 12.5px; color: var(--gold);
    letter-spacing: 0.2px;
  }
  .ticker-track .ticker-item{ padding-right: 60px; }
  @keyframes ticker-scroll{
    from{ transform: translateX(0); }
    to{ transform: translateX(-50%); }
  }
  @media (prefers-reduced-motion: reduce){
    .ticker-track{ animation: none; }
  }
  .rainbow-text{
    background: linear-gradient(90deg, #ff3b3b, #ff9c33, #ffe83b, #4ade80, #33c9ff, #7c5cff, #ff3ba9, #ff3b3b);
    background-size: 400% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent !important;
    animation: ticker-rainbow 4s linear infinite;
  }
  span.ticker-item.rainbow-text{ display:inline-block; }
  @keyframes ticker-rainbow{
    0%{ background-position: 0% 50%; }
    100%{ background-position: 400% 50%; }
  }

  /* ---------- Roue de la Fortune ---------- */
  .wheel-wrap{ position:relative; width:320px; max-width:100%; margin:0 auto 18px; }
  @media (max-width: 420px){
    .wheel-slice-label span{ font-size:10.5px; max-width:64px; margin-left:10px; }
  }
  .wheel-disc{
    width:100%; aspect-ratio:1/1; border-radius:50%; position:relative;
    border: 6px solid var(--gold); box-shadow: 0 0 0 2px var(--bg-card), 0 10px 30px rgba(0,0,0,0.4);
    transition: transform cubic-bezier(0.15, 0.65, 0.25, 1);
  }
  .wheel-slice-label{
    position:absolute; top:50%; left:50%; width:50%; height:0;
    transform-origin: 0% 0%;
    display:flex; align-items:center; pointer-events:none;
  }
  .wheel-slice-label span{
    display:inline-block; margin-left:16px;
    font-family:'Inter', sans-serif; font-weight:700; font-size:12px; color:#fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.7);
    max-width:88px; white-space:normal; line-height:1.15;
  }
  .wheel-slice-label span.rainbow-text{ text-shadow: none; }
  .wheel-pointer{
    position:absolute; top:-14px; left:50%; transform:translateX(-50%);
    font-size:28px; color: var(--gold); z-index:2; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5));
    animation: pointerBounce 1.6s ease-in-out infinite;
  }
  @keyframes pointerBounce{
    0%, 100%{ transform: translateX(-50%) translateY(0); }
    50%{ transform: translateX(-50%) translateY(4px); }
  }
  .wheel-legend{ display:flex; flex-wrap:wrap; gap:10px 18px; justify-content:center; margin-bottom:14px; }
  .wheel-legend-item{ display:flex; align-items:center; gap:6px; font-size:12.5px; color: var(--text-dim); }
  .wheel-legend-swatch{ width:12px; height:12px; border-radius:3px; flex-shrink:0; }
  .wheel-segment-row{
    display:grid; grid-template-columns: auto 1fr 90px 1fr 90px auto auto auto auto;
    gap:8px; align-items:center; padding:8px; border:1px solid var(--line); border-radius:2px; margin-bottom:8px;
    background: var(--bg-raised);
  }
  .wheel-segment-row input[type="color"]{ width:36px; height:32px; padding:0; border:1px solid var(--line); cursor:pointer; }
  .wheel-segment-row input[type="text"], .wheel-segment-row input[type="number"]{
    background: var(--bg-card); border:1px solid var(--line); color: var(--text);
    font-family:'Inter', sans-serif; font-size:12.5px; padding:6px 8px; border-radius:2px; width:100%;
  }
  .wheel-segment-row button{
    font-family:'Inter', monospace; font-size:10.5px; background:transparent;
    border:1px solid var(--line); color: var(--text-dim); padding:6px 8px; cursor:pointer; border-radius:2px;
  }
  .wheel-segment-row button:hover{ border-color: var(--gold); color: var(--gold); }
  @media (max-width: 900px){ .wheel-segment-row{ grid-template-columns: 1fr 1fr; } }

  .lot-row{
    display:grid; grid-template-columns: auto 2fr 1fr auto; gap:8px; align-items:center;
    padding:8px; border:1px solid var(--line); border-radius:2px; margin-bottom:8px; background: var(--bg-raised);
  }
  .lot-row input{
    background: var(--bg-card); border:1px solid var(--line); color: var(--text);
    font-family:'Inter', sans-serif; font-size:12.5px; padding:6px 8px; border-radius:2px; width:100%;
  }

  .tabs button.ev-admin-only.hidden-tab, .subtabs .subtab.ev-admin-only.hidden-tab{ display:none; }

  .cp-section-row{
    border:1px solid var(--line); border-radius:6px; padding:14px; margin-bottom:14px; background: var(--bg-raised);
  }
  .cp-section-row input, .cp-section-row textarea{
    width:100%; background: var(--bg-card); border:1px solid var(--line); color: var(--text);
    font-family:'Inter', sans-serif; font-size:13px; padding:8px 10px; border-radius:4px; margin-bottom:8px;
  }
  .cp-section-row textarea{ min-height:120px; font-family:'Inter', monospace; font-size:12.5px; line-height:1.5; }
  .cp-section-row .cp-section-actions{ display:flex; gap:8px; justify-content:flex-end; }
  .cp-section-row .cp-section-actions button{
    font-family:'Inter', monospace; font-size:10.5px; background:transparent;
    border:1px solid var(--line); color: var(--text-dim); padding:6px 10px; cursor:pointer; border-radius:4px;
  }
  .cp-content h2, .cp-content h3{ font-family:'Inter', sans-serif; color: var(--gold); }
  .cp-content ul{ padding-left:22px; }
  .cp-content img{ max-width:100%; border-radius:6px; margin:10px 0; }
  .cp-content a{ color: var(--gold); }

  /* ---------- Tutoriel guidé interactif (vrais éléments de l'app) ---------- */
  .guided-tour-target{
    position: relative !important;
    z-index: 9995 !important;
    box-shadow: 0 0 0 5px rgba(26,77,143,0.55), 0 0 0 9999px rgba(8,16,28,0.6) !important;
    border-radius: 8px;
    transition: box-shadow .25s ease;
  }
  .guided-tour-bubble{
    position: fixed; z-index: 9996; width: 300px; max-width: calc(100vw - 24px);
    background: var(--bg-card); border: 1px solid var(--gold); border-radius: 8px;
    box-shadow: 0 16px 40px rgba(0,0,0,.4); padding: 16px 18px;
    font-family:'Inter', sans-serif;
  }
  .guided-tour-bubble.docked-bottom{
    left: 12px; right: 12px; width:auto; max-width:none;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)); top:auto !important;
  }
  .guided-tour-progress{ height:5px; background: var(--line); border-radius:3px; overflow:hidden; margin-bottom:8px; }
  .guided-tour-progress-bar{ height:100%; background: var(--gold); transition: width .3s ease; }
  .guided-tour-step-label{ font-family:'Inter', monospace; font-size:11px; color: var(--text-faint); margin-bottom:10px; }
  .guided-tour-robot{ font-size:26px; margin-bottom:6px; line-height:1; }
  .guided-tour-text{ font-size:13.5px; color: var(--text); line-height:1.55; margin-bottom:14px; }
  .guided-tour-actions{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
  .guided-tour-actions button{
    font-family:'Inter', monospace; font-size:10.5px; padding:7px 10px; border-radius:4px;
    border:1px solid var(--line); background: var(--bg-raised); color: var(--text-dim); cursor:pointer;
  }
  .guided-tour-actions button:hover{ border-color: var(--gold); color: var(--gold); }
  .guided-tour-actions button#guidedTourCloseBtn{ margin-left:auto; }
  .guided-tour-actions button#guidedTourNextBtn{ background: var(--gold); border-color: var(--gold); color:#fff; }
  .guided-tour-resume-banner{
    position: fixed; bottom: 20px; left:50%; transform: translateX(-50%); z-index: 9997;
    background: var(--bg-card); border: 1px solid var(--gold); border-radius: 8px; padding: 16px 20px;
    box-shadow: 0 16px 40px rgba(0,0,0,.4); max-width: 340px; text-align:center;
    font-family:'Inter', sans-serif; font-size:13.5px; color: var(--text);
  }
  .guided-tour-resume-banner .guided-tour-actions{ justify-content:center; margin-top:12px; }
  .tutorial-launch-btn{
    display:block; width:100%; text-align:left; margin-top:6px;
    background: var(--bg-raised); border: 1px solid var(--gold); color: var(--gold);
    font-family:'Inter', sans-serif; font-weight:600; font-size:13.5px;
    padding:12px 14px; border-radius:4px; cursor:pointer;
  }
  .tutorial-launch-btn:hover{ background: var(--gold); color:#fff; }
  @media (max-width: 640px){
    .guided-tour-bubble:not(.docked-bottom){ display:none; }
    .guided-tour-bubble.docked-bottom{ display:block; }
  }

  .image-lightbox{
    display:none; position:fixed; inset:0; z-index:500;
    background: rgba(10,15,20,0.9);
    align-items:center; justify-content:center; padding: 24px;
    cursor: zoom-out;
  }
  .image-lightbox.show{ display:flex; }
  .image-lightbox img{ max-width: 92vw; max-height: 92vh; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
  .proof-thumb{ cursor: zoom-in; transition: opacity .15s ease; }
  .proof-thumb:hover{ opacity: .85; }
  .tutorial-fab{
    display:none;
    position: fixed; bottom: 22px; right: 22px; z-index: 300;
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--gold); color: var(--bg); border: none;
    font-family:'Inter', sans-serif; font-weight:700; font-size: 22px;
    cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,.25);
    transition: transform .15s ease;
  }
  .tutorial-fab:hover{ transform: scale(1.08); }
  .tutorial-fab.show{ display:flex; align-items:center; justify-content:center; }
  .tutorial-modal{
    display:none; position:fixed; inset:0; z-index: 400;
    background: rgba(10,15,20,0.6);
    align-items:center; justify-content:center; padding: 24px;
  }
  .tutorial-modal.show{ display:flex; }
  .tutorial-card{
    background: var(--bg-card); border: 1px solid var(--line);
    max-width: 640px; width:100%; max-height: 84vh; overflow-y: auto;
    padding: 0;
  }
  .tutorial-header{
    display:flex; align-items:center; justify-content:space-between;
    padding: 18px 22px; border-bottom: 1px solid var(--line);
    position: sticky; top:0; background: var(--bg-card);
  }
  .tutorial-header button{
    background:transparent; border: 1px solid var(--line); color: var(--text-dim);
    width: 30px; height:30px; cursor:pointer; font-size:14px;
  }
  .tutorial-body{ padding: 20px 22px; }
  .tutorial-section{ margin-bottom: 20px; }
  .tutorial-section h3{ font-family:'Inter', sans-serif; font-size: 15px; margin: 0 0 6px; color: var(--gold); }
  .tutorial-section p{ font-size: 13.5px; color: var(--text-dim); line-height:1.6; margin:0; }

  .history-item{
    background: var(--bg-card); border: 1px solid var(--line); padding: 14px 16px;
    margin-bottom: 10px; display:flex; justify-content:space-between; gap:14px; flex-wrap:wrap;
    align-items:center;
  }
  .history-item .htxt{ font-size: 13px; max-width: 60%; }
  .history-item .hmeta{ font-family:'Inter', monospace; font-size: 11px; color: var(--text-faint); }
  .badge{
    font-family:'Inter', monospace; font-size: 10.5px; padding: 4px 9px; border: 1px solid;
    text-transform:uppercase; letter-spacing:0.3px; white-space:nowrap;
  }
  .badge.pending{ color: var(--amber); border-color: var(--amber); }
  .badge.accepted{ color: var(--emerald); border-color: var(--emerald); }
  .badge.refused{ color: var(--red); border-color: var(--red); }

  /* ===================== TAB 2 — EMPLOYÉS ===================== */
  .roster-toolbar{ display:flex; gap: 10px; margin-bottom: 16px; flex-wrap:wrap; }
  .roster-toolbar .chip{
    font-family:'Inter', monospace; font-size: 11.5px;
    padding: 6px 12px; border: 1px solid var(--line); color: var(--text-dim);
  }
  .roster-wrap{ border: 1px solid var(--line); overflow-x: auto; }
  table.roster{ width:100%; border-collapse: collapse; font-size: 13.5px; min-width: 620px; }
  table.roster thead th{
    text-align:left; font-family:'Inter', monospace; font-weight:500;
    font-size: 11px; letter-spacing:0.4px; text-transform: uppercase;
    color: var(--text-faint); background: var(--bg-raised);
    padding: 11px 14px; border-bottom: 1px solid var(--line);
  }
  table.roster td{ padding: 11px 14px; border-bottom: 1px solid var(--line-soft); color: var(--text); }
  table.roster tbody tr:hover{ background: var(--bg-card); }
  .mat{ font-family:'Inter', monospace; color: var(--text-dim); }
  .who{ display:flex; align-items:center; gap:10px; }
  .avatar{
    width: 26px; height:26px; border: 1px solid var(--line);
    display:flex;align-items:center;justify-content:center;
    font-family:'Inter', sans-serif; font-size: 11px; color: var(--gold); flex-shrink:0;
  }
  .status-dot{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; }
  .status-dot::before{ content:""; width:6px;height:6px;border-radius:50%; background: var(--emerald); }
  .status-dot.off::before{ background: var(--text-faint); }

  /* ===================== TAB 3 — DIRECTION ===================== */
  .kpi-row{
    display:grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
    background: var(--line); border: 1px solid var(--line); margin-bottom: 28px;
  }
  .kpi{ background: var(--bg-card); padding: 18px 20px; position:relative; overflow:hidden; }
  .fin-reset-btn, .fin-adjust-btn{
    display:block; margin-top:10px; font-family:'Inter', monospace; font-size:10.5px;
    background:transparent; border:1px solid var(--line); color: var(--text-dim);
    padding:5px 9px; cursor:pointer; border-radius:4px;
  }
  .fin-reset-btn:hover, .fin-adjust-btn:hover{ border-color: var(--gold); color: var(--gold); }
  .kpi::before{ content:''; position:absolute; top:0; left:0; right:0; height:3px; background: var(--accent-grad); opacity:0; transition: opacity .2s ease; }
  .kpi:hover::before{ opacity:1; }
  .kpi .label{ font-family:'Inter', monospace; font-size: 10.5px; color: var(--text-faint); text-transform:uppercase; letter-spacing:0.4px; }
  .kpi .value{
    font-family:'Inter', sans-serif; font-size: 27px; font-weight:800; margin-top: 6px;
    background: var(--accent-grad); -webkit-background-clip:text; background-clip:text; color:transparent;
  }
  .kpi .sub{ font-size:11.5px; color: var(--text-dim); margin-top:4px; }
  @media (max-width: 760px){ .kpi-row{ grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 420px){
    .kpi-row{ grid-template-columns: 1fr; }
    .kpi{ padding: 14px 16px; }
    .kpi .value{ font-size: 22px; }
  }

  .requests-block{
    background: var(--bg-card); border: 1px solid var(--line); border-top: 3px solid var(--gold);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 20px; margin-bottom: 24px;
  }
  .dir-categories{
    display:flex; gap: 8px; margin-bottom: 18px; flex-wrap:wrap;
  }
  .dir-categories .dir-cat{
    appearance:none; border: 1px solid var(--line); background: var(--bg-card);
    color: var(--text-dim); font-family:'Inter', sans-serif; font-weight:600;
    font-size: 13px; letter-spacing:0.2px; padding: 10px 18px; cursor:pointer; border-radius: 2px;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
  }
  .dir-categories .dir-cat:hover{ border-color: var(--gold); color: var(--text); }
  .dir-categories .dir-cat.active{ background: var(--gold); color: var(--bg); border-color: var(--gold); }
  .dir-categories .dir-cat.hidden-tab{ display:none; }

  .subtabs{
    display:flex; gap: 6px; margin-bottom: 22px; border-bottom: 1px solid var(--line);
  }
  .subtabs .subtab.cat-hidden{ display:none; }
  .subtabs .subtab{
    appearance:none; border:none; background:transparent;
    color: var(--text-dim); font-family:'Inter', sans-serif; font-weight:600;
    font-size: 13.5px; padding: 10px 4px; margin-right: 18px; cursor:pointer;
    border-bottom: 3px solid transparent; margin-bottom:-1px;
    position: relative; transition: color .18s ease;
  }
  .subtabs .subtab:hover{ color: var(--gold); }
  .subtabs .subtab.active{
    color: var(--gold); border-bottom-color: var(--amber); font-weight:700;
  }
  .subpanel{ display:none; }
  .subpanel.active{ display:block; animation: fadein .2s ease; }

  .company-summary-card{
    border: 1px solid var(--line); background: var(--bg-raised);
    padding: 14px 16px; margin-bottom: 12px;
  }
  .company-summary-top{
    display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:8px;
    margin-bottom: 10px;
  }
  .company-summary-top .csname{ font-family:'Inter', sans-serif; font-weight:600; font-size:15px; }
  .company-summary-top .cstotal{ font-family:'Inter', monospace; font-size:12px; color: var(--gold); }
  .cs-counts{ display:flex; gap:14px; font-size:11.5px; color: var(--text-dim); margin-bottom:10px; }
  .cs-counts span b{ color: var(--text); }
  .cs-ads{ display:flex; flex-direction:column; gap:6px; }
  .cs-ad{
    display:flex; justify-content:space-between; gap:10px; font-size:12.5px;
    padding: 7px 0; border-top: 1px solid var(--line-soft); color: var(--text-dim);
  }
  .cs-ad .cstxt{ color: var(--text); max-width: 70%; }

  .planning-date{
    font-family:'Inter', monospace; font-size: 12px; color: var(--gold);
    text-transform: uppercase; letter-spacing: 0.4px; margin: 0 0 16px;
  }
  .planning-nav{ display:flex; gap: 10px; margin-bottom: 16px; flex-wrap:wrap; }
  .planning-nav button{
    font-family:'Inter', sans-serif; font-size: 13px; font-weight:500;
    background: var(--bg-card); border: 1px solid var(--line); color: var(--text-dim);
    padding: 8px 14px; cursor:pointer; border-radius: 2px; transition: border-color .15s ease, color .15s ease;
  }
  .planning-nav button:hover{ border-color: var(--gold); color: var(--gold); }
  .planning-nav button:disabled{ opacity: .4; cursor:not-allowed; }
  .planning-nav button:disabled:hover{ border-color: var(--line); color: var(--text-dim); }
  .schedule-grid{
    border: 1px solid var(--line);
  }
  .schedule-row{
    display:flex; align-items:flex-start; gap: 16px;
    padding: 9px 14px; border-bottom: 1px solid var(--line-soft);
    background: var(--bg-card);
  }
  .schedule-row:last-child{ border-bottom:none; }
  .schedule-row.has-ads{ background: var(--bg-raised); }
  .schedule-row.row-diffused{ background: rgba(255, 214, 51, 0.28); }
  .schedule-row.row-diffused .schedule-time{ color: var(--text-dim); }
  .schedule-row.row-past{ opacity: 0.45; }
  .schedule-row.row-past:hover{ opacity: 0.7; }

  /* Cadre de couleur selon l'état de l'annonce */
  .schedule-row{ border: 2px solid transparent; box-sizing: border-box; }
  .schedule-row.row-state-done{ border-color: var(--emerald); }
  .schedule-row.row-state-missed{ border-color: var(--red); }
  .schedule-row.row-state-current{ border-color: #e8c547; }
  .schedule-row.row-state-future{ border-color: #3b82f6; }
  .schedule-time{
    font-family:'Inter', monospace; font-size: 12px; color: var(--text-faint);
    width: 52px; flex-shrink:0; padding-top: 2px;
  }
  .schedule-row.has-ads .schedule-time{ color: var(--gold); font-weight:600; }
  .schedule-content{ display:flex; flex-wrap:wrap; gap: 6px; flex:1; }
  .schedule-chip{
    font-size: 12.5px; color: #5c1235; padding: 4px 9px;
    border: 1px solid #e0a0c0;
    background: #ffd6e8;
  }
  .schedule-chip b{ color: #8a0f4d; font-weight:700; }
  .service-chip{
    font-size: 12.5px; padding: 4px 9px; border: 1px solid var(--line); font-weight:600;
  }
  .service-chip.type-journaliste{ background: #fff2b0; color: #6b5900; border-color: #e6c94d; }
  .service-chip.type-photo{ background: #c8f5d6; color: #17663a; border-color: #4bbd7a; }
  .service-chip.type-interview{ background: #ffd0cc; color: #7a1f16; border-color: #e0685c; }
  .schedule-empty{ font-size: 12.5px; color: var(--text-faint); }
  .schedule-check{ display:inline-flex; align-items:center; gap:8px; cursor:pointer; }
  .copy-ad-btn{
    display:inline-flex; align-items:center; gap:4px; margin-left:8px;
    font-family:'Inter', monospace; font-size:11px; background:transparent;
    border: 1px solid var(--line); color: var(--text-dim); padding: 4px 8px; border-radius:2px; cursor:pointer;
  }
  .copy-ad-btn:hover{ border-color: var(--gold); color: var(--gold); }
  .copy-ad-btn.copied{ border-color: var(--gold); color: var(--gold); }
  .schedule-check input[type="checkbox"]{ width:15px; height:15px; accent-color: var(--gold); cursor:pointer; }

  .active-ad-card{
    border: 1px solid var(--line); background: var(--bg-raised);
    padding: 14px 16px; margin-bottom: 12px;
  }
  .active-ad-card.is-hidden{ opacity: 0.55; }
  .active-ad-top{ display:flex; justify-content:space-between; align-items:baseline; gap:10px; flex-wrap:wrap; margin-bottom:8px; }
  .active-ad-top .aacompany{ font-family:'Inter', sans-serif; font-weight:600; font-size:15px; }
  .badge.hidden{ color: var(--text-faint); border-color: var(--text-faint); }
  .btn-hide{ background: transparent; border: 1px solid var(--amber) !important; color: var(--amber); }
  .btn-hide:hover{ background: rgba(201,138,58,0.12); }
  .btn-delete{ background: transparent; border: 1px solid var(--red) !important; color: var(--red); }
  .btn-delete:hover{ background: rgba(181,84,74,0.12); }
  .grade-row{
    display:flex; align-items:center; justify-content:space-between; gap:14px;
    border: 1px solid var(--line); background: var(--bg-raised);
    padding: 12px 16px; margin-bottom: 10px;
  }
  .grade-row .gname{ font-family:'Inter', sans-serif; font-weight:600; font-size:14.5px; }
  .grade-row .gprice{ font-family:'Inter', monospace; font-size:13px; color: var(--gold); }
  .grade-row .gprice-edit{
    display:flex; align-items:center; gap:6px;
    font-family:'Inter', monospace; font-size:13px; color: var(--gold);
  }
  .grade-row .gprice-edit input.gprice-input{
    width: 90px; background: var(--bg-card); border: 1px solid var(--line); color: var(--gold);
    font-family:'Inter', monospace; font-size:13px; padding: 5px 8px; border-radius:2px;
  }
  .grade-row .gprice-edit input.gprice-input:focus{ outline:none; border-color: var(--gold); }
  .grade-row .gactions{ display:flex; align-items:center; gap:12px; }
  .grade-row .gactions button{
    font-family:'Inter', monospace; font-size:11px; background:transparent;
    border: 1px solid var(--red); color: var(--red); padding: 5px 9px; cursor:pointer;
  }
  .emp-row{
    display:flex; align-items:center; justify-content:space-between; gap:14px;
    border: 1px solid var(--line); background: var(--bg-raised);
    padding: 12px 16px; margin-bottom: 10px; flex-wrap:wrap;
  }
  .save-status-bar{
    position: sticky; top: 0; z-index: 5;
    display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap;
    background: var(--bg-raised); border: 1px solid var(--line); border-radius:2px;
    padding: 12px 16px; margin-bottom:18px;
    font-family:'Inter', sans-serif; font-size:13px; color: var(--text-dim);
  }
  .save-status-bar.is-saved{ border-color: var(--gold); color: var(--gold); }
  .save-status-bar button{
    font-family:'Inter', sans-serif; font-weight:600; font-size:12.5px; letter-spacing:.02em;
    background: var(--gold); color: #1a1204; border:none; padding: 9px 16px; border-radius:2px; cursor:pointer;
  }
  .save-status-bar button:hover{ filter:brightness(1.08); }
  .debt-amount-edit{
    display:inline-flex; align-items:center; gap:2px;
    font-family:'Inter', sans-serif; font-weight:600; font-size:18px; color: var(--gold);
  }
  .debt-amount-edit input.debt-amount-input{
    width: 130px; background: var(--bg-card); border: 1px solid var(--line); color: var(--gold);
    font-family:'Inter', sans-serif; font-weight:600; font-size:18px; padding: 5px 8px; border-radius:2px;
  }
  .debt-amount-edit input.debt-amount-input:focus{ outline:none; border-color: var(--gold); }
  .debt-paid-check{
    display:flex; align-items:center; gap:8px; margin-top:10px; cursor:pointer;
    font-family:'Inter', sans-serif; font-size:13px; color: var(--text-dim);
  }
  .debt-paid-check input[type="checkbox"]{ width:16px; height:16px; accent-color: var(--gold); cursor:pointer; }
  .emp-row .ename{ font-family:'Inter', sans-serif; font-weight:600; font-size:14.5px; }
  .emp-row select{
    background: var(--bg-card); border: 1px solid var(--line); color: var(--text);
    font-family:'Inter', sans-serif; font-size:13px; padding: 7px 10px; border-radius:2px;
  }
  .perm-table{ width:100%; border-collapse: collapse; font-size: 13px; }
  .perm-table th, .perm-table td{
    padding: 9px 10px; border-bottom: 1px solid var(--line-soft); text-align:center;
  }
  .perm-table th{
    font-family:'Inter', monospace; font-size: 10.5px; text-transform:uppercase;
    letter-spacing:0.3px; color: var(--text-faint); font-weight:500;
  }
  .perm-table td:first-child, .perm-table th:first-child{ text-align:left; }
  .perm-table td:first-child{ font-family:'Inter', sans-serif; font-weight:600; color: var(--text); }
  .perm-table input[type="checkbox"]{ width:15px; height:15px; accent-color: var(--gold); cursor:pointer; }
  @media (max-width: 760px){
    .perm-table td{ padding: 14px 10px; }
    .perm-table input[type="checkbox"]{ width:22px; height:22px; }
  }

  /* Interrupteur ON/OFF pour les permissions : bien plus grand et plus clair
     qu'une petite case à cocher, surtout au doigt sur téléphone. */
  .perm-switch{
    position:relative; display:inline-block; width:50px; height:28px; vertical-align:middle;
  }
  .perm-switch input{
    position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; z-index:2;
  }
  .perm-switch .slider{
    position:absolute; inset:0; background: var(--line); border-radius:999px;
    transition: background .18s ease; pointer-events:none;
  }
  .perm-switch .slider::before{
    content:''; position:absolute; width:22px; height:22px; left:3px; top:3px;
    background:#fff; border-radius:50%; box-shadow:0 1px 3px rgba(0,0,0,.35);
    transition: transform .18s ease;
  }
  .perm-switch input:checked + .slider{ background: var(--emerald); }
  .perm-switch input:checked + .slider::before{ transform: translateX(22px); }
  .perm-switch input:focus-visible + .slider{ outline:2px solid var(--gold); outline-offset:2px; }
  @media (max-width: 760px){
    .perm-switch{ width:58px; height:32px; }
    .perm-switch .slider::before{ width:26px; height:26px; }
    .perm-switch input:checked + .slider::before{ transform: translateX(26px); }
  }
  .account-row{
    display:flex; align-items:center; justify-content:space-between; gap:14px;
    border: 1px solid var(--line); background: var(--bg-raised);
    padding: 12px 16px; margin-bottom: 10px; flex-wrap:wrap;
  }
  .account-row .aname{ font-family:'Inter', sans-serif; font-weight:600; font-size:14.5px; }
  .account-row .acreds{ font-family:'Inter', monospace; font-size:12.5px; color: var(--text-dim); }
  .account-row .acreds b{ color: var(--gold); }
  .account-row button{
    font-family:'Inter', monospace; font-size:11px; background:transparent;
    border: 1px solid var(--red); color: var(--red); padding: 5px 9px; cursor:pointer;
  }
  .account-row button.btn-change-pass{ border-color: var(--gold); color: var(--gold); }
  .account-row .change-pass-zone{ flex-basis:100%; width:100%; }
  .new-account-card{
    border: 1px solid var(--emerald); background: rgba(76,138,106,0.1);
    padding: 14px 16px; margin-bottom: 8px;
  }
  .new-account-card .nac-title{ font-family:'Inter', monospace; font-size:11px; color: var(--emerald); text-transform:uppercase; letter-spacing:0.3px; margin-bottom:8px; }
  .new-account-card .nac-creds{ font-family:'Inter', monospace; font-size:14px; color: var(--text); }
  .new-account-card .nac-creds b{ color: var(--gold); }
  .id-subpanel{ display:none; }
  .id-subpanel.active{ display:block; }
  .demande-form-block{ display:none; }
  .demande-form-block.active{ display:block; }
  .id-tabs{ display:flex; gap: 6px; border-bottom: 1px solid var(--line); }
  .id-tabs .id-tab{
    appearance:none; border:none; background:transparent;
    color: var(--text-dim); font-family:'Inter', sans-serif; font-weight:500;
    font-size: 13.5px; padding: 10px 4px; margin-right: 18px; cursor:pointer;
    border-bottom: 2px solid transparent; margin-bottom:-1px;
  }
  .id-tabs .id-tab:hover{ color: var(--text); }
  .id-tabs .id-tab.active{ color: var(--gold); border-bottom-color: var(--gold); font-weight:600; }
  .profil-tabs{ display:flex; gap: 6px; border-bottom: 1px solid var(--line); }
  .profil-tabs .profil-tab{
    appearance:none; border:none; background:transparent;
    color: var(--text-dim); font-family:'Inter', sans-serif; font-weight:500;
    font-size: 13.5px; padding: 10px 4px; margin-right: 18px; cursor:pointer;
    border-bottom: 2px solid transparent; margin-bottom:-1px;
  }
  .profil-tabs .profil-tab:hover{ color: var(--text); }
  .profil-tabs .profil-tab.active{ color: var(--gold); border-bottom-color: var(--gold); font-weight:600; }
  .blur-cred{
    filter: blur(5px);
    cursor: pointer;
    user-select: none;
    transition: filter .15s ease;
    display: inline-block;
  }
  .blur-cred.revealed{ filter: none; }
  .blur-cred:hover{ filter: blur(3px); }
  .blur-cred.revealed:hover{ filter: none; }
  .confirm-row{ display:flex; align-items:center; gap:10px; }
  .confirm-row span{ font-size:12px; color: var(--text-dim); }
  .confirm-row .btn-confirm-yes{
    font-family:'Inter', monospace; font-size:11px; background:var(--red);
    border:none; color:#fff; padding: 5px 10px; cursor:pointer;
  }
  .confirm-row .btn-confirm-no{
    font-family:'Inter', monospace; font-size:11px; background:transparent;
    border:1px solid var(--line); color: var(--text-dim); padding: 5px 10px; cursor:pointer;
  }
  .requests-block h2, .history-block h2, .dash-block h2, .tutorial-header h2{
    font-family:'Inter', sans-serif; font-weight:700; letter-spacing: 0.2px;
    position: relative; padding-left: 14px;
  }
  .requests-block h2::before, .history-block h2::before, .dash-block h2::before{
    content: ''; position:absolute; left:0; top:2px; bottom:2px; width:4px;
    border-radius:3px; background: var(--accent-grad);
  }
  .requests-block h2{ font-size: 16px; margin: 0 0 16px; }
  .history-block h2{ font-size: 17px; margin: 0 0 14px; }
  .tutorial-header h2{ font-size: 18px; margin:0; padding-left:0; }
  .dash-block h2{ font-size: 15px; margin: 0 0 16px; }
  .requests-empty{ font-size: 13px; color: var(--text-faint); font-style:italic; }
  .request-card{
    border: 1px solid var(--line); background: var(--bg-raised);
    padding: 14px 16px; margin-bottom: 12px;
  }
  .request-top{ display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:8px; }
  .request-top .rcompany{ font-family:'Inter', sans-serif; font-weight:600; font-size:15px; }
  .request-text{ font-size: 13.5px; color: var(--text); margin: 8px 0; line-height:1.5; }
  .request-details{
    display:grid; grid-template-columns: repeat(4,1fr); gap: 8px 14px; font-size:12px;
    color: var(--text-dim); margin-bottom: 12px;
  }
  .request-details span{ display:block; font-family:'Inter', monospace; font-size:10px; color: var(--text-faint); text-transform:uppercase; letter-spacing:0.3px; }
  @media (max-width:700px){ .request-details{ grid-template-columns: repeat(2,1fr); } }
  .request-actions{ display:flex; gap: 10px; }
  .request-actions button{
    font-family:'Inter', sans-serif; font-weight:700; font-size:12.5px;
    border:none; padding: 9px 16px; cursor:pointer; border-radius:6px;
    transition: transform .15s ease, box-shadow .15s ease;
  }
  .btn-accept{ background: linear-gradient(120deg, #218143, #0e8a5f); color: #fff; box-shadow: 0 4px 12px rgba(22,168,116,.3); }
  .btn-accept:hover{ transform: translateY(-2px); box-shadow: 0 8px 18px rgba(22,168,116,.4); }
  .btn-refuse{ background: transparent; border: 1px solid var(--red) !important; color: var(--red); }
  .btn-refuse:hover{ background: rgba(220,63,74,0.1); }

  .dash-grid{ display:grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
  @media (max-width: 900px){ .dash-grid{ grid-template-columns: 1fr; } }
  .dash-block{ background: var(--bg-card); border: 1px solid var(--line); padding: 20px; }

  .bar-row{ margin-bottom: 12px; }
  .bar-row .bar-label{ display:flex; justify-content:space-between; font-size: 12.5px; margin-bottom: 5px; color: var(--text-dim); }
  .bar-row .bar-label b{ color: var(--text); font-weight:500; }
  .bar-track{ height: 7px; background: var(--bg-raised); border:1px solid var(--line-soft); }
  .bar-fill{ height:100%; background: var(--gold-dim); }

  .log-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:14px; }
  .log-list li{ font-size: 13px; border-left: 2px solid var(--line); padding-left: 12px; }
  .log-list li time{ display:block; font-family:'Inter', monospace; font-size: 10.5px; color: var(--text-faint); margin-bottom: 3px; }
  .log-list li p{ margin:0; color: var(--text); line-height:1.4; }

  footer{
    text-align:center; padding: 20px; font-family:'Inter', monospace;
    font-size: 10.5px; color: var(--text-faint); border-top: 1px solid var(--line);
  }
