/* PORTAIL TIR — Charte graphique commune des pages dédiées — V66W */
:root{
  --pt-primary:#155eef;
  --pt-primary-dark:#0b4cc5;
  --pt-accent:#7c3aed;
  --pt-bg:#eef3fa;
  --pt-card:#ffffff;
  --pt-text:#101828;
  --pt-muted:#667085;
  --pt-line:#dbe3f0;
  --pt-success:#067647;
  --pt-danger:#b42318;
  --pt-warning:#b54708;
  --pt-shadow:0 16px 42px rgba(16,24,40,.12);
  --pt-shadow-soft:0 6px 20px rgba(16,24,40,.08);
}

html{background:var(--pt-bg)}
body.pt-public-page{
  margin:0!important;
  min-height:100vh;
  color:var(--pt-text)!important;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif!important;
  background:
    radial-gradient(circle at 8% 0%,rgba(21,94,239,.16),transparent 30%),
    radial-gradient(circle at 92% 8%,rgba(124,58,237,.12),transparent 28%),
    linear-gradient(145deg,#edf3fa 0%,#f8fafc 48%,#eef4ff 100%)!important;
}
body.pt-public-page *{box-sizing:border-box}
body.pt-public-page .hidden{display:none!important}

/* En-tête commun */
.pt-public-hero{
  position:relative;
  overflow:hidden;
  color:#fff;
  padding:30px 20px 78px;
  background:linear-gradient(130deg,#0b4cc5 0%,#155eef 56%,#7c3aed 100%);
  box-shadow:0 8px 28px rgba(17,54,130,.22);
}
.pt-public-hero::before,.pt-public-hero::after{
  content:"";
  position:absolute;
  border-radius:50%;
  pointer-events:none;
}
.pt-public-hero::before{width:360px;height:360px;right:-120px;top:-190px;background:rgba(255,255,255,.12)}
.pt-public-hero::after{width:230px;height:230px;left:-95px;bottom:-150px;background:rgba(255,255,255,.08)}
.pt-public-hero-inner{
  position:relative;
  z-index:1;
  max-width:1180px;
  margin:0 auto;
  display:flex;
  align-items:center;
  gap:18px;
}
.pt-public-logo{
  width:72px;
  height:72px;
  flex:0 0 72px;
  object-fit:contain;
  padding:7px;
  border-radius:20px;
  background:#fff;
  box-shadow:0 8px 24px rgba(0,0,0,.20);
}
.pt-public-header-copy{min-width:0;flex:1}
.pt-public-kicker{
  margin-bottom:5px;
  font-size:12px;
  line-height:1.2;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
  opacity:.88;
}
.pt-public-title{
  margin:0;
  color:#fff!important;
  font-size:clamp(25px,3vw,34px)!important;
  line-height:1.12;
  font-weight:950!important;
}
.pt-public-subtitle{
  margin:7px 0 0;
  max-width:760px;
  color:rgba(255,255,255,.92)!important;
  font-size:14px;
  line-height:1.45;
}
.pt-public-header-badge{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:9px 13px;
  border:1px solid rgba(255,255,255,.30);
  border-radius:999px;
  background:rgba(255,255,255,.14);
  color:#fff;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
  backdrop-filter:blur(8px);
}

/* Conteneurs */
body.pt-public-page main.wrap,
body.pt-public-page .pt-public-wrap{
  width:100%!important;
  max-width:1180px!important;
  margin:-48px auto 0!important;
  padding:0 16px 30px!important;
  position:relative;
  z-index:2;
}
body.pt-page-search #loginView,
body.pt-page-search #appView{
  position:relative;
  z-index:2;
  width:calc(100% - 32px)!important;
  max-width:1180px!important;
  margin:-48px auto 0!important;
}

/* Carte de connexion commune */
body.pt-public-page #loginPanel.pt-auth-card,
body.pt-public-page #loginView.pt-auth-card{
  width:100%!important;
  max-width:560px!important;
  min-height:0!important;
  margin:0 auto!important;
  padding:23px!important;
  border:1px solid rgba(255,255,255,.86)!important;
  border-radius:24px!important;
  background:rgba(255,255,255,.98)!important;
  box-shadow:var(--pt-shadow)!important;
}
body.pt-page-search #loginView.pt-auth-card{margin:-48px auto 0!important}
body.pt-public-page #loginPanel h2,
body.pt-public-page #loginView .login-title{
  margin:0 0 7px!important;
  color:#0f172a!important;
  font-size:23px!important;
  line-height:1.25;
  font-weight:900!important;
}
body.pt-public-page #loginPanel p,
body.pt-public-page #loginView .login-subtitle,
body.pt-public-page #loginPanel .small{
  color:var(--pt-muted)!important;
  font-size:13px!important;
  line-height:1.5!important;
}
body.pt-public-page .auth-summary,
body.pt-public-page #passwordAccount,
body.pt-public-page #emailAccount{
  margin:0 0 14px;
  padding:10px 12px;
  border:1px solid #cfe0ff;
  border-radius:12px;
  background:#f2f7ff;
  color:#344054!important;
  font-size:13px;
}

