*{box-sizing:border-box}

:root{
  --bg:#070b13;
  --panel:#0f172a;
  --panel2:#111827;
  --card:#172033;
  --soft:#1e293b;
  --text:#f8fafc;
  --muted:#9ca3af;
  --line:#334155;
  --accent:#38bdf8;
  --accent2:#22c55e;
  --warn:#f59e0b;
  --danger:#fb7185;
  --danger-dark:#9f1239;
}

html{min-height:100%}

body{
  margin:0;
  min-height:100vh;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at 15% -10%,#1d4ed8 0,#0f172a 34%,#020617 88%);
}

a{
  color:#7dd3fc;
  text-decoration:none;
}

a:hover{
  color:#bae6fd;
  text-decoration:underline;
}

.wrap{
  width:min(1180px,94%);
  margin:0 auto;
}

header{
  background:rgba(2,6,23,.56);
  border-bottom:1px solid rgba(148,163,184,.22);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  box-shadow:0 10px 35px rgba(0,0,0,.18);
}

.header-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:18px 0;
}

.brand{
  font-size:clamp(1.25rem,2vw,1.65rem);
  font-weight:800;
  letter-spacing:-.02em;
  color:#fff;
}

header .header-inner>div:last-child{
  color:#94a3b8;
  font-size:.92rem;
}

main{
  padding:42px 0 56px;
}

.card{
  background:rgba(15,23,42,.86);
  border:1px solid rgba(148,163,184,.22);
  border-radius:20px;
  box-shadow:
    0 22px 70px rgba(2,6,23,.34),
    inset 0 1px 0 rgba(255,255,255,.025);
  padding:30px;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

h1,h2,h3{
  color:#f8fafc;
  letter-spacing:-.02em;
}

h1{
  margin-top:0;
  font-size:clamp(1.8rem,3vw,2.6rem);
  line-height:1.12;
}

h2{
  color:#bae6fd;
}

p{
  line-height:1.6;
}

.lookup{
  display:flex;
  gap:12px;
  margin-top:24px;
}

input,select,textarea,button{
  font:inherit;
  border-radius:12px;
}

input,select,textarea{
  width:100%;
  padding:12px 14px;
  color:#f8fafc;
  background:#0b1220;
  border:1px solid #334155;
  outline:none;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}

input::placeholder,
textarea::placeholder{
  color:#64748b;
}

input:focus,
select:focus,
textarea:focus{
  border-color:rgba(56,189,248,.75);
  box-shadow:0 0 0 3px rgba(56,189,248,.13);
  background:#0f172a;
}

input:disabled{
  color:#94a3b8;
  background:#111827;
}

select{
  color-scheme:dark;
}

button,.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:11px 16px;
  border:1px solid rgba(56,189,248,.58);
  border-radius:12px;
  cursor:pointer;
  color:white;
  font-weight:700;
  text-decoration:none;
  background:
    linear-gradient(135deg,rgba(56,189,248,.28),rgba(34,197,94,.18)),
    #0f172a;
  box-shadow:0 8px 24px rgba(2,132,199,.13);
  transition:transform .15s ease,border-color .15s ease,background .15s ease;
}

button:hover,.btn:hover{
  transform:translateY(-1px);
  border-color:#38bdf8;
  text-decoration:none;
  color:#fff;
}

.btn.secondary{
  color:#cbd5e1;
  border-color:#334155;
  background:rgba(15,23,42,.74);
  box-shadow:none;
}

.btn.secondary:hover{
  border-color:#64748b;
  background:#172033;
}

button[style*="#9f1d20"]{
  background:rgba(251,113,133,.12)!important;
  border:1px solid rgba(251,113,133,.48)!important;
  color:#fecdd3!important;
}

.result{
  margin-top:26px;
  padding:20px;
  border-radius:16px;
  border:1px solid rgba(34,197,94,.35);
  border-left:5px solid var(--accent2);
  background:rgba(34,197,94,.075);
  color:#dcfce7;
}

.result h2{
  margin-top:0;
  color:#86efac;
}

