:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI',Arial,sans-serif;color:#101f39;background:#f5f8fc;font-size:16px}*{box-sizing:border-box}body{margin:0}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}.rail{position:fixed;width:76px;background:linear-gradient(180deg,#102344,#172a54);top:0;left:0;bottom:0;z-index:20;display:flex;align-items:center;flex-direction:column;gap:8px;padding:16px 8px;overflow:auto}.brand-icon{display:block;width:55px;height:60px;margin-bottom:17px}.brand-icon img{width:100%;height:100%;object-fit:contain;border-radius:10px;background:white}.rail-link{border-radius:17px;color:#dce7ff;display:flex;justify-content:center;align-items:center;min-height:46px;width:55px;font-size:26px;transition:background .2s}.rail-link:hover,.rail-link.active{background:#ffce1d;color:#15223e}.rail-label{display:none}.shell.logged{margin-left:76px}.header{min-height:87px;background:white;border-bottom:1px solid #e7edf5;display:flex;justify-content:space-between;align-items:center;padding:12px clamp(16px,4vw,50px);gap:16px}.brand{display:flex;align-items:center;gap:12px}.brand img{width:52px;height:52px;object-fit:contain}.brand strong{font-size:20px;font-weight:850;color:#103d37}.brand small{font-size:12px;display:block;color:#586477}.header-actions{display:flex;align-items:center;gap:12px}.who{font-size:14px;color:#506077}.body{padding:clamp(18px,3vw,48px);max-width:1550px;margin:0 auto}.pagehead{display:flex;align-items:center;justify-content:space-between;margin-bottom:28px;gap:12px}.pagehead h1{font-size:clamp(30px,4vw,50px);letter-spacing:-1.5px;line-height:1.1;margin:0}.pagehead p{color:#68768b;margin:10px 0}.actions-main{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px}.action{min-height:160px;border-radius:24px;position:relative;padding:25px;display:flex;flex-direction:column;justify-content:space-between;color:#fff;grid-column:span 2;box-shadow:0 6px 13px #12234a17;overflow:hidden}.action.big{grid-column:span 3;min-height:205px}.action strong{font-size:clamp(19px,2.5vw,28px);letter-spacing:-.4px;line-height:1.1;max-width:80%}.action-icon{font-size:46px;line-height:1}.action-arrow{border-radius:100%;background:#ffffff55;font-size:25px;position:absolute;right:20px;bottom:20px;width:40px;height:40px;display:grid;place-items:center}.action.blue{background:linear-gradient(125deg,#308cf5,#1264d9)}.action.yellow{background:linear-gradient(125deg,#ffd852,#f9b618);color:#15223e}.action.green{background:linear-gradient(125deg,#60d66e,#20a349)}.action.purple{background:linear-gradient(125deg,#ad95ef,#775ce3)}.action.pink{background:linear-gradient(125deg,#ff6f96,#f0376d)}.action:hover{filter:brightness(1.04);transform:translateY(-2px)}.shortcuts{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-top:22px}.shortcut{min-height:155px;border:1px solid #e3e9f3;background:white;border-radius:24px;box-shadow:0 5px 13px #10234410;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;padding:12px;text-align:center}.shortcut span{font-size:37px;color:#1676b7}.shortcut strong{font-size:15px}.shortcut:hover{border-color:#1a75d1}.btn,.ghost{border-radius:12px;border:0;min-height:44px;padding:10px 17px;display:inline-flex;align-items:center;justify-content:center;font-weight:700}.btn.blue{background:#176de8;color:white}.btn.minor{background:#e8f1ff;color:#1356b4;margin-top:9px}.ghost{background:#ecf1f7;color:#293b58}.twocol{display:grid;grid-template-columns:minmax(250px,430px) minmax(0,1fr);gap:20px;align-items:start}.panel{border:1px solid #e4ebf4;background:white;border-radius:22px;padding:clamp(16px,2vw,26px);box-shadow:0 4px 18px #1d335609;min-width:0}.panel h2{font-size:22px;margin:0 0 19px}.form{display:flex;flex-direction:column;gap:14px}.form label{display:flex;flex-direction:column;gap:6px;color:#394a61;font-size:14px;font-weight:600}.form input,.form select,.form textarea{width:100%;border:1px solid #d5deeb;background:#fbfdff;border-radius:12px;padding:12px;min-height:46px;color:#18263f}.form .check{flex-direction:row;align-items:center}.form .check input{width:auto;min-height:auto}.line{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #eaf0f6;padding:13px 0;gap:12px}.line:last-child{border-bottom:none}.line small,.record small{display:block;color:#68768b;margin-top:5px}.tag{display:inline-flex;border-radius:50px;padding:6px 11px;background:#e8f3f5;color:#13626b;font-size:12px;white-space:nowrap}.record{border:1px solid #e8edf5;border-radius:14px;padding:14px;margin-bottom:14px}.record .form{margin-top:12px}.muted{color:#66758b;font-size:14px}.flash{border-radius:12px;padding:16px;margin-bottom:20px}.flash.success{background:#e2f7ed;color:#165c3e}.flash.error{background:#fff0ef;color:#96352c}.login-panel{max-width:430px;margin:60px auto;background:white;border-radius:24px;padding:32px;box-shadow:0 8px 30px #1d33561a}.login-panel h1{margin:0}.login-panel p{color:#697689;margin-bottom:26px}.hero{background:linear-gradient(125deg,#102344,#096c66);color:white;border-radius:32px;padding:clamp(30px,6vw,85px);display:flex;gap:20px;align-items:center}.hero h1{font-size:clamp(35px,5vw,72px);max-width:660px;line-height:1.04}.hero p{line-height:1.6;max-width:600px}.hero-icon{font-size:100px;white-space:nowrap}.notice{margin-top:20px;border-radius:14px;background:#fff2dc;padding:18px;color:#745221}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.metrics>div{background:#f1f6fb;border-radius:14px;padding:16px}.metrics b{display:block;font-size:26px}.metrics small{font-size:12px;color:#53647e}@media(max-width:850px){.twocol{grid-template-columns:1fr}.shortcuts{grid-template-columns:repeat(3,1fr)}.who{display:none}.metrics{grid-template-columns:repeat(2,1fr)}}@media(max-width:650px){.rail{width:55px;padding:12px 5px}.rail-link{width:43px;font-size:21px}.shell.logged{margin-left:55px}.brand small{display:none}.brand strong{font-size:14px}.brand img{width:40px;height:40px}.header{padding:10px}.body{padding:16px}.actions-main{gap:10px}.action,.action.big{grid-column:span 6;min-height:125px}.shortcuts{grid-template-columns:repeat(2,1fr)}.shortcut{min-height:115px}.hero-icon{display:none}.pagehead h1{font-size:30px}}

