:root {
  --brand-dark: #0e5fa8;   /* bleu foncé du logo U'Hope, = fond des sections */
  --brand-light: #00a6e9;  /* bleu cyan du logo U'Hope — décoratif uniquement */
  --accent-text: #00648f;  /* variante foncée, texte/fond sur surfaces claires (cartes) */
  --brand-gradient: linear-gradient(90deg, var(--brand-dark), var(--accent-text));
  --navy: #0a3a63;

  --bg: #0e5fa8;            /* fond principal des sections = couleur du bouton */
  --bg-section: #0a3a63;    /* sections alternées, bleu marine plus profond */
  --card-bg: #cfe6f7;       /* cartes claires en îlot de lisibilité */

  /* Texte sur fond clair (dans les cartes) */
  --text: #12273b;
  --muted: #4d6478;
  --border: #c9e0f0;

  /* Texte sur fond bleu foncé (sections) */
  --text-on-dark: #eaf4fb;
  --muted-on-dark: #cfe3f4;
  --accent-on-dark: #ade5f7;
}
* { box-sizing: border-box; }
/* Filet de sécurité : une image qui n'a pas (ou plus) de règle CSS dédiée ne doit
   jamais dépasser son conteneur — évite qu'une photo affichée en taille native
   (souvent ~1000px de large) ne fasse déborder toute la page sur mobile. */
img { max-width: 100%; height: auto; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--text-on-dark); background: var(--bg); line-height: 1.55; overflow-x: hidden; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
a { color: var(--accent-on-dark); text-decoration: none; }
h1, h2, h3 { color: var(--text-on-dark); line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: 2.6rem; }
h2 { font-size: 1.8rem; margin-bottom: 24px; }
.lead { font-size: 1.15rem; color: var(--muted-on-dark); }

