/*
Theme Name: ATF Climatisation
Theme URI: https://climatisation.atf34.fr
Author: Artisan Technicien Froid
Description: Thème sur mesure pour Artisan Technicien Froid (climatisation, Lunel / La Grande Motte). Modèles de pages : ATF - Services, ATF - Réalisations, ATF - Catalogues, ATF - Contact.
Version: 1.0.0
Requires at least: 5.0
Requires PHP: 7.0
License: GNU General Public License v2 or later
Text Domain: atf-climatisation
*/

:root {
  --bleu: #0a4a8f;
  --bleu-fonce: #062c57;
  --cyan: #19b5e6;
  --orange: #ff7a1a;
  --orange-fonce: #e55f00;
  --gris: #f2f6fa;
  --texte: #1c2733;
  --blanc: #fff;
  --rayon: 14px;
  --ombre: 0 8px 28px rgba(6, 44, 87, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--texte);
  line-height: 1.6;
  background: var(--blanc);
}
img { max-width: 100%; display: block; }
a { color: var(--bleu); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; color: var(--bleu-fonce); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.container { width: min(1120px, 92%); margin: 0 auto; }
.section { padding: 64px 0; }
.section.gris { background: var(--gris); }
.centre { text-align: center; }
.sous-titre { color: #50627a; max-width: 680px; margin: 0 auto 2.2em; }

/* Barre du haut */
.topbar {
  background: var(--bleu-fonce);
  color: #cfe4ff;
  font-size: .9rem;
  padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }

/* En-tête */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  box-shadow: 0 2px 14px rgba(6, 44, 87, .1);
}
header.site .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bleu-fonce); font-weight: 800; font-size: 1.15rem; line-height: 1.1; }
.logo .flocon {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--bleu));
  color: #fff; display: grid; place-items: center; font-size: 1.5rem;
}
.logo small { display: block; font-weight: 500; font-size: .72rem; color: #5b6f88; letter-spacing: .04em; text-transform: uppercase; }
nav.principal ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; align-items: center; }
nav.principal a { text-decoration: none; padding: 8px 14px; border-radius: 999px; color: var(--texte); font-weight: 600; }
nav.principal a:hover, nav.principal a[aria-current="page"] { background: var(--gris); color: var(--bleu); }
.menu-btn { display: none; background: none; border: 0; font-size: 1.8rem; cursor: pointer; color: var(--bleu-fonce); }

/* Boutons */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  transition: transform .15s, box-shadow .15s, background .15s;
  cursor: pointer; font-size: 1rem; font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 6px 18px rgba(255, 122, 26, .4); }