/* NEGESO V1 — Adaptation prioritaire aux tablettes (portrait et paysage). */
@media (min-width: 421px) and (max-width: 850px) {
  .body { padding: 18px; }
  .pagehead { margin-bottom: 18px; }
  .pagehead h1 { font-size: 34px; }
  .pagehead p { margin: 7px 0 0; }
  .actions-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .action,
  .action.big {
    grid-column: span 1;
    min-height: 138px;
    border-radius: 19px;
    padding: 18px;
  }
  .action.big:first-child {
    grid-column: 1 / -1;
    min-height: 154px;
  }
  .action strong {
    font-size: clamp(17px, 2.7vw, 23px);
    max-width: calc(100% - 20px);
    line-height: 1.15;
  }
  .action-icon { font-size: 32px; }
  .action-arrow {
    width: 32px;
    height: 32px;
    right: 12px;
    bottom: 12px;
    font-size: 21px;
  }
  .shortcuts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
  }
  .shortcut {
    min-height: 110px;
    gap: 9px;
    padding: 10px;
    border-radius: 18px;
  }
  .shortcut span { font-size: 30px; }
  .shortcut strong { font-size: 13px; line-height: 1.2; }
}

/* Sur tablette étroite, ne pas afficher le même logo deux fois. */
@media (max-width: 650px) {
  .shell.logged .header .brand img { display: none; }
  .header { min-height: 68px; }
  .btn, .ghost { min-height: 44px; }
}

/* Le vrai format téléphone conserve une colonne pour l'administration. */
@media (max-width: 420px) {
  .action, .action.big { min-height: 120px; padding: 18px; }
  .action-icon { font-size: 30px; }
  .action-arrow { width: 32px; height: 32px; right: 13px; bottom: 13px; }
  .shortcut { min-height: 106px; }
}
