/* =========================
   RESET & THEME
   ========================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-color: #007bff;
  --primary-hover: #0056b3;
  --secondary-color: #28a745;
  --accent-color: #ffc107;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --border-color: #dee2e6;
  --shadow-sm: 0 .125rem .25rem rgba(0,0,0,.075);
  --shadow-md: 0 .5rem 1rem rgba(0,0,0,.15);
  --shadow-lg: 0 1rem 3rem rgba(0,0,0,.175);
  --radius-sm: .25rem;
  --radius-md: .5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
}

/* =========================
   BASE
   ========================= */
html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.7;
  color: var(--text-primary);
  background: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* =========================
   HEADER
   ========================= */
.header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #6f42c1 100%);
  color: #fff;
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}
.header-content { position: relative; z-index: 1; }
.header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-shadow: 2px 2px 8px rgba(0,0,0,.2);
}
.header .highlight { color: var(--accent-color); }
.header p {
  font-size: clamp(1.1rem, 2.8vw, 1.4rem);
  max-width: 850px;
  margin: 0 auto;
}

/* =========================
   CTA BANNER
   ========================= */
a.cta-banner-link { display: block; text-decoration: none; color: inherit; }
.cta-banner {
  background: linear-gradient(45deg, #ffffff 0%, #fefefe 100%);
  padding: 2.5rem;
  text-align: center;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  margin-top: -60px;
  position: relative;
  z-index: 2;
  border: 1px solid var(--border-color);
}
.cta-banner h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 700;
}
.cta-banner p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 700px;
  margin-inline: auto;
}
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  background: linear-gradient(45deg, var(--secondary-color) 0%, #218838 100%);
  color: #fff;
  border: none;
  padding: 1.2rem 2.5rem;
  border-radius: var(--radius-lg);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all .3s ease;
  box-shadow: var(--shadow-md);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.cta-button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* =========================
   BREADCRUMB
   ========================= */
.breadcrumb {
  background: var(--bg-tertiary);
  padding: .75rem 0;
  font-size: .9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}
.breadcrumb .container {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

/* =========================
   CONTENT
   ========================= */
.main-content { flex: 1; padding: 3rem 0; }
.content-section {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 3rem;
  border: 1px solid var(--border-color);
}
.section-header {
  background: linear-gradient(135deg, var(--primary-color), #4a90e2);
  color: #fff;
  padding: 2.5rem;
  text-align: center;
  border-bottom: 5px solid var(--accent-color);
}
.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: .75rem;
}
.section-body { padding: 2.5rem; }

.text-block {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}
.text-block h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  padding-bottom: .75rem;
}
.text-block h3::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--accent-color);
  border-radius: 2px;
}
.text-block p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  text-align: justify;
}

/* =========================
   LISTING ENTREPRISES
   ========================= */
.company-listing {
  margin-top: 3rem;
}
.company-listing h3 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 2.5rem;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 1rem;
}
.company-listing h3::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 120px;
  height: 5px;
  background: var(--secondary-color);
  border-radius: 3px;
}
.companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.company-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all .3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: 80px;
}
.company-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}
.company-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--bg-tertiary);
  border-bottom: 3px solid var(--primary-color);
}
.company-content {
  padding: 1.8rem;
  flex-grow: 1;
}
.company-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}
.company-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
.company-category {
  font-size: .9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--bg-tertiary);
  padding: .3rem .8rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-top: .5rem;
}
.company-rating {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: linear-gradient(45deg, var(--accent-color), #ff8c00);
  color: #fff;
  padding: .55rem .9rem;
  border-radius: var(--radius-md);
  font-size: .9rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.company-details {
  display: grid;
  gap: 1.1rem;
  margin: 1.6rem 0;
}
.detail-item {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
}
.detail-icon {
  color: var(--secondary-color);
  font-size: 1.25rem;
  margin-top: .125rem;
  flex-shrink: 0;
}
.detail-text {
  font-size: .95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.detail-text a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}
.detail-text a:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}
.horaire { margin: 0; padding: 0; }
.company-actions {
  display: flex;
  gap: .75rem;
  padding: 1rem 1.8rem;
  border-top: 1px solid var(--border-color);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  box-shadow: 0 -2px 10px rgba(0,0,0,.05);
}
.btn-call,
.btn-website {
  flex: 1;
  padding: .9rem 1rem;
  border-radius: var(--radius-md);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
}
.btn-call {
  background: var(--secondary-color);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-call:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-website {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}
.btn-website:hover {
  background: var(--border-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-website.disabled {
  opacity: .6;
  cursor: not-allowed;
  pointer-events: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-color: var(--border-color);
  box-shadow: none;
}

/* =========================
   FOOTER
   ========================= */
.footer {
  background: #212529;
  color: #fff;
  margin-top: auto;
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  box-shadow: 0 -5px 15px rgba(0,0,0,.1);
}
.footer-content {
  padding: 3.5rem 0 1.5rem;
}
.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-column h4 {
  color: var(--accent-color);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid rgba(255,193,7,.3);
}
.footer-column ul {
  list-style: none;
  display: grid;
  gap: .6rem;
}
.footer-column a {
  color: #adb5bd;
  text-decoration: none;
  font-size: .95rem;
}
.footer-column a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding: 1.8rem 0;
  text-align: center;
  color: #ced4da;
  font-size: .9rem;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 992px) {
  .container { padding: 0 1rem; }
  .companies-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}
@media (max-width: 768px) {
  .header { padding: 3rem 0; }
  .cta-banner { margin-top: -40px; padding: 2rem; }
  .main-content { padding: 2rem 0; }
  .section-header { padding: 2rem; }
  .section-body { padding: 2rem; }
  .text-block { padding: 1.5rem; }
  .companies-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .company-content { padding: 1.5rem; }
  .company-actions { flex-direction: column; padding: .8rem 1.5rem; }
  .btn-call, .btn-website { font-size: .9rem; padding: .8rem 1rem; }
  .footer-columns { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .footer-column h4 { border-bottom: none; padding-bottom: 0; margin-bottom: .8rem; }
}
@media (max-width: 480px) {
  .cta-banner { padding: 1.5rem; margin-top: -30px; }
  .section-header, .section-body { padding: 1.5rem; }
  .company-image { height: 180px; }
  .company-card { padding-bottom: 70px; }
  .company-actions { padding: .7rem 1rem; }
}

/* =========================
   ANIMATIONS
   ========================= */
@keyframes fadeInScale {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.content-section, .company-card, .cta-banner {
  animation: fadeInScale .7s ease-out forwards;
}
.company-card:nth-child(2){ animation-delay: .1s; }
.company-card:nth-child(3){ animation-delay: .2s; }
.company-card:nth-child(4){ animation-delay: .3s; }

/* =========================
   ACCESSIBILITÉ
   ========================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