.btn-orange:hover { background: var(--orange-fonce); }
.btn-clair { background: #fff; color: var(--bleu-fonce); }
.btn-contour { border-color: #fff; color: #fff; }
.btn-contour:hover { background: rgba(255, 255, 255, .15); }
.btn-bleu { background: var(--bleu); color: #fff; }

/* Héros */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(25, 181, 230, .45), transparent 45%),
    linear-gradient(135deg, var(--bleu-fonce), var(--bleu));
  color: #fff;
  padding: 80px 0 90px;
}
.hero h1 { color: #fff; }
.hero p.lead { font-size: 1.2rem; color: #dcebff; max-width: 640px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 20px 0 0; }
.badges li { background: rgba(255, 255, 255, .14); padding: 6px 14px; border-radius: 999px; font-size: .92rem; }
.hero.petit { padding: 54px 0 60px; }

/* Cartes */
.grille { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.carte {
  background: #fff; border-radius: var(--rayon); padding: 26px;
  box-shadow: var(--ombre); border-top: 4px solid var(--cyan);
}
.carte .ico { font-size: 2rem; margin-bottom: 10px; }
.carte p:last-child { margin-bottom: 0; }

/* Bandeau d'appel */
.bandeau {
  background: linear-gradient(120deg, var(--orange), #ff9a3d);
  color: #fff; padding: 40px 0; text-align: center;
}
.bandeau h2 { color: #fff; }

/* Listes */
ul.coches { list-style: none; padding: 0; margin: 0 0 1em; }
ul.coches li { padding-left: 30px; position: relative; margin-bottom: .5em; }
ul.coches li::before { content: "✔"; position: absolute; left: 0; color: var(--orange); font-weight: 800; }
.villes { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; justify-content: center; }
.villes li { background: #fff; border-radius: 999px; padding: 8px 18px; box-shadow: var(--ombre); font-weight: 600; color: var(--bleu-fonce); }

/* Deux colonnes */
.duo { display: grid; gap: 36px; grid-template-columns: 1fr 1fr; align-items: center; }
.service-bloc { scroll-margin-top: 90px; }
.encart {
  background: var(--gris); border-radius: var(--rayon); padding: 26px; border-left: 5px solid var(--orange);
}

/* Réalisations */
.galerie { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.photo {
  aspect-ratio: 4 / 3; border-radius: var(--rayon);
  background: repeating-linear-gradient(45deg, #e5eef7, #e5eef7 12px, #edf3f9 12px, #edf3f9 24px);
  display: grid; place-items: center; text-align: center; color: #5b6f88; padding: 16px;
  border: 2px dashed #b9cde2; font-size: .95rem;
}
figure.realisation { margin: 0; }
figure.realisation figcaption { margin-top: 8px; font-weight: 600; color: var(--bleu-fonce); }
figure.realisation figcaption span { display: block; font-weight: 400; color: #5b6f88; font-size: .9rem; }

/* Formulaire */
form.contact { display: grid; gap: 14px; }
form.contact label { font-weight: 600; display: grid; gap: 6px; }
form.contact input, form.contact select, form.contact textarea {
  font: inherit; padding: 12px 14px; border: 2px solid #d3dfec; border-radius: 10px; width: 100%;
}
form.contact input:focus, form.contact select:focus, form.contact textarea:focus { outline: none; border-color: var(--cyan); }
form.contact .ligne { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.rgpd { font-size: .85rem; color: #5b6f88; }

/* FAQ */
details { background: #fff; border-radius: 12px; padding: 14px 18px; margin-bottom: 12px; box-shadow: var(--ombre); }
details summary { font-weight: 700; cursor: pointer; color: var(--bleu-fonce); }
details p { margin: 10px 0 0; }

/* Pied de page */
footer.site { background: var(--bleu-fonce); color: #b9cfe9; padding: 48px 0 24px; font-size: .95rem; }
footer.site h3 { color: #fff; font-size: 1.05rem; }
footer.site a { color: #fff; }
footer.site .grille { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 26px; }
footer.site .bas { border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 16px; text-align: center; font-size: .85rem; }

/* Bouton d'appel fixe sur mobile */
.appel-fixe {
  display: none; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
  background: var(--orange); color: #fff; text-align: center; font-weight: 800;
  padding: 15px; border-radius: 999px; text-decoration: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}

.legal h2 { font-size: 1.4rem; margin-top: 1.6em; }

@media (max-width: 860px) {
  .duo { grid-template-columns: 1fr; }
  .menu-btn { display: block; }
  nav.principal { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; box-shadow: 0 10px 20px rgba(0, 0, 0, .12); }
  nav.principal.ouvert { display: block; }
  nav.principal ul { flex-direction: column; align-items: stretch; padding: 10px 4%; }
  nav.principal a { display: block; }
  .appel-fixe { display: block; }
  body { padding-bottom: 76px; }
  form.contact .ligne { grid-template-columns: 1fr; }
  .topbar .container { justify-content: center; text-align: center; }
}

/* ---------- Ajouts WordPress ---------- */
@media (min-width: 861px) {
  nav.principal { display: flex; align-items: center; gap: 6px; }
}
body.admin-bar header.site { top: 32px; }
@media (max-width: 782px) { body.admin-bar header.site { top: 46px; } }
nav.principal .current-menu-item > a,
nav.principal .current_page_item > a { background: var(--gris); color: var(--bleu); }
nav.principal > .btn { margin-left: 6px; }
@media (max-width: 860px) {
  nav.principal > .btn { display: block; margin: 8px 4% 14px; text-align: center; }
}
.contenu-page { overflow-wrap: break-word; }
.contenu-page img { border-radius: var(--rayon); height: auto; }
.contenu-page .wp-block-gallery { gap: 16px; }
.contenu-page h2 { margin-top: 1.4em; }
.alerte { padding: 14px 18px; border-radius: 12px; margin-bottom: 18px; font-weight: 600; }
.alerte.ok { background: #e3f6ea; color: #14633a; }
.alerte.erreur { background: #fde8e6; color: #8e2a1e; }
