/* ============ Styles communs aux 3 modèles ============ */
.tmpl{
  width:340px;
  border-radius:6px;
  overflow:hidden;
  font-family:'Inter',-apple-system,sans-serif;
  position:relative;
}
.tmpl .name{margin:0;}
.tmpl .role{margin:0;}
.tmpl .photo{
  background-size:cover;
  background-position:center;
  display:flex;align-items:center;justify-content:center;
  font-family:'Archivo Expanded','Inter',sans-serif;
  font-weight:800;
}
.tmpl .logo{max-height:26px; max-width:96px; width:auto; object-fit:contain;}
.tmpl .logo.txt{
  font-family:'IBM Plex Mono',monospace;
  font-size:11px; letter-spacing:.1em; text-transform:uppercase;
}

/* ── Poste bilingue (commun) ── */
.tmpl .role-en{
  font-style:italic;
  font-size:0.85em;
  opacity:0.75;
  margin-top:2px;
}

/* ── Bloc coordonnées société (commun) ── */
.tmpl .company-info{
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid rgba(128,128,128,.15);
  font-size:11.5px;
  line-height:1.5;
}
.tmpl .company-tel{opacity:0.7;}

/* ============ BÉTON ============ */
.tmpl-beton{
  background: #f5f5f4;
  color: #1a1a1a;
  padding: 27px 24px 24px;
  box-shadow: inset 0 0 0 1px #e5e5e4, inset 0 0 20px rgba(0,0,0,0.02);
  border-top: 4px solid #e13530; /* SIBM Rouge */
  display: flex;
  flex-direction: column;
  min-height: 540px;
}
.tmpl-beton .beton-top{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
}
.tmpl-beton .beton-company{
  flex: 1;
}
.tmpl-beton .logo{
  max-height: 50px;
  max-width: 160px;
  margin-bottom: 10px;
  display: block;
}
.tmpl-beton .logo.txt{
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .05em;
  color: #1a1a1a;
}
.tmpl-beton .company-name{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #888;
}
.tmpl-beton .photo{
  width: 64px;
  height: 64px;
  border-radius: 4px;
  background: #1a1a1a;
  color: #f5f5f4;
  font-size: 22px;
  flex-shrink: 0;
  margin-left: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.tmpl-beton .beton-body{
  flex: 1;
}
.tmpl-beton .name{
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  color: #074914; /* SIBM Vert */
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.tmpl-beton .role{
  font-size: 14px;
  color: #555;
  font-weight: 500;
}
.tmpl-beton .role-en{
  color: #888;
  font-size: 13px;
  margin-top: 2px;
}
.tmpl-beton .beton-footer{
  margin-top: 30px;
}
.tmpl-beton .datasheet{
  border-top: 1px solid rgba(0,0,0,.08);
  padding-top: 16px;
}
.tmpl-beton .row{
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 12.5px;
}
.tmpl-beton .label{
  font-family: 'IBM Plex Mono', monospace;
  color: #888;
  letter-spacing: .05em;
}
.tmpl-beton .value{
  font-weight: 500;
  color: #1a1a1a;
}
.tmpl-beton .company-info{
  border-top: 1px solid rgba(0,0,0,.08);
  margin-top: 16px;
  padding-top: 16px;
  font-family: 'IBM Plex Mono', monospace;
  color: #777;
  font-size: 10.5px;
  line-height: 1.6;
}

/* ============ CORPORATE (refonte fidèle au design SIBM) ============ */
.tmpl-corporate{
  background:#ffffff;
  color:#222;
  box-shadow:0 0 0 1px rgba(0,0,0,.06) inset;
  display: flex;
  flex-direction: column;
  min-height: 560px; /* Force un format portrait */
}

/* Header : logo + nom société centrés */
.tmpl-corporate .corp-header{
  padding: 40px 24px 20px;
  text-align: center;
}
.tmpl-corporate .corp-logo{
  max-height: 110px;
  max-width: 220px;
  display: block;
  margin: 0 auto 15px;
}
.tmpl-corporate .corp-logo.txt{
  display: block;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}
.tmpl-corporate .corp-company-name{
  font-size: 13px;
  color: #333;
  font-weight: 600;
  white-space: nowrap;
}

/* Corps : Infos personne + badge */
.tmpl-corporate .corp-body{
  flex: 1; /* Pousse le footer vers le bas */
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 0 24px;
}
.tmpl-corporate .corp-person{
  text-align: center;
}
.tmpl-corporate .corp-person .name{
  font-size: 22px;
  font-weight: 700;
  color: #074914; /* SIBM Vert */
  letter-spacing: .01em;
}
.tmpl-corporate .corp-person .role{
  font-size: 16px;
  color: #333;
  margin-top: 6px;
  font-weight: 500;
}
.tmpl-corporate .corp-person .role-en{
  font-size: 14.5px;
  color: #444;
  font-weight: 400;
  margin-top: 3px;
}
.tmpl-corporate .badge{
  position: absolute;
  bottom: 0;
  right: 20px;
  height: 38px;
  width: auto;
}

/* Footer : coordonnées (adresse, ligne, tel/email) */
.tmpl-corporate .corp-footer{
  padding: 20px 24px 30px;
  text-align: center;
}
.tmpl-corporate .corp-address{
  font-size: 11px;
  color: #333;
  margin-bottom: 8px;
  font-weight: 500;
  white-space: nowrap;
}
.tmpl-corporate .corp-separator{
  height: 1.5px;
  background: #074914; /* SIBM Vert */
  margin: 0 15px 8px;
}
.tmpl-corporate .corp-contact-info{
  font-size: 11.5px;
  color: #333;
  line-height: 1.6;
  font-weight: 500;
  white-space: nowrap;
}

/* ============ NUIT (ULTRA PREMIUM) ============ */
.tmpl-dark {
  background-color: #030303;
  color: #ffffff;
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 580px;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

/* Subtle glowing orb in the background */
.tmpl-dark .dark-mesh {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(225, 53, 48, 0.12) 0%, transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 1;
}

/* Grid background */
.tmpl-dark::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 1;
}

.tmpl-dark .dark-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 48px 32px 40px;
}

/* Header */
.tmpl-dark .dark-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 56px;
}
.tmpl-dark .dark-logo {
  max-height: 48px;
  max-width: 160px;
  filter: brightness(0) invert(1);
  margin-bottom: 12px;
}
.tmpl-dark .dark-header-name {
  font-size: 9px;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  white-space: nowrap;
}