.site-header { background: var(--navy); border-bottom: 1px solid rgba(255,255,255,0.12); padding: 14px 0; position: sticky; top: var(--topbar-h, 0px); z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo-img { height: 46px; width: auto; display: block; }
.lang-switch a { margin-left: 8px; padding: 4px 8px; border-radius: 4px; color: #b9d7ec; font-size: 0.85rem; }
.lang-switch a.active { background: var(--accent-text); color: #fff; }

/* top calculé en JS (assets/section-nav.js) à partir de la hauteur réelle du
   bandeau au-dessus (logo + langues, et barre d'édition le cas échéant) :
   un chiffre fixe ne suit pas quand le logo passe sur deux lignes ou que la
   langue change la largeur du sélecteur, et le bandeau se retrouvait alors
   caché sous l'en-tête au lieu de rester visible en permanence au scroll. */
.section-nav { background: var(--bg-section); border-bottom: 1px solid rgba(255,255,255,0.12); position: sticky; top: var(--header-h, 74px); z-index: 99; box-shadow: 0 4px 10px rgba(3,15,30,0.15); }
.section-nav-inner { display: flex; align-items: center; gap: 10px; padding: 10px 20px; position: relative; }
.section-nav-items { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.section-nav-btn { flex: 0 0 auto; padding: 7px 16px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); color: #eaf5fc; font-weight: 600; font-size: 0.88rem; white-space: nowrap; transition: background 0.15s, color 0.15s; }
.section-nav-btn:hover { background: var(--brand-gradient); border-color: transparent; color: #fff; }

/* Bouton hamburger : masqué en desktop, où le bandeau de sections reste
   affiché en ligne comme avant. Affiché uniquement sous 820px (voir plus bas). */
.section-nav-toggle { display: none; align-items: center; gap: 8px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); color: #eaf5fc; border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 0.88rem; }
.hamburger-icon { display: inline-flex; flex-direction: column; justify-content: center; gap: 3px; width: 18px; height: 14px; }
.hamburger-icon span { display: block; width: 100%; height: 2px; background: #eaf5fc; border-radius: 2px; }

.hero {
  background: linear-gradient(180deg, rgba(6, 20, 38, 0.62) 0%, rgba(6, 20, 38, 0.55) 45%, rgba(8, 30, 55, 0.42) 100%), url("brand/hero-europe-africa.jpg") center/cover no-repeat;
  padding: 100px 0;
  color: #fff;
}
.hero h1 { color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65); }
.hero .lead { color: #f2f8fc; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6); }
.hero-inner { max-width: 820px; }
.hero-brand { text-align: center; margin: 0 auto 32px; max-width: 760px; }
.hero-logo { width: 100%; max-width: 680px; height: auto; display: block; margin: 0 auto; filter: drop-shadow(0 4px 20px rgba(0,0,0,0.55)); }
.hero-company { color: #fff; font-weight: 700; letter-spacing: 0.55em; font-size: 1rem; margin-top: 4px; text-shadow: 0 2px 10px rgba(0,0,0,0.6); }
@media (max-width: 600px) {
  .hero-logo { max-width: 300px; }
  .hero-company { letter-spacing: 0.35em; font-size: 0.8rem; }
}
.badge { display: inline-block; background: rgba(6, 20, 38, 0.65); border: 1px solid rgba(0, 166, 233, 0.7); color: #fff; font-size: 0.8rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.cta-row { margin-top: 28px; display: flex; gap: 14px; }
.btn { display: inline-block; padding: 12px 24px; border-radius: 8px; font-weight: 600; }
.btn-primary { background: var(--brand-gradient); color: #fff; }
.btn-outline { border: 1.5px solid #fff; color: #fff; }

.reassurance { padding: 48px 0; background: var(--bg-section); border-bottom: 1px solid rgba(255,255,255,0.1); }
.stats-row { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 32px; text-align: center; }
.stat { display: flex; flex-direction: column; align-items: center; max-width: 240px; }
.stat-icon { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; color: #5ec4f0; flex-shrink: 0; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--text-on-dark); }
.stat-label { color: var(--muted-on-dark); font-size: 0.9rem; }

.solutions, .services, .about, .awards, .contact, .broderie-gallery { padding: 64px 0; }
.solutions, .about { background: var(--bg); }
.services, .contact { background: var(--bg-section); }
.broderie-gallery { background: var(--bg); }
.broderie-gallery h2 { text-align: center; }
.broderie-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.broderie-thumb { display: block; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 16px rgba(3, 15, 30, 0.3); background: var(--card-bg); }
.broderie-thumb img { width: 100%; height: 220px; object-fit: cover; display: block; transition: transform 0.25s ease; }
.broderie-thumb:hover img { transform: scale(1.06); }
.ushop-gallery { background: var(--bg-section); }
.grid { display: grid; gap: 24px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { border: 1px solid var(--border); border-radius: 12px; padding: 24px; background: var(--card-bg); color: var(--text); box-shadow: 0 4px 16px rgba(3, 15, 30, 0.25); overflow: hidden; }
/* max-width: none contre le filet de sécurité global "img { max-width: 100% }" :
   cette photo déborde volontairement des deux côtés de la carte (calc(100% + 48px)
   + marges négatives, pour aller jusqu'aux bords) ; sans ça, le filet de sécurité
   la limitait à 100% de la largeur intérieure, ce qui la décalait vers la gauche
   au lieu de la garder centrée. */
.service-card-img { width: calc(100% + 48px); max-width: none; margin: -24px -24px 18px; display: block; height: 200px; object-fit: cover; }
.service-card-mosaic {
  width: calc(100% + 48px);
  margin: -24px -24px 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 1fr 1fr;
  height: 200px; /* même hauteur que .service-card-mosaic-3 pour aligner les cartes Services entre elles */
  gap: 3px;
  overflow: hidden; /* filet de sécurité : une photo au ratio inhabituel ne doit jamais déborder du cadre */
}
/* min-height:0 (et min-width:0 par cohérence) annule la "taille minimale automatique" que les
   navigateurs appliquent par défaut aux images dans une grille : sans ça, une photo avec un ratio
   très vertical peut forcer sa cellule à dépasser la hauteur fixée par le conteneur (200px) et
   déborder sur le titre affiché juste en dessous. */
.service-card-mosaic img { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: cover; display: block; }
.service-card-mosaic img:first-child { grid-column: span 2; grid-row: span 2; }
.service-card-mosaic-3 {
  width: calc(100% + 48px);
  margin: -24px -24px 18px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  height: 200px;
  gap: 3px;
  overflow: hidden;
}
.service-card-mosaic-3 img { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: cover; display: block; }
.service-card-mosaic-3 img:first-child { grid-row: 1 / 3; grid-column: 1; }
.service-card-mosaic-3 img:nth-child(2) { grid-row: 1; grid-column: 2; }
.service-card-mosaic-3 img:nth-child(3) { grid-row: 2; grid-column: 2; }
.card h3 { color: var(--navy); }
.card p { color: var(--text); }
.card-pole { font-size: 0.8rem; color: var(--accent-text); font-weight: 700; text-transform: uppercase; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.card-pole-icon { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(10,58,99,0.08); color: var(--accent-text); flex-shrink: 0; }
.card .btn-outline { border-color: var(--accent-text); color: var(--accent-text); }

.awards-list { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.awards-list li { border-left: 3px solid var(--brand-light); padding-left: 14px; }
.award-img { max-height: 140px; max-width: 220px; object-fit: contain; display: block; margin-bottom: 12px; border-radius: 8px; }
.awards-list strong { color: var(--text-on-dark); }
.awards-list span { color: var(--muted-on-dark); font-size: 0.9rem; }

.eyebrow { color: var(--accent-on-dark); font-weight: 700; text-transform: uppercase; font-size: 0.85rem; }
.about-points { padding-left: 20px; color: var(--text-on-dark); }
.about-points li { margin-bottom: 6px; }
.about-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; }
.about-inner.no-media { grid-template-columns: 1fr; }
.about-media img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 10px 30px rgba(3, 15, 30, 0.4); display: block; }
@media (max-width: 800px) {
  .about-inner { grid-template-columns: 1fr; }
  .about-media { order: -1; }
}
/* Les photos "Solutions" sont des logos/captures (D@niel, JosEphe...), pas des
   photos où un cadrage serré est souhaitable : on les affiche entières et
   centrées (object-fit: contain) plutôt que de les recadrer en "cover", ce
   qui coupait parfois une partie du logo de façon peu naturelle. */
.solution-card-img { height: 160px; object-fit: contain; background: var(--navy); }

.site-footer { background: var(--navy); border-top: 1px solid rgba(255,255,255,0.1); color: #cfe3f2; font-size: 0.9rem; }
.site-footer a { color: #fff; }
.site-footer h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 14px; }
.site-footer p { margin: 0 0 8px; line-height: 1.5; }

.footer-main { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding: 44px 0 36px; }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.footer-tagline { color: #9fc3de; font-size: 0.85rem; margin: 0; }
.footer-social-row { display: flex; gap: 10px; }
.footer-social { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.1); color: #fff; transition: background 0.15s; }
.footer-social:hover { background: var(--brand-gradient); }
.footer-col p { color: #cfe3f2; font-size: 0.88rem; }
.footer-col a { text-decoration: underline; text-decoration-color: rgba(255,255,255,0.35); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 16px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 0.8rem; color: #9fc3de; }

@media (max-width: 820px) {
  .footer-main { grid-template-columns: 1fr; gap: 28px; padding: 36px 0 28px; text-align: left; }
  .footer-bottom-inner { flex-direction: column; gap: 4px; text-align: left; }
}

/* Admin */
.admin-body { background: var(--bg-section); min-height: 100vh; }
.admin-wrap { max-width: 900px; margin: 0 auto; padding: 40px 24px; }
.admin-wrap h2, .admin-topbar a { color: var(--text-on-dark); }
.admin-login { max-width: 380px; margin: 100px auto; background: var(--card-bg); padding: 32px; border-radius: 12px; border: 1px solid var(--border); }
.admin-login h2 { color: var(--navy); }
.admin-login input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; margin: 10px 0; background: #eaf6fc; color: var(--text); }
.admin-login button, .admin-save { background: var(--brand-gradient); color: #fff; border: none; padding: 10px 20px; border-radius: 6px; font-weight: 600; cursor: pointer; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.2); }
.admin-tabs a { padding: 10px 16px; color: var(--muted-on-dark); font-weight: 600; border-bottom: 2px solid transparent; }
.admin-tabs a.active { color: #fff; border-bottom-color: #fff; }
.admin-field { margin-bottom: 18px; }
.admin-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; color: var(--text-on-dark); }
.admin-field input[type=text], .admin-field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; background: #eaf6fc; color: var(--text); }
.admin-field textarea { min-height: 70px; }
.admin-section-title { font-size: 1.1rem; color: var(--text-on-dark); margin: 28px 0 12px; padding-top: 12px; border-top: 1px dashed rgba(255,255,255,0.25); }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.flash-ok { background: #e5f6ea; color: #1b7a37; padding: 12px 16px; border-radius: 6px; margin-bottom: 20px; }
.logout-link { color: var(--muted-on-dark); font-size: 0.9rem; }
.card-array-item { border: 1px solid var(--border); border-radius: 8px; padding: 14px; margin-bottom: 12px; background: var(--card-bg); }

/* Sections personnalisées */
.btn-small { padding: 8px 16px; font-size: 0.85rem; margin-top: 10px; }
.custom-section { padding: 64px 0; background: var(--bg); }
.custom-section.alt { background: var(--bg-section); }
.custom-section-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.custom-media img { width: 100%; height: auto; border-radius: 12px; display: block; box-shadow: 0 6px 20px rgba(3, 15, 30, 0.3); }
.custom-media-secondary { margin: 16px 0; }
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 12px; background: #000; }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.video-link { display: inline-block; background: var(--brand-gradient); color: #fff; padding: 14px 22px; border-radius: 8px; font-weight: 600; }
.custom-section-inner.reverse { direction: rtl; }
.custom-section-inner.reverse > * { direction: ltr; }

.layout-banner { position: relative; padding: 0; min-height: 420px; display: flex; align-items: flex-end; overflow: hidden; }
.custom-banner-media { position: absolute; inset: 0; }
.custom-banner-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.custom-banner-media .video-embed { position: absolute; inset: 0; padding-bottom: 0; height: 100%; }
.custom-banner-overlay { position: relative; width: 100%; background: linear-gradient(0deg, rgba(6,20,38,0.88) 10%, rgba(6,20,38,0.15) 90%); padding: 60px 0 40px; color: #fff; }
.custom-banner-overlay h2, .custom-banner-overlay .lead { color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

.layout-text-only .custom-text-only-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.layout-text-only .custom-media { margin: 24px auto 0; max-width: 500px; }
.layout-text-only .custom-media img { border-radius: 12px; width: 100%; }

@media (max-width: 760px) {
  .custom-section-inner { grid-template-columns: 1fr; }
  .custom-section-inner.reverse { direction: ltr; }
}

@media (max-width: 820px) {
  .header-inner { flex-wrap: wrap; justify-content: center; row-gap: 10px; }
  .header-inner .logo { order: 1; flex: 0 0 100%; text-align: center; }
  .header-inner .logo-img { margin: 0 auto; }
  .lang-switch { order: 3; flex: 0 0 100%; display: flex; justify-content: center; flex-wrap: wrap; }
  .section-nav-inner { padding: 8px 14px; justify-content: flex-start; }
  .section-nav-btn { padding: 10px 16px; font-size: 0.9rem; }

  /* Sous 820px, le bandeau de sections se replie derrière un bouton ☰ :
     évite une rangée de boutons qui déborde et s'agrippe au scroll horizontal. */
  .section-nav-toggle { display: inline-flex; }
  .section-nav-items {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    overflow-x: visible;
    background: var(--bg-section);
    border-bottom: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 10px 18px rgba(3,15,30,0.35);
    padding: 6px 14px 12px;
  }
  .section-nav-items.open { display: flex; }
  .section-nav-items .section-nav-btn { width: 100%; border-radius: 8px; text-align: left; background: transparent; border: none; padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .section-nav-items .section-nav-btn:last-child { border-bottom: none; }
  .section-nav-items .section-nav-btn:hover { background: rgba(255,255,255,0.08); color: #eaf5fc; }
}

/* Admin — sections personnalisées */
.admin-add-btn { background: rgba(255,255,255,0.12); color: #fff; border: 1px dashed rgba(255,255,255,0.4); padding: 10px 18px; border-radius: 6px; font-weight: 600; cursor: pointer; margin-top: 10px; }
.admin-remove-btn { background: #b3261e; color: #fff; border: none; padding: 6px 14px; border-radius: 6px; font-size: 0.85rem; cursor: pointer; }
.admin-custom-block { border: 1px solid var(--border); border-radius: 10px; padding: 18px; margin-bottom: 18px; background: var(--card-bg); color: var(--text); }
.admin-custom-block .admin-section-title { color: var(--navy); border-top: none; }
.admin-custom-block .admin-field label { color: var(--text); }
.admin-custom-block p { color: var(--muted); }
.admin-custom-block-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.admin-thumb { max-width: 120px; max-height: 80px; display: block; margin-bottom: 8px; border-radius: 6px; }
.admin-field small { color: var(--muted); display: block; margin-top: 4px; }
.admin-move-btn { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.3); width: 30px; height: 30px; border-radius: 6px; cursor: pointer; font-size: 1rem; line-height: 1; }
.admin-move-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.admin-custom-block .admin-move-btn { background: var(--navy); border-color: var(--navy); }
.admin-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.admin-gallery-item { border: 1px solid var(--border); border-radius: 8px; padding: 10px; background: #fff; }
.admin-gallery-item .admin-thumb { max-width: 100%; width: 100%; height: 110px; object-fit: cover; margin-bottom: 8px; }
.admin-gallery-name-input { width: 100%; padding: 6px 8px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.85rem; font-family: inherit; }
.admin-gallery-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.admin-preview { display: grid; grid-template-columns: 90px 1fr; gap: 12px; align-items: center; background: rgba(0,0,0,0.15); border: 1px dashed var(--border); border-radius: 8px; padding: 10px; margin-bottom: 16px; }
.admin-preview-text-only { grid-template-columns: 1fr; text-align: center; }
.admin-preview-media img { width: 90px; height: 60px; object-fit: cover; border-radius: 6px; display: block; }
.admin-preview-media-video { width: 90px; height: 60px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; border-radius: 6px; font-size: 0.75rem; }
.admin-preview-title { font-weight: 700; color: var(--text); font-size: 0.95rem; }
.admin-preview-body { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }

/* ---------------------------------------------------------------------- */
/* Galerie U'Shop : vignette + nom + bouton "intéressé(e)"                */
/* ---------------------------------------------------------------------- */
.ushop-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.ushop-item { display: flex; flex-direction: column; background: var(--card-bg); border-radius: 10px; overflow: hidden; box-shadow: 0 4px 16px rgba(3, 15, 30, 0.3); }
.ushop-item .broderie-thumb { box-shadow: none; border-radius: 0; }
.ushop-item-name { color: var(--text); font-size: 0.9rem; font-weight: 600; margin: 10px 12px 4px; min-height: 2.4em; }
.ushop-interest-btn { display: block; margin: 4px 12px 12px; padding: 8px 12px; text-align: center; background: var(--brand-gradient); color: #fff !important; border-radius: 6px; font-size: 0.85rem; font-weight: 600; }
.ushop-interest-btn:hover { opacity: 0.9; }

/* ---------------------------------------------------------------------- */
/* Page de demande (devis.php) — Broderie / U'Shop → Odoo                 */
/* ---------------------------------------------------------------------- */
.devis-page { padding: 56px 0 80px; min-height: 60vh; }
.devis-container { max-width: 720px; }
.devis-back { display: inline-block; margin-bottom: 24px; color: var(--text-on-dark); opacity: 0.85; }
.devis-back:hover { opacity: 1; }
.devis-card { background: var(--card-bg); color: var(--text); border-radius: 14px; padding: 36px; box-shadow: 0 10px 34px rgba(3, 15, 30, 0.35); }
.devis-card h1 { color: var(--text); font-size: 1.9rem; }
.devis-card .lead { color: var(--muted); font-size: 1rem; margin-bottom: 24px; }
.devis-success { text-align: center; }
.devis-success .btn { margin-top: 12px; }
.devis-errors { background: #fdeaea; border: 1px solid #f0b4b4; color: #8a1f1f; padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; }
.devis-errors p { margin: 4px 0; }
.devis-produit { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 24px; }
.devis-produit img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.devis-produit-label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.devis-form label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--text); }
.devis-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.devis-block { margin-bottom: 18px; }
.devis-form input[type="text"],
.devis-form input[type="email"],
.devis-form input[type="tel"],
.devis-form select,
.devis-form textarea,
.devis-form input[type="file"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.95rem; font-family: inherit; margin-top: 4px; background: #fff; color: var(--text);
}
.devis-form textarea { resize: vertical; }
.devis-honeypot { position: absolute; left: -9999px; top: -9999px; }
.devis-submit { border: none; cursor: pointer; margin-top: 8px; }
.devis-note { font-size: 0.8rem; color: var(--muted); margin-top: 14px; }
@media (max-width: 600px) {
  .devis-card { padding: 24px 18px; }
  .devis-row { grid-template-columns: 1fr; gap: 0; }
}

/* Fenêtre de recadrage / rotation des photos (admin) */
.crop-modal { position: fixed; inset: 0; background: rgba(3,15,30,0.75); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.crop-modal[hidden] { display: none; }
.crop-modal-box { background: #fff; border-radius: 12px; width: 100%; max-width: 720px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.crop-modal-header { padding: 16px 20px; font-weight: 700; color: var(--navy); border-bottom: 1px solid var(--border); }
.crop-modal-body { flex: 1; min-height: 320px; max-height: 55vh; background: #222; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.crop-modal-body img { display: block; max-width: 100%; }
.crop-modal-toolbar { display: flex; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.crop-modal-toolbar button { background: var(--card-bg); border: 1px solid var(--border); color: var(--text); padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size: 0.85rem; font-weight: 600; }
.crop-modal-toolbar button:hover { background: #fff; }
.crop-modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.crop-btn-secondary { background: none; border: 1px solid var(--border); color: var(--text); padding: 9px 16px; border-radius: 6px; cursor: pointer; font-size: 0.9rem; }
.crop-btn-secondary:hover { background: #f2f6fa; }
.crop-modal-status { margin: 0; padding: 0 20px; font-size: 0.85rem; color: var(--muted); min-height: 1.2em; }
@media (max-width: 600px) {
  .crop-modal-footer { flex-direction: column-reverse; }
  .crop-modal-footer button { width: 100%; }
}

.admin-edit-photo-btn { display: inline-block; margin: 6px 0; padding: 5px 12px; border-radius: 6px; border: 1px solid var(--navy); background: none; color: var(--navy); font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.admin-edit-photo-btn:hover { background: var(--navy); color: #fff; }

.admin-photo-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.admin-photo-actions .admin-edit-photo-btn { margin: 0; }
.admin-replace-photo-btn {
  display: inline-block; padding: 5px 12px; border-radius: 6px; border: 1px solid var(--navy);
  background: var(--navy); color: #fff; font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.admin-replace-photo-btn:hover { background: #163a5c; }

.admin-delete-photo-btn {
  display: inline-block; padding: 5px 12px; border-radius: 6px; border: 1px solid #b3261e;
  background: none; color: #b3261e; font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.admin-delete-photo-btn:hover { background: #b3261e; color: #fff; }
.admin-delete-photo-btn:disabled { opacity: 0.6; cursor: default; }

/* --- Mode édition en direct sur les pages publiques --- */
body.ie-active { padding-top: 46px; }
.ie-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2000;
  height: 46px; display: flex; align-items: center; gap: 14px;
  background: var(--navy); color: #fff; padding: 0 16px;
  font-size: 0.85rem; box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  flex-wrap: wrap;
}
.ie-bar-label { font-weight: 600; opacity: 0.9; }
.ie-bar-status { flex: 1; opacity: 0.85; font-style: italic; }
.ie-bar-save {
  background: #2e9e5b; color: #fff; border: none; border-radius: 6px;
  padding: 8px 16px; font-weight: 700; cursor: pointer; font-size: 0.85rem;
}
.ie-bar-save:hover { background: #257e49; }
.ie-bar-save:disabled { opacity: 0.6; cursor: default; }
.ie-bar-quit { color: #fff; text-decoration: underline; opacity: 0.85; font-size: 0.8rem; white-space: nowrap; }
.ie-bar-quit:hover { opacity: 1; }
/* Les décalages de .site-header et .section-nav en mode édition sont
   recalculés dynamiquement (--topbar-h / --header-h, voir section-nav.js)
   à partir de la hauteur réelle de la barre d'édition, qui varie déjà
   elle-même ci-dessous. */
@media (max-width: 700px) {
  body.ie-active { padding-top: 76px; }
  .ie-bar { height: auto; padding: 8px 12px; }
}

.ie-field {
  display: inline-block; min-width: 24px;
  outline: 1px dashed rgba(43,110,181,0.4); outline-offset: 2px;
  border-radius: 3px; cursor: text;
}
.ie-field:hover { outline-color: rgba(43,110,181,0.8); background: rgba(43,110,181,0.06); }
.ie-field:focus { outline: 2px solid var(--navy); background: #fff9db; color: #1a1a1a; }
.ie-field.ie-dirty { background: #fff3cd; }

.ie-mosaic-hint { font-size: 0.75rem; color: var(--muted); margin: 8px 0 2px; }

.ie-link-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; margin-left: 4px; padding: 0;
  border: 1px solid rgba(43,110,181,0.4); border-radius: 5px; background: #fff;
  color: var(--navy); font-size: 0.75rem; line-height: 1; cursor: pointer; vertical-align: middle;
  opacity: 0.55;
}
.ie-link-btn:hover { opacity: 1; background: #eef5fc; }
.ie-link-btn.ie-link-active { opacity: 1; background: var(--navy); border-color: var(--navy); color: #fff; }

/* Rendu public d'un texte lié via le bouton 🔗 */
.ie-linked-text { color: inherit; text-decoration: underline; text-decoration-color: rgba(43,110,181,0.5); text-underline-offset: 2px; }
.ie-linked-text:hover { text-decoration-color: currentColor; }
[data-photo-path] { cursor: default; }
body.ie-active [data-photo-path] { outline: 1px dashed rgba(43,110,181,0.35); outline-offset: -1px; }