.result.bad{
  border-color:rgba(251,113,133,.35);
  border-left-color:var(--danger);
  background:rgba(251,113,133,.08);
  color:#ffe4e6;
}

.result.bad h2{
  color:#fda4af;
}

.notice{
  padding:14px 16px;
  border-radius:14px;
  margin:16px 0;
  color:#fde68a;
  border:1px solid rgba(245,158,11,.35);
  background:rgba(245,158,11,.08);
}

.grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:17px;
}

.full{
  grid-column:1/-1;
}

label{
  display:block;
  margin-bottom:7px;
  color:#cbd5e1;
  font-size:.92rem;
  font-weight:700;
}

nav{
  display:flex;
  gap:9px;
  flex-wrap:wrap;
  margin-bottom:20px;
}

table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid #263244;
  border-radius:14px;
  background:rgba(2,6,23,.34);
}

th,td{
  padding:12px 13px;
  border-bottom:1px solid #263244;
  text-align:left;
  vertical-align:top;
}

th{
  color:#bae6fd;
  font-weight:700;
  background:rgba(15,23,42,.92);
}

td{
  color:#cbd5e1;
}

tr:last-child td{
  border-bottom:0;
}

tbody tr{
  transition:background .15s ease;
}

tbody tr:hover{
  background:rgba(56,189,248,.055);
}

hr{
  border-color:#263244!important;
}

code,.code{
  color:#bae6fd!important;
  background:#020617!important;
  border:1px solid #263244;
}

.small{
  color:#94a3b8;
}

.stats{
  gap:14px!important;
}

.stat{
  background:rgba(15,23,42,.82)!important;
  border:1px solid #263244;
  box-shadow:0 12px 30px rgba(2,6,23,.22)!important;
}

.stat span{
  color:#94a3b8;
}

.stat strong{
  color:#38bdf8!important;
}

.qr-box{
  background:#fff!important;
  border:1px solid rgba(148,163,184,.28)!important;
  box-shadow:0 12px 34px rgba(2,6,23,.28);
}

@media(max-width:760px){
  .header-inner{
    align-items:flex-start;
    flex-direction:column;
    gap:6px;
  }

  .lookup{
    flex-direction:column;
  }

  .grid{
    grid-template-columns:1fr;
  }

  .full{
    grid-column:auto;
  }

  .card{
    padding:22px;
    border-radius:16px;
  }

  nav .btn,
  nav button{
    flex:1 1 auto;
  }

  table{
    font-size:.92rem;
  }
}

@media(max-width:520px){
  .wrap{
    width:min(96%,1180px);
  }

  main{
    padding-top:24px;
  }

  .card{
    padding:18px;
  }

  th,td{
    padding:10px 8px;
  }
}


/* ===== CheckCertif V3.3 — accueil Formapix ===== */