/* Person Section */
.tmpl-dark .dark-person {
  text-align: left;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
}
.tmpl-dark .dark-person-info {
  display: flex;
  flex-direction: column;
}

/* Elegant Avatar (Replaces the ugly pill) */
.tmpl-dark .photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  font-size: 24px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  flex-shrink: 0;
  position: relative;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}
/* Tiny Status Dot (SIBM Red) */
.tmpl-dark .photo::after {
  content: "";
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e13530;
  border: 3px solid #030303;
}

.tmpl-dark .name {
  font-size: 26px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.tmpl-dark .role {
  font-size: 13px;
  color: #9ca3af;
  font-weight: 400;
}
.tmpl-dark .role-en {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
  font-style: italic;
}

/* Divider */
.tmpl-dark .dark-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  margin: 48px 0 32px;
  width: 100%;
}

/* Details Section */
.tmpl-dark .dark-details {
  width: 100%;
  margin-top: auto;
}
.tmpl-dark .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.1);
}
.tmpl-dark .row:last-child {
  border-bottom: none;
}
.tmpl-dark .label {
  font-family: 'IBM Plex Mono', monospace;
  color: rgba(255,255,255,0.4);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.tmpl-dark .value {
  color: #ffffff;
  font-size: 14px;
  font-weight: 400;
  text-align: right;
}

.tmpl-dark .company-info {
  margin-top: 32px;
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 10px;
  line-height: 1.8;
  font-weight: 400;
  white-space: nowrap;
}
.tmpl-dark .company-info > div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
