:root {
  --teal:       #007B8A;
  --teal-dark:  #005F6B;
  --teal-deep:  #004B56;
  --coral:      #2CB19A;
  --coral-hover:#B83920;
  --white:      #FFFFFF;
  --off-white:  #F4F8F9;
  --gray-light: #E8EDEF;
  --gray:       #7A8D92;
  --ink:        #1A2B30;
  --border:     rgba(0,123,138,0.15);
}

/* CONTACT BANNER */
.contact-banner { 
  background: var(--teal); 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
}

.contact-cell { 
  display: flex; 
  align-items: center; 
  gap: 16px; 
  padding: 28px 32px; 
  border-right: 1px solid rgba(255,255,255,0.12); 
  transition: background 0.2s; 
  cursor: default; 
}

.contact-cell:last-child { 
  border-right: none; 
}

.contact-cell:hover { 
  background: var(--teal-dark); 
}

.cell-icon { 
  width: 48px; 
  height: 48px; 
  background: var(--coral); 
  border-radius: 6px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  flex-shrink: 0; 
}

.cell-icon svg { 
  width: 20px; 
  height: 20px; 
  stroke: white; 
  fill: none; 
  stroke-width: 2; 
  stroke-linecap: round; 
  stroke-linejoin: round; 
}

.cell-label {  
  font-size: 0.78rem; 
  font-weight: 700; 
  color: var(--white); 
  margin-bottom: 5px; 
  text-transform: uppercase; 
  letter-spacing: 0.07em; 
}

.cell-text { 
  font-size: 0.83rem; 
  color: rgba(255,255,255,0.72); 
  line-height: 1.6; 
}

.cell-text a { 
  color: rgba(255,255,255,0.72); 
  text-decoration: none; 
  transition: color 0.2s; 
}

.cell-text a:hover { 
  color: white; 
}

/* FILTER */
.filter-section { 
  background: var(--off-white); 
  border-bottom: 1px solid var(--border); 
  padding: 20px 48px; 
  display: flex; 
  align-items: center; 
  gap: 16px; 
  flex-wrap: wrap; 
}

.filter-section h2 {  
  font-size: 0.95rem; 
  font-weight: 700; 
  color: var(--teal-dark); 
  text-transform: uppercase; 
  letter-spacing: 0.1em; 
  white-space: nowrap; 
}

.search-wrap { 
  position: relative; 
  flex: 1; 
  max-width: 360px; 
}

.search-wrap svg { 
  position: absolute; 
  left: 12px; 
  top: 50%; 
  transform: translateY(-50%); 
  width: 16px; 
  height: 16px; 
  stroke: var(--teal); 
  fill: none; 
  stroke-width: 2; 
  stroke-linecap: round; 
  stroke-linejoin: round; 
  pointer-events: none; 
}

.search-wrap input { 
  width: 100%; 
  padding: 10px 14px 10px 38px; 
  border: 1.5px solid var(--border); 
  border-radius: 4px; 
  font-family: 'Source Sans 3', sans-serif; 
  font-size: 0.88rem; 
  color: var(--ink); 
  background: var(--white); 
  outline: none; 
  transition: border-color 0.2s; 
}

.search-wrap input:focus { 
  border-color: var(--teal); 
}

.badge { 
  font-size: 0.75rem; 
  font-weight: 600; 
  color: var(--teal-dark); 
  background: var(--white); 
  border: 1.5px solid var(--border); 
  border-radius: 20px; 
  padding: 5px 14px; 
  white-space: nowrap; 
}

.badge span { 
  color: var(--coral); 
}

/* GRID */
.grid-section { 
  padding: 52px 48px 72px; 
  max-width: 1320px; 
  margin: 0 auto; 
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: var(--off-white);
  border: 1px solid var(--gray-light);
  border-radius: 4px;
  overflow: hidden;
}

/* Support pour attribut data-columns */
.grid[data-columns="2"] {
  grid-template-columns: repeat(2, 1fr);
}

.grid[data-columns="4"] {
  grid-template-columns: repeat(4, 1fr);
}

/* CARD — flat tile style */
.card {
  background: var(--off-white);
  padding: 36px 32px 32px;
  border-right: 1px solid var(--gray-light);
  border-bottom: 1px solid var(--gray-light);
  display: flex; 
  flex-direction: column; 
  gap: 0;
  animation: fadeUp 0.45s both;
  transition: background 0.2s;
}

.card:hover { 
  background: var(--white); 
}

.card:nth-child(3n) { 
  border-right: none; 
}

/* Ajustement pour 2 colonnes */
.grid[data-columns="2"] .card:nth-child(3n) { 
  border-right: 1px solid var(--gray-light); 
}

.grid[data-columns="2"] .card:nth-child(2n) { 
  border-right: none; 
}

/* Ajustement pour 4 colonnes */
.grid[data-columns="4"] .card:nth-child(3n) { 
  border-right: 1px solid var(--gray-light); 
}

.grid[data-columns="4"] .card:nth-child(4n) { 
  border-right: none; 
}

@keyframes fadeUp { 
  from { 
    opacity:0; 
    transform: translateY(12px); 
  } 
  to { 
    opacity:1; 
    transform: translateY(0); 
  } 
}

/* Country flag + name header */
.card-country {
  display: flex; 
  align-items: center; 
  gap: 8px;
  font-size: 0.62rem; 
  font-weight: 700;
  letter-spacing: 0.2em; 
  text-transform: uppercase;
  color: var(--teal); 
  margin-bottom: 4px;
}

.flag { 
  font-size: 0.95rem; 
}

/* Pays fusionnés dans la card principale */
.card-merged-countries {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.merged-country-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 6px;
}

/* Main entity name — big coral title like reference */
.card-name {
  font-size: 1.15rem; 
  font-weight: 800;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.25;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--gray-light);
}

/* Address block */
.card-address {
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.7;
  margin-bottom: 18px;
  flex: 1;
}

/* Tel / Fax lines */
.card-contact-line {
  font-size: 0.88rem;
  color: #4A5C60;
  line-height: 1.8;
  font-style: italic;
}

.card-contact-line span {
  color: var(--teal);
  font-style: italic;
  font-weight: 500;
}

.card-contact-line .placeholder-val {
  color: #B5C5C9;
  font-style: italic;
}

/* UTILS */
.hidden { 
  display: none !important; 
}

/* RESPONSIVE */
@media (max-width: 860px) {
  .grid-section { 
    padding: 28px 16px 48px; 
  }
  
  .grid { 
    grid-template-columns: 1fr 1fr !important; 
  }
  
  .card:nth-child(3n),
  .card:nth-child(4n) { 
    border-right: 1px solid var(--gray-light); 
  }
  
  .card:nth-child(2n) { 
    border-right: none; 
  }
  
  .filter-section {
    padding: 16px 20px;
  }
}

@media (max-width: 560px) {
  .grid { 
    grid-template-columns: 1fr !important; 
  }
  
  .card { 
    border-right: none !important; 
  }
  
  .contact-banner {
    grid-template-columns: 1fr;
  }
  
  .contact-cell {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }
  
  .contact-cell:last-child {
    border-bottom: none;
  }
}
