/* =========================================================
   CHBT — Feuille de style commune
   Utilisée par index.html et annuaire-interne.html
   ========================================================= */

:root {
  --green: #68b374;
  --blue: #59afd0;
  --turquoise: #4baab2;
  --purple: #925b96;
  --text: #263b46;
  --muted: #72818a;
  --background: #f8fbfa;
}

* { box-sizing: border-box; }

html { min-height: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse at 0% 0%, rgba(104, 179, 116, .09), transparent 35%),
    radial-gradient(ellipse at 100% 100%, rgba(89, 175, 208, .11), transparent 35%),
    var(--background);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.decoration {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(1px);
  opacity: .16;
}
.decoration.one {
  width: 260px; height: 260px;
  background: var(--green);
  top: -150px; right: -70px;
}
.decoration.two {
  width: 220px; height: 220px;
  background: var(--purple);
  bottom: -145px; left: -80px;
}

header, main, footer { position: relative; z-index: 1; }

header {
  padding: 18px 6% 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  display: block;
  width: 150px;
  max-width: 48vw;
  height: auto;
  object-fit: contain;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 22px 65px;
}

.content {
  width: 100%;
  max-width: 1000px;
  text-align: center;
  animation: appear .8s ease both;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 17px;
  border: 1px solid rgba(104, 179, 116, .3);
  border-radius: 50px;
  background: rgba(255, 255, 255, .8);
  color: #438c53;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(104, 179, 116, .13);
  animation: pulse 2s infinite;
}

h1 {
  margin: 30px 0 20px;
  font-size: clamp(36px, 6vw, 61px);
  line-height: 1.1;
  letter-spacing: -2px;
  font-weight: 750;
  white-space: nowrap;
}
h1 span { display: inline; margin-top: 0; color: var(--turquoise); }

.description {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.8;
}

.illustration {
  position: relative;
  width: 160px;
  height: 112px;
  margin: 34px auto 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gear {
  width: 73px; height: 73px;
  color: var(--purple);
  animation: rotate 14s linear infinite;
}
.gear-small {
  position: absolute;
  width: 38px; height: 38px;
  right: 25px; bottom: 12px;
  color: var(--green);
  animation: rotate 10s linear infinite reverse;
}
.ground {
  position: absolute;
  bottom: 1px; left: 25px;
  width: 110px; height: 7px;
  border-radius: 50%;
  background: rgba(38, 59, 70, .08);
}

.note {
  margin: 0 auto;
  max-width: 470px;
  padding: 17px 20px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .75);
  border: 1px solid rgba(89, 175, 208, .18);
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}
.note strong { color: var(--text); }

footer {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .3px;
}
footer span { color: var(--purple); font-weight: 700; }

/* Liens principaux de la page d'accueil */
.radiologie-link, .annuaire-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  margin: 0 auto 18px;
  padding: 12px 24px;
  border-radius: 18px;
  color: #fff;
  font-size: 17px;
  font-weight: 650;
  text-decoration: none;
  line-height: 1.4;
  text-align: center;
  max-width: 720px;
  box-shadow: 0 6px 18px rgba(75, 170, 178, .22);
  transition: transform .25s ease, box-shadow .25s ease;
}
.radiologie-link { background: linear-gradient(135deg, var(--turquoise), var(--blue)); }
.radiologie-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(75, 170, 178, .32);
}
.annuaire-link {
  background: var(--purple);
  box-shadow: 0 6px 18px rgba(146, 91, 150, .22);
}
.annuaire-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(146, 91, 150, .32);
}
.radiologie-link:focus-visible, .annuaire-link:focus-visible,
.service-phone:focus-visible, .back-link:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 4px;
}
.radiologie-link svg, .annuaire-link svg {
  width: 30px; height: 30px; flex: 0 0 30px;
}

/* Styles de la page annuaire interne */
.directory-content {
  max-width: 1000px;
  text-align: left;
}
.directory-heading { text-align: center; margin-bottom: 34px; }
.directory-heading .status { margin-bottom: 2px; }
.directory-heading h1 {
  white-space: normal;
  font-size: clamp(34px, 5vw, 52px);
  margin: 22px 0 12px;
}
.directory-heading .description { max-width: 760px; }

/* Encadré téléphone accueil général */
.general-phone {
  max-width: 650px;
  margin: 0 auto 35px;
  padding: 24px 20px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--turquoise), var(--blue));
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(75, 170, 178, .25);
}

.general-phone-label {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.general-phone-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font-size: clamp(27px, 5vw, 38px);
  font-weight: 800;
  letter-spacing: 1px;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.general-phone-number:hover {
  opacity: 0.85;
}

.pole {
  margin: 28px 0;
  padding: 26px;
  border: 1px solid rgba(89, 175, 208, .18);
  border-radius: 22px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 8px 24px rgba(38, 59, 70, .045);
}
.pole-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: var(--text);
  font-size: clamp(21px, 3vw, 27px);
  line-height: 1.25;
}
.pole-title::before {
  content: "";
  display: block;
  width: 7px;
  height: 30px;
  flex: 0 0 7px;
  border-radius: 8px;
  background: linear-gradient(var(--green), var(--turquoise));
}
.service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.service-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px;
  border: 1px solid rgba(114, 129, 138, .15);
  border-radius: 14px;
  background: #fff;
}
.service-name {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 650;
}
.service-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  color: #438c53;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  margin-top: auto;
  margin-bottom: auto;
}
.service-phone:hover { text-decoration: underline; }
.service-phone svg { width: 17px; height: 17px; flex: 0 0 17px; }
.phone-pending {
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
}
.directory-actions { text-align: center; margin: 30px 0 5px; }
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid rgba(146, 91, 150, .28);
  border-radius: 14px;
  color: var(--purple);
  background: rgba(255,255,255,.75);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.back-link:hover { background: #fff; }

@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(104, 179, 116, .04); } }
@keyframes appear {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
  .service-list { grid-template-columns: 1fr; }
  .pole { padding: 20px 16px; }
}
@media (max-width: 600px) {
  header { padding: 16px 20px 5px; }
  .logo { width: 120px; }
  main { padding: 8px 20px 45px; }
  h1 {
    letter-spacing: -1.2px;
    margin-top: 25px;
    white-space: normal;
  }
  .illustration { margin: 25px auto; }
  .note { padding: 15px; }
  .radiologie-link, .annuaire-link {
    min-height: 74px;
    padding: 14px 19px;
    font-size: 15px;
    gap: 10px;
  }
  .directory-heading h1 { font-size: clamp(32px, 9vw, 42px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