/* Champs uniformes */
body.pt-public-page .field,
body.pt-public-page .login-field{margin-bottom:13px!important}
body.pt-public-page label,
body.pt-public-page .login-label{
  display:block;
  margin:0 0 6px!important;
  color:#344054!important;
  font-size:12px!important;
  line-height:1.3;
  font-weight:800!important;
}
body.pt-public-page input,
body.pt-public-page select,
body.pt-public-page textarea{
  width:100%;
  min-height:46px;
  padding:12px 13px!important;
  border:1px solid #cbd5e1!important;
  border-radius:13px!important;
  outline:none!important;
  background:#f8fafc!important;
  color:#101828!important;
  font:inherit!important;
  font-size:15px!important;
  box-shadow:none!important;
  transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
body.pt-public-page .input-wrap input{padding-left:42px!important}
body.pt-public-page input:focus,
body.pt-public-page select:focus,
body.pt-public-page textarea:focus{
  border-color:var(--pt-primary)!important;
  background:#fff!important;
  box-shadow:0 0 0 4px rgba(21,94,239,.13)!important;
}
body.pt-public-page input[readonly],body.pt-public-page input:disabled{
  color:#667085!important;
  background:#eef2f7!important;
}
body.pt-public-page .input-icon{color:#667085!important}

/* Boutons communs */
body.pt-public-page button,
body.pt-public-page .btn{
  min-height:42px;
  padding:10px 15px!important;
  border:1px solid transparent!important;
  border-radius:12px!important;
  background:linear-gradient(135deg,var(--pt-primary-dark),var(--pt-primary))!important;
  color:#fff!important;
  font:inherit!important;
  font-size:13px!important;
  font-weight:850!important;
  line-height:1.2;
  box-shadow:0 5px 14px rgba(21,94,239,.22)!important;
  cursor:pointer;
  transition:transform .12s ease,filter .12s ease,box-shadow .12s ease;
}
body.pt-public-page button:hover,
body.pt-public-page .btn:hover{transform:translateY(-1px);filter:brightness(1.03)}
body.pt-public-page button:disabled,
body.pt-public-page .btn:disabled{opacity:.55!important;cursor:not-allowed!important;transform:none!important;box-shadow:none!important}
body.pt-public-page button.secondary,
body.pt-public-page button.ghost,
body.pt-public-page button.neutral,
body.pt-public-page .btn.secondary,
body.pt-public-page .btn.ghost,
body.pt-public-page .btn.neutral{
  border-color:#d7e0ec!important;
  background:#f1f5f9!important;
  color:#334155!important;
  box-shadow:none!important;
}
body.pt-public-page button.danger,
body.pt-public-page .btn.danger{
  border-color:#b42318!important;
  background:#b42318!important;
  color:#fff!important;
  box-shadow:0 5px 14px rgba(180,35,24,.18)!important;
}
body.pt-public-page button.success,
body.pt-public-page .btn.success{
  border-color:#067647!important;
  background:#067647!important;
  color:#fff!important;
  box-shadow:0 5px 14px rgba(6,118,71,.18)!important;
}
body.pt-public-page .actions,
body.pt-public-page .user-actions,
body.pt-public-page .security-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px!important;
}

/* Messages */
body.pt-public-page .info,
body.pt-public-page .login-info{
  margin-top:14px!important;
  padding:11px 12px!important;
  border:1px solid #bfdbfe!important;
  border-radius:13px!important;
  background:#eff6ff!important;
  color:#1e40af!important;
  font-size:12px!important;
  line-height:1.45!important;
}
body.pt-public-page #loginMsg,
body.pt-public-page #loginStatus{
  min-height:20px;
  margin-top:12px!important;
  font-size:13px!important;
  font-weight:800!important;
}

