/* Site vitrine SMI Méditerranée. Même esprit que le site jumeau d'Aptitudes Méditerranée
   (bannière pleine largeur, tuiles de couleur, rangées alternées, contacts flottants), mais une
   mêmes bleus qu'Aptitudes (#4ea6cf, #2c81af, #d6ebf4, gris #54595f), avec des touches de rouge propres à SMI. */

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/poppins-700.woff2") format("woff2"); }

:root {
  --navy: #1d5f88;
  --navy-2: #2c81af;
  --teal: #4ea6cf;
  --teal-dark: #2c81af;
  --teal-soft: #d6ebf4;
  --coral: #e06a72; /* rouge SMI : petites touches (boutons devis, traits sous les titres) */
  --coral-dark: #cc5760;
  --ink: #2f3539;
  --muted: #54595f;
  --line: #e2e8ee;
  --bg-alt: #f3f6f8;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink);
  background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); }
a:hover { color: var(--navy); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.6em; font-weight: 600; }
h1 { font-size: clamp(1.8rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); color: var(--teal); }
h3 { font-size: 1.15rem; color: var(--navy); }
p { margin: 0 0 1em; }
strong { font-weight: 600; color: var(--navy); }
h1, h2, h3, p, li { overflow-wrap: break-word; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 30; }

