:root {
  --navy: #0f1e33;
  --navy-2: #172a45;
  --yellow: #ffc727;
  --yellow-d: #e6ad00;
  --text: #1d2633;
  --muted: #5b6676;
  --bg-alt: #f4f6f9;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); line-height: 1.6; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: #fff; color: var(--navy); box-shadow: 0 2px 12px rgba(15,30,51,.08); border-bottom: 3px solid var(--yellow); }
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 62px; width: auto; display: block; }
.logo svg { width: 28px; height: 28px; fill: var(--yellow); }
.topbar-inner { height: 78px; }
.nav { display: flex; gap: 20px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; opacity: .85; }
.nav a:hover { opacity: 1; color: #d9870f; }

/* Buttons */
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem; }
.btn-primary { background: var(--yellow); color: var(--navy); }
.btn-primary:hover { background: var(--yellow-d); }
.btn-ghost { border-color: #fff; color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-call { background: var(--yellow); color: var(--navy); padding: 8px 16px; white-space: nowrap; }

/* Hero */
.hero { background: linear-gradient(100deg, rgba(15,30,51,.95) 0%, rgba(15,30,51,.85) 45%, rgba(15,30,51,.35) 100%), url("img/hero-photovoltaique.jpg") center / cover no-repeat, var(--navy); color: #fff; padding: 110px 0 100px; }
.eyebrow { color: var(--yellow); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin: 0 0 12px; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.15; margin: 0 0 20px; max-width: 820px; }
.hero h1 span { color: var(--yellow); }
.lead { font-size: 1.15rem; max-width: 680px; opacity: .9; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.badges { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; opacity: .9; }

/* Sections */
.section { padding: 72px 0; scroll-margin-top: 80px; }
.section.alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 8px; color: var(--navy); }
.section-lead { color: var(--muted); margin: 0 0 32px; max-width: 680px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.card { background: #fff; border: 1px solid #e3e7ee; border-radius: var(--radius); padding: 24px; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15,30,51,.08); }
.ico { font-size: 1.8rem; width: 52px; height: 52px; display: grid; place-items: center; background: #fff6d6; border-radius: 12px; margin-bottom: 12px; }
.card h3 { margin: 0 0 6px; color: var(--navy); }
.card p { margin: 0; color: var(--muted); }
#services .card { cursor: pointer; display: flex; flex-direction: column; }
#services .card:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.more-link { margin-top: auto; padding-top: 14px; font-weight: 700; color: #c47a00; font-size: .95rem; }
#services .card:hover .more-link { text-decoration: underline; }

.modal { position: fixed; inset: 0; z-index: 90; background: rgba(5,10,20,.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { position: relative; background: #fff; border-radius: var(--radius); max-width: 640px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 32px; box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: pop .18s ease-out; }
@keyframes pop { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; padding-right: 40px; }
.modal-head .ico { margin: 0; }
.modal-head h3 { margin: 0; color: var(--navy); font-size: 1.5rem; }
.modal-body { color: var(--text); }
.modal-body ul { padding-left: 20px; }
.modal-body li { margin-bottom: 8px; }
.modal-body a { color: #c47a00; font-weight: 700; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg-alt); font-size: 1.1rem; cursor: pointer; }
.modal-close:hover { background: var(--yellow); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.checks { list-style: none; padding: 0; }
.checks li { padding-left: 32px; position: relative; margin-bottom: 14px; }
.checks li::before { content: "⚡"; position: absolute; left: 0; }
.steps { background: #fff; border-radius: var(--radius); padding: 28px; border: 1px solid #e3e7ee; }
.steps h3 { margin-top: 0; color: var(--navy); }
.steps ol { list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.steps li span { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); color: var(--navy); font-weight: 800; display: grid; place-items: center; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: 0 2px 8px rgba(15,30,51,.06); }
.gallery img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform .3s; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { padding: 10px 14px; font-size: .9rem; color: var(--muted); }
.gallery img { cursor: zoom-in; }
.fig-src { display: block; margin-top: 2px; font-size: .8rem; color: #c47a00; text-decoration: none; font-weight: 600; }
.fig-src:hover { text-decoration: underline; }
.lb-cap .fig-src { display: inline; margin-left: 8px; color: var(--yellow); font-size: .9rem; }
.ref-card { display: flex; gap: 14px; align-items: flex-start; background: #fff; border-left: 4px solid var(--yellow); border-radius: 10px; padding: 14px 18px; margin: -12px 0 24px; box-shadow: 0 2px 8px rgba(15,30,51,.06); }
.ref-card p { margin: 0; color: var(--text); }
.ref-card a { color: #c47a00; }
.ref-tag { flex: none; background: var(--navy); color: #fff; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 4px 10px; border-radius: 999px; margin-top: 2px; }
@media (max-width: 800px) { .ref-card { flex-direction: column; gap: 8px; } }
.gallery figure[hidden] { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.filter { font: inherit; font-weight: 600; padding: 8px 18px; border-radius: 999px; border: 2px solid var(--navy); background: #fff; color: var(--navy); cursor: pointer; }
.filter:hover { background: #fff6d6; }
.filter.active { background: var(--navy); color: #fff; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(5,10,20,.94); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 60px 70px; }
.lb-img { max-width: 100%; max-height: calc(100% - 40px); object-fit: contain; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); user-select: none; }
.lb-cap { color: #dfe5ee; margin-top: 12px; font-size: .95rem; text-align: center; }
.lb-btn { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; cursor: pointer; border-radius: 50%; width: 52px; height: 52px; font-size: 2rem; line-height: 1; display: grid; place-items: center; transition: background .15s; }
.lb-btn:hover { background: var(--yellow); color: var(--navy); }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-close { top: 16px; right: 16px; font-size: 1.4rem; }
@media (max-width: 800px) {
  .lb-fig { padding: 60px 8px 90px; }
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
  .lb-prev { left: calc(50% - 64px); }
  .lb-next { right: calc(50% - 64px); }
}
.labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.label { border: 2px solid var(--yellow); border-radius: var(--radius); padding: 20px; display: grid; gap: 4px; text-align: center; }
.label strong { font-size: 1.3rem; color: var(--navy); }
.label span { color: var(--muted); font-size: .95rem; }
.section.alt .cities li { background: #fff; }
.cities {list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cities li { background: var(--bg-alt); border-radius: 999px; padding: 8px 16px; }

/* Contact */
.contact { background: var(--navy); color: #fff; }
.contact h2 { color: #fff; }
.contact-line { font-size: 1.15rem; margin: 10px 0; }
.contact-line a { color: var(--yellow); text-decoration: none; font-weight: 700; }
.form { background: #fff; color: var(--text); border-radius: var(--radius); padding: 28px; display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.form input, .form select, .form textarea { font: inherit; padding: 10px 12px; border: 1px solid #cfd6e0; border-radius: 10px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--yellow); border-color: var(--yellow); }
.form-note { margin: 0; font-size: .8rem; color: var(--muted); }

/* Footer */
.footer { background: #0a1525; color: #aab4c3; font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 20px; }

.float-call { display: none; }

/* Chat assistant */
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 80; font-size: .95rem; }
.chat-toggle { display: flex; align-items: center; gap: 8px; background: var(--navy); color: #fff; border: 0; border-radius: 999px; padding: 12px 18px; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 8px 24px rgba(15,30,51,.3); }
.chat-toggle:hover { background: var(--navy-2); }
.chat-toggle-ico { font-size: 1.3rem; }
.chat.open .chat-toggle { display: none; }
.chat-panel { width: 360px; height: 540px; max-height: calc(100vh - 40px); background: #fff; border-radius: 16px; box-shadow: 0 16px 48px rgba(0,0,0,.25); display: flex; flex-direction: column; overflow: hidden; }
.chat-panel[hidden] { display: none; }
.chat-head { background: var(--navy); color: #fff; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid var(--yellow); }
.chat-head span { display: block; font-size: .78rem; opacity: .75; }
.chat-x { background: none; border: 0; color: #fff; font-size: 1.1rem; cursor: pointer; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-alt); }
.msg { max-width: 85%; padding: 10px 13px; border-radius: 14px; line-height: 1.45; white-space: pre-wrap; }
.msg.bot { background: #fff; border: 1px solid #e3e7ee; align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: var(--navy); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.typing { color: var(--muted); letter-spacing: 3px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .4; } }
.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px; background: var(--bg-alt); }
.chat-quick:not(:empty) { padding-bottom: 10px; }
.chat-quick button { font: inherit; font-size: .85rem; border: 1.5px solid var(--navy); background: #fff; color: var(--navy); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.chat-quick button:hover { background: #fff6d6; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #e3e7ee; }
.chat-input { flex: 1; font: inherit; padding: 10px 12px; border: 1px solid #cfd6e0; border-radius: 999px; }
.chat-input:focus { outline: 2px solid var(--yellow); border-color: var(--yellow); }
.chat-send { width: 42px; border: 0; border-radius: 50%; background: var(--yellow); color: var(--navy); font-size: 1rem; cursor: pointer; }
.chat-actions { display: flex; justify-content: space-between; align-items: center; padding: 0 12px 10px; font-size: .85rem; }
.chat-actions a { color: #c47a00; font-weight: 700; text-decoration: none; }
.chat-callback { font: inherit; font-weight: 700; border: 0; background: #fff6d6; color: var(--navy); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.chat-lead { padding: 12px; border-top: 1px solid #e3e7ee; display: grid; gap: 8px; background: #fffdf5; }
.chat-lead[hidden] { display: none; }
.chat-lead-title { margin: 0; font-weight: 800; color: var(--navy); }
.chat-lead input, .chat-lead textarea { font: inherit; padding: 8px 10px; border: 1px solid #cfd6e0; border-radius: 8px; }
.chat-lead-btns { display: flex; gap: 8px; justify-content: flex-end; }
.chat-lead-btns button { font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.chat-lead-btns [type=submit] { background: var(--yellow); color: var(--navy); }
.chat-lead-cancel { background: #e9edf3; color: var(--navy); }
.chat-lead-note { margin: 0; font-size: .75rem; color: var(--muted); }
.chat-hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
@media (max-width: 800px) {
  .chat { right: 12px; bottom: 12px; }
  .chat-toggle-txt { display: none; }
  .chat-toggle { width: 60px; height: 60px; justify-content: center; padding: 0; }
  .chat.open { left: 0; right: 0; bottom: 0; top: 0; }
  .chat-panel { width: 100%; height: 100%; max-height: none; border-radius: 0; }
}

/* Mentions légales */
.legal { padding: 48px 0; max-width: 800px; }
.legal h1 { color: var(--navy); }
.legal h2 { color: var(--navy); font-size: 1.2rem; margin-top: 28px; }

@media (max-width: 800px) {
  .nav { display: none; }
  .btn-call { margin-left: auto; }
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 60px 0; }
  .float-call { display: grid; place-items: center; position: fixed; right: 12px; bottom: 84px; width: 60px; height: 60px; border-radius: 50%; background: var(--yellow); font-size: 1.6rem; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.25); z-index: 20; }
}