/* Cartes, navigation et contenu après connexion */
body.pt-public-page .panel,
body.pt-public-page .search-panel,
body.pt-public-page .results-panel,
body.pt-public-page .fiche,
body.pt-public-page .user-bar{
  border:1px solid rgba(219,227,240,.95)!important;
  border-radius:20px!important;
  background:rgba(255,255,255,.97)!important;
  box-shadow:var(--pt-shadow-soft)!important;
}
body.pt-public-page #appPanel.pt-app-shell,
body.pt-public-page #appView.pt-app-shell{position:relative;z-index:2}
body.pt-page-search #appView.pt-app-shell{margin:-48px auto 0!important;padding:0!important}
body.pt-public-page .pt-user-nav,
body.pt-public-page .user-bar.pt-user-nav{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  margin-bottom:14px!important;
  padding:12px 14px!important;
  border:1px solid var(--pt-line)!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.98)!important;
  box-shadow:var(--pt-shadow-soft)!important;
}
body.pt-public-page .avatar{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:44px!important;
  height:44px!important;
  border-radius:14px!important;
  background:linear-gradient(135deg,#dbeafe,#ede9fe)!important;
  color:#1d4ed8!important;
  font-size:21px!important;
  box-shadow:none!important;
}
body.pt-public-page .pt-security-card,
body.pt-public-page .security-box{
  margin:0 0 16px!important;
  padding:17px!important;
  border:1px solid #cfe0ff!important;
  border-radius:18px!important;
  background:linear-gradient(145deg,#f8fbff,#f5f3ff)!important;
  box-shadow:none!important;
}
body.pt-public-page h1,
body.pt-public-page h2,
body.pt-public-page h3{color:#0f172a}
body.pt-public-page .muted,
body.pt-public-page .small,
body.pt-public-page .search-help{color:var(--pt-muted)!important}

/* Recherche licencié : neutralisation de l'ancien chevauchement */
body.pt-page-search .topbar{display:none!important}
body.pt-page-search .app{padding:0 0 30px!important}
body.pt-page-search .search-panel{padding:17px!important}
body.pt-page-search .layout{gap:16px!important}
body.pt-page-search .user-bar{margin-bottom:14px!important}
body.pt-page-search .result-card{border-left-color:var(--pt-primary)!important}
body.pt-page-search .result-card.active{border-color:var(--pt-primary)!important;background:linear-gradient(135deg,#eff6ff,#f5f3ff)!important}
body.pt-page-search .fiche-header{background:linear-gradient(130deg,#0b4cc5,#155eef 58%,#7c3aed)!important}
body.pt-page-search .contact-link{color:#155eef!important}

/* Calendriers et cartes : palette commune sans casser leur structure */
body.pt-public-page .monthbar,
body.pt-public-page .section-title,
body.pt-public-page .search-title-row{border-color:var(--pt-line)!important}
body.pt-public-page .monthtitle,
body.pt-public-page .search-title,
body.pt-public-page .panel-title{color:#0f172a!important;font-weight:900!important}
body.pt-public-page .session,
body.pt-public-page .result-card,
body.pt-public-page .section{
  border-color:var(--pt-line)!important;
  box-shadow:0 3px 12px rgba(16,24,40,.06)!important;
}

/* Pied de page commun */
.pt-public-footer,
body.pt-public-page .footer{
  max-width:1180px;
  margin:0 auto;
  padding:4px 16px 24px;
  color:#667085!important;
  font-size:12px!important;
  text-align:center;
}

@media (max-width:760px){
  .pt-public-hero{padding:21px 14px 68px}
  .pt-public-hero-inner{align-items:flex-start;gap:12px}
  .pt-public-logo{width:54px;height:54px;flex-basis:54px;border-radius:16px}
  .pt-public-title{font-size:23px!important}
  .pt-public-subtitle{font-size:12px!important}
  .pt-public-header-badge{display:none}
  body.pt-public-page main.wrap,
  body.pt-public-page .pt-public-wrap{margin:-42px auto 0!important;padding:0 10px 22px!important}
  body.pt-page-search #loginView,
  body.pt-page-search #appView{width:calc(100% - 20px)!important;margin:-42px auto 0!important}
  body.pt-public-page #loginPanel.pt-auth-card,
  body.pt-public-page #loginView.pt-auth-card{padding:18px!important;border-radius:20px!important}
  body.pt-public-page .pt-user-nav,
  body.pt-public-page .user-bar.pt-user-nav{align-items:stretch!important;flex-direction:column!important}
  body.pt-public-page .pt-user-nav .actions,
  body.pt-public-page .user-bar.pt-user-nav .user-actions{display:grid!important;grid-template-columns:1fr!important;width:100%}
  body.pt-public-page .pt-user-nav button,
  body.pt-public-page .user-bar.pt-user-nav button,
  body.pt-public-page #loginPanel button,
  body.pt-public-page #loginView button{width:100%!important}
  body.pt-public-page .actions{align-items:stretch}
}
body.pt-public-page .userbox,
body.pt-public-page .user{
  display:flex!important;
  align-items:center!important;
  gap:11px!important;
  min-width:0;
}
body.pt-public-page .user-info,
body.pt-public-page #userName{font-weight:900!important;color:#0f172a!important}


/* PORTAIL TIR — Compléments charte unique pages dédiées — V66ZZS */
:root{color-scheme:light}
body.pt-public-page-light{color-scheme:light}

/* Cartes génériques utilisées par les pages sans connexion */
body.pt-public-page .notice,
body.pt-public-page .intro{
  margin:0 0 16px!important;
  padding:16px 18px!important;
  border:1px solid #cfe0ff!important;
  border-radius:18px!important;
  background:linear-gradient(145deg,#ffffff,#f1f6ff)!important;
  color:#344054!important;
  line-height:1.55!important;
  box-shadow:var(--pt-shadow-soft)!important;
}
body.pt-public-page .card{
  border:1px solid rgba(219,227,240,.98)!important;
  border-radius:22px!important;
  background:rgba(255,255,255,.985)!important;
  color:var(--pt-text)!important;
  box-shadow:var(--pt-shadow)!important;
}
body.pt-public-page .req{color:#d92d20!important}
body.pt-public-page .hint,
body.pt-public-page .status,
body.pt-public-page .msg,
body.pt-public-page .small{color:var(--pt-muted)!important}
body.pt-public-page .status.ok,
body.pt-public-page .msg.ok{color:var(--pt-success)!important}
body.pt-public-page .status.err,
body.pt-public-page .msg.err{color:var(--pt-danger)!important}
body.pt-public-page .ref{color:#1849a9!important}

/* Déclaration d'incident */
body.pt-page-incident .card{padding:22px!important}
body.pt-page-incident .grid{gap:15px!important}
body.pt-page-incident .field{gap:7px!important}
body.pt-page-incident textarea{min-height:150px!important}
body.pt-page-incident .photoBox{
  padding:14px!important;
  border:1px dashed #8eace0!important;
  border-radius:15px!important;
  background:#f8fbff!important;
}
body.pt-page-incident .photoPreview{border-color:#d6e2f2!important}
body.pt-page-incident .success{padding:34px 22px!important;text-align:center}
body.pt-page-incident .disabled{padding:30px!important;text-align:center}
body.pt-page-incident .actions{margin-top:20px!important}

/* Formation IBP */
body.pt-page-formation .card{padding:22px!important}
body.pt-page-formation .steps{gap:10px!important;margin-bottom:20px!important}
body.pt-page-formation .step{
  padding:11px!important;
  border:1px solid #d4dfef!important;
  border-radius:12px!important;
  background:#f4f7fb!important;
  color:#475467!important;
  font-weight:800!important;
}
body.pt-page-formation .step.active{
  border-color:#155eef!important;
  background:linear-gradient(135deg,#0b4cc5,#155eef)!important;
  color:#fff!important;
}
body.pt-page-formation .lic-row{gap:10px!important}
body.pt-page-formation .identity{
  margin-top:15px!important;
  padding:16px!important;
  border:1px solid #9dbcf4!important;
  border-radius:16px!important;
  background:linear-gradient(145deg,#f8fbff,#eef5ff)!important;
  color:#101828!important;
}
body.pt-page-formation .identity-item{
  padding:10px!important;
  border:1px solid #d6e2f2!important;
  border-radius:11px!important;
  background:#fff!important;
  color:#101828!important;
}
body.pt-page-formation .identity-item span{color:#667085!important}
body.pt-page-formation .upload{
  margin-top:18px!important;
  padding:16px!important;
  border:1px dashed #8eace0!important;
  border-radius:15px!important;
  background:#f8fbff!important;
}
body.pt-page-formation .consent{color:#344054!important}
body.pt-page-formation .success{padding:30px!important;text-align:center}

/* Page centrale */
body.pt-page-hub .back{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  margin:0 0 15px!important;
  color:#1849a9!important;
  text-decoration:none!important;
  font-weight:850!important;
}
body.pt-page-hub .grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:16px!important;
}
body.pt-page-hub .card{
  display:flex!important;
  flex-direction:column!important;
  min-height:250px!important;
  padding:18px!important;
  border-radius:20px!important;
  background:linear-gradient(145deg,#ffffff,#f5f8ff)!important;
  box-shadow:var(--pt-shadow-soft)!important;
  transition:transform .15s ease,box-shadow .15s ease!important;
}
body.pt-page-hub .card:hover{transform:translateY(-2px);box-shadow:var(--pt-shadow)!important}
body.pt-page-hub .head{display:flex!important;gap:12px!important;align-items:flex-start!important}
body.pt-page-hub .icon{
  width:50px!important;height:50px!important;flex:0 0 50px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  border:1px solid #cadbf8!important;border-radius:14px!important;
  background:#eaf2ff!important;font-size:26px!important;
}
body.pt-page-hub .card h2{margin:2px 0 7px!important;color:#101828!important;font-size:18px!important}
body.pt-page-hub .tag{
  display:inline-flex!important;padding:4px 8px!important;border-radius:999px!important;
  border:1px solid #a6f4c5!important;background:#ecfdf3!important;color:#067647!important;
  font-size:11px!important;font-weight:850!important;
}
body.pt-page-hub .desc{flex:1!important;margin:15px 0!important;color:#475467!important;line-height:1.5!important}
body.pt-page-hub .open{
  display:block!important;padding:12px 14px!important;border:1px solid transparent!important;
  border-radius:12px!important;background:linear-gradient(135deg,#0b4cc5,#155eef)!important;
  color:#fff!important;text-align:center!important;text-decoration:none!important;font-weight:850!important;
  box-shadow:0 5px 14px rgba(21,94,239,.22)!important;
}
body.pt-page-hub .foot{margin-top:24px!important;color:#667085!important;text-align:center!important;font-size:12px!important}

@media(max-width:980px){
  body.pt-page-hub .grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:700px){
  body.pt-page-incident .grid,
  body.pt-page-formation .grid,
  body.pt-page-formation .identity-grid,
  body.pt-page-formation .steps{grid-template-columns:1fr!important}
  body.pt-page-incident .full,
  body.pt-page-formation .full{grid-column:auto!important}
  body.pt-page-formation .lic-row{grid-template-columns:1fr!important}
  body.pt-page-incident .card,
  body.pt-page-formation .card{padding:16px!important}
}
@media(max-width:640px){
  body.pt-page-hub .grid{grid-template-columns:1fr!important}
  body.pt-page-hub .card{min-height:0!important}
}


/* PORTAIL TIR — V66ZZT — Alignement de la case de consentement Formation IBP */
body.pt-page-formation label.consent{
  display:flex!important;
  align-items:flex-start!important;
  gap:10px!important;
  margin:18px 0!important;
  color:#344054!important;
  font-size:12px!important;
  line-height:1.4!important;
  font-weight:800!important;
  cursor:pointer;
}
body.pt-page-formation label.consent input[type="checkbox"]{
  appearance:auto!important;
  -webkit-appearance:checkbox!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  flex:0 0 18px!important;
  padding:0!important;
  margin:1px 0 0!important;
  border-radius:3px!important;
  background:#fff!important;
  accent-color:#2563eb;
}
body.pt-page-formation label.consent span{
  display:block!important;
  flex:1 1 auto!important;
  min-width:0;
}


/* PORTAIL TIR — V66ZZU — Carnet IBP recto / verso */
.pt-page-formation .carnet-upload-title{font-weight:900;font-size:13px;margin:0 0 10px;color:#10204a}
.pt-page-formation .carnet-upload-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.pt-page-formation .carnet-upload-side{padding:13px;border:1px solid #d6e1f5;border-radius:13px;background:#fff}
.pt-page-formation .carnet-upload-side label{margin-bottom:7px}
.pt-page-formation .carnet-upload-side input[type=file]{width:100%;background:#f8fbff;color:#17233f;border-color:#cbd9ef}
.pt-page-formation .carnet-upload-side .small{margin:7px 0 0}
.pt-page-formation .carnet-upload-help{margin:11px 0 0}
@media(max-width:700px){.pt-page-formation .carnet-upload-grid{grid-template-columns:1fr}}