/* --- Bandeau du haut et menu, posés sur la bannière --------------------------------- */
.site-head { position: absolute; top: 0; left: 0; right: 0; z-index: 10; color: #fff; }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 20px; padding-top: 8px; padding-bottom: 8px; font-size: 0.82rem; }
.topbar a { color: #fff; text-decoration: none; opacity: 0.92; }
.topbar a:hover { opacity: 1; text-decoration: underline; color: #fff; }
.topbar .pill { background: var(--coral); opacity: 1; padding: 3px 12px; border-radius: 4px; font-weight: 500; }
.topbar .pill:hover { text-decoration: none; background: var(--coral-dark); }

.header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 84px; position: relative; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand img { height: 62px; width: auto; background: #fff; border-radius: 10px; padding: 4px 6px; }
.brand span { font-weight: 600; font-size: 1.05rem; line-height: 1.2; }
.brand small { display: block; font-weight: 400; font-size: 0.78rem; opacity: 0.85; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a { color: #fff; text-decoration: none; text-transform: uppercase; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.03em; padding: 8px 10px; border-radius: 6px; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.14); color: #fff; }
.nav .btn { margin-left: 8px; }

#menu { position: absolute; opacity: 0; pointer-events: none; }
.menu-toggle { display: none; }
@media (max-width: 1020px) {
  .menu-toggle { display: inline-flex; cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.6); color: #fff; border-radius: 8px; padding: 7px 14px; font-weight: 500; }
  .nav { display: none; position: absolute; top: 100%; left: 16px; right: 16px; flex-direction: column; align-items: stretch; background: var(--navy); border-radius: 12px; padding: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25); }
  .nav a { padding: 12px; font-size: 0.85rem; }
  .nav .btn { margin: 8px 0 0; text-align: center; }
  #menu:checked ~ .nav { display: flex; }
  .brand img { height: 50px; }
  .brand span { display: none; }
}

/* --- Bannière (accueil) et en-tête des pages ---------------------------------------- */
.banner {
  position: relative;
  color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgba(78, 166, 207, 0.6), transparent 45%),
    linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 55%, var(--teal) 100%);
  overflow: hidden;
}
.banner .wrap { position: relative; z-index: 1; }
.banner.home { padding: 200px 0 150px; }
.banner.page { padding: 170px 0 60px; }
.banner h1 { color: #fff; max-width: 17em; }
.banner .lead { font-size: 1.08rem; max-width: 40em; opacity: 0.92; }
.banner .crumbs { font-size: 0.85rem; opacity: 0.85; margin-bottom: 8px; }
.banner .crumbs a { color: #fff; }
.kicker { display: inline-block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; color: #d6ebf4; margin-bottom: 12px; }

/* Les carrés du logo SMI, en motif décoratif. */
.squares { position: absolute; right: 6%; bottom: 14%; width: 300px; height: 230px; pointer-events: none; opacity: 0.9; }
.squares i { position: absolute; display: block; border-radius: 6px; }
.squares i:nth-child(1) { width: 92px; height: 92px; left: 0; top: 0; background: rgba(255, 255, 255, 0.16); }
.squares i:nth-child(2) { width: 120px; height: 120px; left: 104px; top: 26px; background: rgba(214, 235, 244, 0.45); }
.squares i:nth-child(3) { width: 74px; height: 74px; left: 210px; top: 150px; background: rgba(255, 255, 255, 0.22); }
.squares i:nth-child(4) { width: 46px; height: 46px; left: 40px; top: 120px; background: rgba(224, 106, 114, 0.6); }
.banner.page .squares { transform: scale(0.6); transform-origin: right bottom; bottom: 8%; }
@media (max-width: 760px) { .squares { display: none; } .banner.home { padding: 170px 0 110px; } .banner.page { padding: 150px 0 44px; } }

/* --- Boutons ------------------------------------------------------------------------ */
.btn { display: inline-block; background: var(--teal); color: #fff !important; text-decoration: none; font-weight: 500; font-size: 0.9rem; padding: 10px 22px; border-radius: 30px; border: 2px solid var(--teal); }
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn.coral { background: var(--coral); border-color: var(--coral); }
.btn.coral:hover { background: var(--coral-dark); border-color: var(--coral-dark); }
.btn.outline-light { background: transparent; border-color: #fff; }
.btn.outline-light:hover { background: rgba(255, 255, 255, 0.14); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6em; }
.actions.flush { margin: 0; }

/* --- Tuiles sous la bannière -------------------------------------------------------- */
.tiles { position: relative; z-index: 2; margin-top: -70px; }
.tiles .grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.tile { display: block; text-decoration: none; text-align: center; color: #fff; padding: 30px 22px 26px; background: var(--teal); box-shadow: 0 12px 30px rgba(15, 44, 71, 0.18); transition: transform 0.15s; }
.tile:nth-child(2) { background: var(--navy-2); }
.tile:nth-child(3) { background: var(--teal); }
.tile:hover { transform: translateY(-4px); color: #fff; }
.tile svg { width: 44px; height: 44px; margin: 0 auto 12px; }
.tile h3 { color: #fff; margin-bottom: 0.3em; }
.tile p { font-size: 0.85rem; margin: 0; opacity: 0.9; }

/* --- Introduction centrée ----------------------------------------------------------- */
.intro { padding: 56px 0 64px; text-align: center; }
.intro p { max-width: 58em; margin: 0 auto; font-size: 1rem; }

/* --- Rangées alternées : texte et visuel ---------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; min-height: 440px; }
.split .text { padding: 60px clamp(20px, 5vw, 70px); display: flex; flex-direction: column; justify-content: center; }
.split .text > :last-child { margin-bottom: 0; }
.split.reverse .text { order: 2; background: var(--bg-alt); }
.split.reverse .visual { order: 1; }
.visual { position: relative; overflow: hidden; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%); }
.visual.v2 { background: linear-gradient(135deg, var(--teal) 0%, var(--navy-2) 100%); }
.visual.v3 { background: linear-gradient(135deg, var(--navy-2) 0%, var(--navy) 100%); }
.visual svg { width: 120px; height: 120px; position: relative; z-index: 1; opacity: 0.95; }
.visual .squares { right: 8%; bottom: 10%; transform: scale(0.75); transform-origin: right bottom; }
.visual .caption { position: absolute; left: 24px; bottom: 18px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.8; z-index: 1; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; min-height: 0; }
  .split .visual { min-height: 200px; order: 1 !important; }
  .split .text { order: 2 !important; padding: 40px 20px; }
}

/* --- Sections et contenus ----------------------------------------------------------- */
section.block { padding: 64px 0; }
section.alt { background: var(--bg-alt); }
.center-title { text-align: center; margin-bottom: 36px; }
.center-title p { color: var(--muted); max-width: 44em; margin: 0 auto; }

.grid { display: grid; gap: 22px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 40px; }
.grid.center { align-items: center; }

.card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--teal); padding: 26px; text-decoration: none; color: inherit; display: block; }
a.card:hover { box-shadow: 0 10px 28px rgba(15, 44, 71, 0.12); color: inherit; }
.card p { color: var(--muted); margin: 0; font-size: 0.92rem; }
.card .more { display: inline-block; margin-top: 12px; font-weight: 500; font-size: 0.9rem; color: var(--teal-dark); }
.card .meta { color: var(--muted); font-size: 0.8rem; margin-bottom: 6px; }
.icon { width: 50px; height: 50px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; margin-bottom: 14px; }
.icon svg { width: 26px; height: 26px; }

.prose { max-width: 50em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.35em; }
.prose h2 { margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.2em; }

.values { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); }
.value { text-align: center; padding: 22px 14px; background: #fff; border: 1px solid var(--line); font-weight: 500; color: var(--navy); }

.cta { background: linear-gradient(120deg, var(--navy) 0%, var(--teal) 100%); color: #fff; }
.cta .wrap { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; padding-top: 48px; padding-bottom: 48px; }
.cta h2 { color: #fff; margin: 0 0 0.2em; }
.cta p { margin: 0; opacity: 0.9; }

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact-list li { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--teal); padding: 16px 20px; }
.contact-list strong { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 500; }
.contact-list a { font-size: 1.1rem; font-weight: 600; text-decoration: none; color: var(--navy); }
.contact-list a:hover { color: var(--teal-dark); }

.article-meta { color: var(--muted); font-size: 0.88rem; }
img.centered { margin: 0 auto; }

/* --- Contacts flottants (comme le site jumeau) ---------------------------------------- */
.float-contact { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 20; display: flex; flex-direction: column; gap: 2px; }
.float-contact a { width: 44px; height: 44px; display: grid; place-items: center; background: var(--teal); color: #fff; border-radius: 6px 0 0 6px; }
.float-contact a:hover { background: var(--navy); color: #fff; }
.float-contact svg { width: 20px; height: 20px; }
@media (max-width: 760px) { .float-contact { top: auto; bottom: 16px; transform: none; } }

/* --- Pied de page ------------------------------------------------------------------- */
.footer { background: var(--navy); color: #c4d2df; padding: 52px 0 24px; font-size: 0.9rem; }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { color: #d6ebf4; }
.footer .cols { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.footer h3 { color: #fff; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.8em; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 6px; }
.footer .logo { background: #fff; border-radius: 10px; padding: 6px 8px; height: 70px; width: auto; margin-bottom: 14px; }
.footer .legal { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 34px; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; color: #8fa3b6; font-size: 0.82rem; }
.center-title.spaced { margin-top: 48px; }
.prose h3 + .contact-list, aside h3 { margin-top: 0; }

/* --- Touches de rouge --------------------------------------------------------------- */
.split .text h2::after, .center-title h2::after, .prose > h2:first-child::after, .cta h2::after {
  content: ""; display: block; width: 40px; height: 2px; background: var(--coral); border-radius: 2px; margin-top: 14px;
}
.center-title h2::after { margin-left: auto; margin-right: auto; }
.kicker::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--coral); border-radius: 2px; margin-right: 10px; vertical-align: middle; }
.card .more, .split .text a:not(.btn) { text-decoration-color: var(--coral); }
a.card:hover .more { color: var(--coral); }
.float-contact a:hover { background: var(--coral); }
.footer a:hover { color: #f4b3b8; }
.contact-list a:hover { color: var(--coral); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--coral); }

/* --- Photos d'illustration (Wikimedia Commons, voir /credits/) ------------------------ */
.banner.home {
  background:
    linear-gradient(110deg, rgba(29, 95, 136, 0.94) 0%, rgba(44, 129, 175, 0.82) 50%, rgba(78, 166, 207, 0.45) 100%),
    url("/images/photos/calanques-marseille.jpg") center 40% / cover no-repeat;
}
.banner.page {
  background:
    linear-gradient(110deg, rgba(29, 95, 136, 0.95) 0%, rgba(44, 129, 175, 0.86) 60%, rgba(78, 166, 207, 0.6) 100%),
    url("/images/photos/port-marseille.jpg") center / cover no-repeat;
}
.visual.photo { background-size: cover; background-position: center; }
.visual.photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(29, 95, 136, 0.05) 40%, rgba(29, 95, 136, 0.75) 100%); }
.visual.photo .caption { opacity: 1; font-weight: 600; }
.visual.photo .squares { display: none; }
.visual.photo.ph-audit { background-image: url("/images/photos/audit.jpg"); }
.visual.photo.ph-depannage { background-image: url("/images/photos/depannage.jpg"); }
.visual.photo.ph-reseau { background-image: url("/images/photos/baie-reseau.jpg"); }
.visual.photo.ph-serveurs { background-image: url("/images/photos/serveurs.jpg"); }
.visual.photo.ph-poste { background-image: url("/images/photos/poste-de-travail.jpg"); }

/* --- Logos des partenaires ------------------------------------------------------------ */
.partners { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); align-items: center; }
.partners li { list-style: none; background: #fff; border: 1px solid var(--line); height: 96px; display: grid; place-items: center; padding: 16px 22px; }
.partners img { max-height: 46px; width: auto; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: 0.75; transition: filter 0.2s, opacity 0.2s; }
.partners li:hover img { filter: none; opacity: 1; }
ul.partners { padding: 0; margin: 0; }

/* --- En-tête sur écrans moyens : nom raccourci, menu resserré ------------------------- */
@media (max-width: 1280px) and (min-width: 1021px) {
  .brand span { display: none; }
  .nav a { padding: 8px 8px; font-size: 0.74rem; }
}
.credits td, .credits th { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 0.9rem; }
.credits { border-collapse: collapse; width: 100%; }
@media (max-width: 600px) { .topbar .wrap { justify-content: space-between; } .topbar a[href^="mailto:"], .topbar a[href="tel:+33971160348"] { display: none; } }

/* Liens blancs posés sur la bannière : rester blancs au survol (sinon bleu foncé sur bleu). */
.brand:hover { color: #fff; }
.brand:hover img { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45); }
.brand img { transition: box-shadow 0.2s; }
.banner .crumbs a:hover { color: #fff; text-decoration-thickness: 2px; }