body{
  background:
    radial-gradient(circle at 78% 22%, rgba(0,117,255,.16) 0, rgba(0,117,255,.04) 24%, transparent 42%),
    radial-gradient(circle at 18% 82%, rgba(0,174,255,.10) 0, transparent 35%),
    linear-gradient(145deg,#020711 0%,#06101e 46%,#020713 100%);
}

.public-header{
  min-height:140px;
}

.brand-lockup{
  display:flex;
  align-items:center;
  gap:22px;
  min-width:0;
}

.brand-logo{
  display:block;
  width:min(390px,42vw);
  max-height:112px;
  object-fit:contain;
  object-position:left center;
}

.brand-separator{
  width:1px;
  height:52px;
  background:linear-gradient(to bottom,transparent,#64748b,transparent);
  flex:0 0 auto;
}

.company-name{
  color:#d9e4f2;
  font-size:clamp(1rem,1.6vw,1.32rem);
  white-space:nowrap;
  letter-spacing:.01em;
}

.public-main{
  padding-top:30px;
}

.public-wrap{
  max-width:1040px;
}

.public-card{
  position:relative;
  max-width:840px;
  margin:0 auto;
  padding:44px 68px 46px;
  text-align:center;
  border:1px solid rgba(77,130,188,.42);
  background:
    linear-gradient(180deg,rgba(15,31,57,.87),rgba(7,19,38,.90));
  box-shadow:
    0 28px 80px rgba(0,0,0,.36),
    0 0 65px rgba(0,119,255,.045),
    inset 0 1px 0 rgba(255,255,255,.025);
  overflow:hidden;
}

.public-card::after{
  content:"";
  position:absolute;
  width:460px;
  height:460px;
  border:1px solid rgba(0,157,255,.55);
  border-radius:50%;
  right:-335px;
  top:90px;
  box-shadow:0 0 26px rgba(0,174,255,.18);
  pointer-events:none;
}

.verify-icon{
  display:flex;
  justify-content:center;
  color:#16b8ff;
  filter:drop-shadow(0 0 16px rgba(0,157,255,.34));
  margin-bottom:12px;
}

.public-card h1{
  margin-bottom:14px;
  font-size:clamp(2rem,4vw,2.75rem);
}

.public-lead{
  max-width:650px;
  margin:0 auto 32px;
  color:#b6c3d5;
  font-size:1.08rem;
  line-height:1.65;
}

.field-label{
  max-width:690px;
  margin:0 auto 8px;
  text-align:left;
  color:#edf6ff;
  font-weight:700;
  font-size:.96rem;
}

.public-card .lookup{
  max-width:690px;
  margin:0 auto;
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}

.public-card .lookup input{
  height:62px;
  padding:0 20px;
  border:1px solid #168dff;
  border-radius:9px;
  background:rgba(2,12,28,.82);
  color:#f8fbff;
  font-size:1.45rem;
  letter-spacing:.025em;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.018);
}

.public-card .lookup input::placeholder{
  color:#63728a;
  opacity:1;
}

.verify-button{
  width:100%;
  min-height:60px;
  font-size:1.08rem;
  border:1px solid #19c5ff;
  background:linear-gradient(100deg,#1058e8 0%,#008de9 52%,#09c8db 100%);
  box-shadow:0 12px 30px rgba(0,132,255,.2);
}

.verify-button:hover{
  background:linear-gradient(100deg,#1768fb 0%,#00a0f0 52%,#17d8e5 100%);
  border-color:#67e8f9;
}

.public-card .result{
  max-width:690px;
  margin-left:auto;
  margin-right:auto;
  text-align:left;
}

.public-footer{
  text-align:center;
  margin:34px auto 0;
  color:#8d9bb0;
  line-height:1.6;
  font-size:.92rem;
}

@media(max-width:760px){
  .public-header{
    min-height:auto;
  }

  .brand-lockup{
    align-items:center;
    gap:12px;
  }

  .brand-logo{
    width:min(290px,60vw);
  }

  .brand-separator{
    height:38px;
  }

  .company-name{
    font-size:.88rem;
    white-space:normal;
  }

  .public-card{
    padding:32px 22px 34px;
  }

  .public-card .lookup input{
    font-size:1.13rem;
  }
}

@media(max-width:520px){
  .brand-lockup{
    flex-wrap:wrap;
  }

  .brand-logo{
    width:260px;
    max-width:100%;
  }

  .brand-separator{
    display:none;
  }

  .company-name{
    width:100%;
    padding-left:4px;
  }
}


/* ===== Correctifs ciblés Opera uniquement =====
   Chrome et Safari conservent exactement les règles précédentes. */

html.is-opera .public-header{
  width:94%;
  max-width:1180px;
  margin-left:auto;
  margin-right:auto;
  justify-content:center;
}

html.is-opera .brand-lockup{
  width:auto;
  max-width:100%;
  margin-left:auto;
  margin-right:auto;
  justify-content:center;
}

html.is-opera .brand-logo{
  width:390px !important;
  max-width:min(390px,42vw) !important;
  height:auto !important;
  max-height:112px !important;
  flex:0 1 auto !important;
}

html.is-opera .public-wrap{
  width:94%;
  max-width:1040px;
  margin-left:auto;
  margin-right:auto;
}

html.is-opera .public-card{
  width:100%;
  max-width:840px;
  margin-left:auto;
  margin-right:auto;
}

html.is-opera .public-lead,
html.is-opera .field-label,
html.is-opera .public-card .lookup,
html.is-opera .public-card .result{
  margin-left:auto;
  margin-right:auto;
}

html.is-opera .verify-icon{
  width:100%;
  justify-content:center;
}

html.is-opera .public-card h1,
html.is-opera .public-lead,
html.is-opera .public-footer{
  text-align:center;
}

@media(max-width:760px){
  html.is-opera .brand-logo{
    width:290px !important;
    max-width:60vw !important;
  }
}

@media(max-width:520px){
  html.is-opera .brand-logo{
    width:260px !important;
    max-width:100% !important;
  }
}


/* ===== CheckCertif V3.5 — finitions administration ===== */

.admin-header{
  min-height:120px;
}

.admin-brand-lockup{
  min-width:0;
}

.admin-brand-logo{
  width:min(300px,34vw);
  max-height:88px;
}

.admin-brand-text{
  min-width:0;
}

.admin-app-title{
  color:#f8fafc;
  font-size:1.28rem;
  font-weight:800;
  letter-spacing:-.02em;
}

.admin-app-subtitle{
  margin-top:3px;
  color:#8fa2b8;
  font-size:.82rem;
}

.admin-identity{
  text-align:right;
}

.admin-user{
  margin-top:4px;
  color:#7f91a7;
  font-size:.8rem;
}

.status-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 9px;
  border-radius:999px;
  font-size:.78rem;
  line-height:1;
  font-weight:800;
  white-space:nowrap;
  border:1px solid transparent;
}

.status-badge svg{
  width:14px;
  height:14px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex:0 0 auto;
}

.status-valid{
  color:#86efac;
  background:rgba(34,197,94,.11);
  border-color:rgba(34,197,94,.25);
}

.status-replaced{
  color:#fbbf24;
  background:rgba(245,158,11,.11);
  border-color:rgba(245,158,11,.26);
}

.status-revoked{
  color:#fda4af;
  background:rgba(251,113,133,.11);
  border-color:rgba(251,113,133,.25);
}

.actions{
  white-space:nowrap;
}

.action-btn{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:6px 8px;
  margin:1px 2px;
  border:1px solid #334155;
  border-radius:8px;
  color:#cbd5e1;
  background:rgba(15,23,42,.58);
  font-size:.79rem;
  text-decoration:none;
  transition:border-color .15s ease,background .15s ease,color .15s ease;
}

.action-btn:hover{
  color:#fff;
  border-color:#38bdf8;
  background:rgba(56,189,248,.08);
  text-decoration:none;
}

.action-btn svg{
  width:14px;
  height:14px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.6;
  stroke-linecap:round;
  stroke-linejoin:round;
}

@media(max-width:760px){
  .admin-header{
    min-height:auto;
  }

  .admin-brand-logo{
    width:min(240px,54vw);
    max-height:72px;
  }

  .admin-identity{
    text-align:left;
  }
}

/* Opera : mêmes garde-fous que sur l'accueil public. */
html.is-opera .admin-header{
  width:94%;
  max-width:1180px;
  margin-left:auto;
  margin-right:auto;
}

html.is-opera .admin-brand-logo{
  width:300px !important;
  max-width:min(300px,34vw) !important;
  height:auto !important;
  max-height:88px !important;
}

@media(max-width:760px){
  html.is-opera .admin-brand-logo{
    width:240px !important;
    max-width:54vw !important;
  }
}


/* ===== V3.6 — correctif affichage badges/actions ===== */
.status-badge{
  vertical-align:middle;
}

.status-badge svg,
.action-btn svg{
  display:inline-block !important;
  width:14px !important;
  height:14px !important;
  min-width:14px !important;
  min-height:14px !important;
  max-width:14px !important;
  max-height:14px !important;
  flex:0 0 14px !important;
  overflow:visible;
}

.action-btn{
  color:#cbd5e1 !important;
  visibility:visible !important;
  opacity:1 !important;
}

.action-btn span{
  display:inline !important;
  color:inherit !important;
  visibility:visible !important;
  opacity:1 !important;
}

.actions{
  min-width:190px;
}
