/* ============ 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;}
.tmpl .company-web{margin-top:3px;}

/* ============ MODÈLE CRÉATIF MODERNE (INSPIRÉ DE L'IMAGE FOURNIE) ============ */
.tmpl-modern{
  width: 340px;
  min-height: 560px;
  background: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 40px rgba(0, 35, 100, 0.14), 0 2px 6px rgba(0,0,0,0.05);
  position: relative;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* ── Section Supérieure (Fond clair épuré & lumineux) ── */
.tmpl-modern .mod-top{
  background: linear-gradient(180deg, #fbfcfd 0%, #eef4fc 100%);
  border-bottom: 1px solid rgba(0, 59, 167, 0.08);
  padding: 0 20px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-height: 290px;
  justify-content: flex-end;
}

/* Cartouche suspendu depuis le haut (Fond blanc épuré, sans fond bleu) */
.tmpl-modern .mod-top-badge{
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 156px;
  background: #ffffff; /* Fond blanc pur */
  padding: 16px 14px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 6px 18px rgba(0, 35, 100, 0.08);
  border: 1px solid rgba(0, 59, 167, 0.12);
  border-top: none;
  border-bottom: 3px solid #ffda00; /* Liseré doré CREDAF */
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  z-index: 2;
}
.tmpl-modern .mod-badge-logo{
  max-height: 48px;
  max-width: 130px;
  object-fit: contain;
  margin-bottom: 4px;
  filter: none; /* Logo dans ses couleurs naturelles */
}
.tmpl-modern .mod-badge-logo.txt{
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #003ba7;
  text-transform: uppercase;
}
.tmpl-modern .mod-badge-name{
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #003ba7;
}

/* Avatar optionnel */
.tmpl-modern .mod-avatar-wrap{
  margin-top: 110px;
  margin-bottom: 12px;
  z-index: 2;
}
.tmpl-modern .photo.mod-avatar{
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #003ba7;
  color: #ffda00;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 14px rgba(0, 35, 100, 0.15);
}

/* Titulaire : nom agrandi & fonction */
.tmpl-modern .mod-identity{
  text-align: center;
  margin-top: 120px; /* Dégage l'espace sous le cartouche suspendu */
  width: 100%;
  z-index: 2;
}
.tmpl-modern .mod-avatar-wrap + .mod-identity{
  margin-top: 0;
}
.tmpl-modern .mod-name{
  font-size: 25px; /* Nom plus grand, affirmé et percutant */
  font-weight: 800;
  color: #0a1733;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 6px;
  line-height: 1.15;
}
.tmpl-modern .mod-role{
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #003ba7;
  text-transform: uppercase;
  margin: 0;
}
.tmpl-modern .mod-role-en{
  font-size: 10.5px;
  font-style: italic;
  color: #55627a;
  margin-top: 4px;
  line-height: 1.35;
}

/* Onglet noir/bleu de transition au centre bas */
.tmpl-modern .mod-bottom-tab{
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 6px;
  background: #003ba7;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  z-index: 3;
}

/* ── Section Inférieure (Blanc pur avec colonne d'icônes à gauche) ── */
.tmpl-modern .mod-bottom{
  background: #ffffff;
  padding: 24px 20px 24px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tmpl-modern .mod-contacts-layout{
  display: flex;
  align-items: stretch;
  gap: 16px;
}

/* Bandeau vertical bleu CREDAF pour les icônes */
.tmpl-modern .mod-icon-stripe{
  width: 38px;
  background: #003ba7; /* Bleu CREDAF */
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 59, 167, 0.25);
}
.tmpl-modern .mod-icon-box{
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffda00; /* Icônes dorées CREDAF */
}
.tmpl-modern .mod-svg{
  width: 18px;
  height: 18px;
}

/* Colonne des informations avec lignes de séparation */
.tmpl-modern .mod-info-list{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}
.tmpl-modern .mod-info-item{
  min-height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid #e8e5df; /* Ligne fine comme sur la maquette */
  padding: 4px 0 6px;
}
.tmpl-modern .mod-info-item.no-divider{
  border-bottom: none;
  padding-bottom: 0;
}
.tmpl-modern .mod-item-val{
  font-size: 11.5px;
  line-height: 1.45;
  color: #262626;
  font-weight: 500;
}
.tmpl-modern .mod-item-val a{
  color: #1a1a1a;
  text-decoration: none;
  display: block;
  transition: color .15s ease;
}
.tmpl-modern .mod-item-val a:hover{
  color: #003ba7;
  text-decoration: underline;
}
.tmpl-modern .mod-address-text{
  font-size: 11px;
  color: #444444;
  line-height: 1.35;
  word-break: normal;
}
.tmpl-modern .mod-web-email a.mod-link-bold{
  font-weight: 700;
  color: #003ba7;
}
.tmpl-modern .mod-web-email a:not(.mod-link-bold){
  color: #555555;
}

/* ============ CORPORATE (PARFAITEMENT CENTRÉ) ============ */
.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: 36px 20px 16px;
  text-align: center;
}
.tmpl-corporate .corp-logo{
  max-height: 90px;
  max-width: 200px;
  display: block;
  margin: 0 auto 12px;
  object-fit: contain;
}
.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;
  text-align: center;
}

/* 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 20px;
}
.tmpl-corporate .corp-person{
  text-align: center;
}
.tmpl-corporate .corp-person .name{
  font-size: 22px;
  font-weight: 700;
  color: #003ba7; /* CREDAF Bleu */
  letter-spacing: .01em;
}
.tmpl-corporate .corp-person .role{
  font-size: 15px;
  color: #333;
  margin-top: 6px;
  font-weight: 500;
  line-height: 1.35;
}
.tmpl-corporate .corp-person .role-en{
  font-size: 13px;
  color: #555;
  font-weight: 400;
  margin-top: 3px;
  line-height: 1.35;
}
.tmpl-corporate .badge{
  position: absolute;
  bottom: 0;
  right: 15px;
  height: 38px;
  width: auto;
}

/* Footer : coordonnées (adresse, ligne, tel/email, site web) */
.tmpl-corporate .corp-footer{
  padding: 16px 20px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: auto;
}
.tmpl-corporate .corp-address{
  font-size: 11px;
  color: #475569;
  margin-bottom: 6px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  width: 100%;
  max-width: 280px;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}
.tmpl-corporate .corp-separator{
  height: 2px;
  width: 70px;
  background: linear-gradient(90deg, #003ba7 0%, #ffda00 50%, #003ba7 100%); /* CREDAF Bleu & Jaune */
  margin: 6px auto 10px;
  border-radius: 2px;
}
.tmpl-corporate .corp-contact-info{
  font-size: 11.5px;
  color: #334155;
  line-height: 1.6;
  font-weight: 500;
  text-align: center;
  width: 100%;
  max-width: 290px;
  white-space: normal;
  word-break: break-word;
}
.tmpl-corporate .corp-web-link{
  color: #003ba7;
  text-decoration: none;
  font-weight: 600;
}
.tmpl-corporate .corp-web-link:hover{
  text-decoration: underline;
}

/* ============ 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(0, 59, 167, 0.4) 0%, rgba(255, 218, 0, 0.15) 45%, transparent 70%);
  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 (CREDAF Jaune) */
.tmpl-dark .photo::after {
  content: "";
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffda00; /* Jaune CREDAF */
  box-shadow: 0 0 8px rgba(255, 218, 0, 0.8);
  border: 2px 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(0, 59, 167, 0.5), rgba(255, 234, 144, 0.35), 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;
}
