/**
 * ETCI Concept - Styles additionnels
 *
 * Tailwind est compilé en statique (assets/css/tailwind.css, voir README).
 * Ce fichier ne contient que ce qui n'est pas exprimable en classes utilitaires.
 */

/* Reset minimal */
* { box-sizing: border-box; }

/* Smooth scroll pour les ancres */
html { scroll-behavior: smooth; }

/* Focus visible accessible */
:focus-visible {
  outline: 2px solid #517241;
  outline-offset: 2px;
}

/* Sélection */
::selection {
  background: rgba(81, 114, 65, 0.25);
  color: #1A1A1A;
}

/* Article connexe / carte blog hover subtil */
.card-blog {
  background: #FFF;
  border: 1px solid rgba(229, 229, 229, 0.6);
  transition: box-shadow 250ms ease, transform 250ms ease;
}
.card-blog:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

/* Carrousels (témoignages, projets vedette, etc.) */
.etci-carousel { position: relative; }
.etci-carousel-track {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 0.25rem;
}
.etci-carousel-track::-webkit-scrollbar { display: none; }
.etci-carousel-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  /* défaut mobile: 1 par vue (largeur quasi-totale) */
  width: calc(100% - 2rem);
}
@media (min-width: 768px) {
  .etci-carousel-item[data-per-view-md="2"] { width: calc(50% - 0.75rem); }
  .etci-carousel-item[data-per-view-md="3"] { width: calc(33.333% - 1rem); }
}
@media (min-width: 1024px) {
  .etci-carousel-item[data-per-view-lg="3"] { width: calc(33.333% - 1rem); }
  .etci-carousel-item[data-per-view-lg="4"] { width: calc(25% - 1.125rem); }
}
.etci-carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.etci-carousel-dots button {
  background: none;
  border: 0;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #9A9A9A;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.35rem;
  transition: color 200ms ease, transform 200ms ease;
}
.etci-carousel-dots button:hover { color: #517241; }
.etci-carousel-dots button[aria-current="true"] {
  color: #517241;
  transform: scale(1.15);
}
/* Variante "dots" simples (ronds) pour témoignages */
.etci-carousel-dots[data-style="dots"] button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 9999px;
  background: #D4D4D4;
  font-size: 0;
  color: transparent;
}
.etci-carousel-dots[data-style="dots"] button[aria-current="true"] {
  background: #517241;
  width: 28px;
  border-radius: 9999px;
  transform: none;
}

/* Article (blog detail) — petite typographie de prose */
.article-prose p { line-height: 1.7; }
.article-prose ul { list-style: disc; padding-left: 1.25rem; }
.article-prose h3 { margin-top: 2.5rem; }

/* Citation décorative type "callout" — utilisée dans les articles */
.article-prose blockquote {
  position: relative;
  margin: 2.5rem 0;
  padding: 1.75rem 2rem 1.75rem 4.5rem;
  background: #EEF3EC;
  border-left: 4px solid #517241;
  color: #2B2B2B;
  font-style: italic;
  line-height: 1.7;
}
.article-prose blockquote::before {
  content: '\201C';
  position: absolute;
  top: 0.25rem;
  left: 1rem;
  font-family: 'Outfit', sans-serif;
  font-size: 4.5rem;
  line-height: 1;
  color: #517241;
  font-style: normal;
  font-weight: 700;
}
.article-prose blockquote p { margin: 0; }
.article-prose blockquote p + p { margin-top: 0.75rem; }

/* Images embarquées dans le contenu d'un article */
.article-prose figure { margin: 2rem 0; }
.article-prose figure img,
.article-prose img { width: 100%; height: auto; display: block; }
.article-prose figcaption {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: #737373;
  text-align: center;
}
.article-prose a { color: #517241; text-decoration: underline; }
.article-prose a:hover { color: #446035; }

/* ─── Motifs blueprint, guides d'architecte & spinner ───
   (déplacés depuis l'inline <style> de header.php lors du passage au Tailwind compilé) */
    /* Pattern blueprint en filigrane technique (visible) */
    .bg-blueprint {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%239A9A9A' stroke-width='0.7'%3E%3Crect x='20' y='20' width='160' height='110'/%3E%3Crect x='40' y='40' width='50' height='28'/%3E%3Crect x='100' y='40' width='65' height='28'/%3E%3Crect x='40' y='78' width='125' height='42'/%3E%3Cline x1='40' y1='99' x2='165' y2='99'/%3E%3Ccircle cx='65' cy='110' r='4'/%3E%3Ccircle cx='90' cy='110' r='4'/%3E%3Ccircle cx='115' cy='110' r='4'/%3E%3Crect x='200' y='20' width='180' height='110'/%3E%3Crect x='220' y='40' width='140' height='14'/%3E%3Crect x='220' y='62' width='90' height='58'/%3E%3Crect x='320' y='62' width='40' height='26'/%3E%3Crect x='320' y='94' width='40' height='26'/%3E%3Cline x1='220' y1='91' x2='310' y2='91'/%3E%3Cline x1='265' y1='62' x2='265' y2='120'/%3E%3Crect x='20' y='150' width='110' height='140'/%3E%3Crect x='40' y='170' width='35' height='30'/%3E%3Crect x='80' y='170' width='35' height='30'/%3E%3Crect x='40' y='210' width='75' height='28'/%3E%3Cline x1='40' y1='224' x2='115' y2='224'/%3E%3Crect x='40' y='250' width='75' height='30'/%3E%3Ccircle cx='55' cy='265' r='8'/%3E%3Ccircle cx='80' cy='265' r='8'/%3E%3Ccircle cx='105' cy='265' r='8'/%3E%3Crect x='150' y='150' width='100' height='140'/%3E%3Cline x1='170' y1='150' x2='170' y2='290'/%3E%3Crect x='180' y='170' width='55' height='100'/%3E%3Cline x1='180' y1='190' x2='235' y2='190'/%3E%3Cline x1='180' y1='210' x2='235' y2='210'/%3E%3Cline x1='180' y1='230' x2='235' y2='230'/%3E%3Cline x1='180' y1='250' x2='235' y2='250'/%3E%3Crect x='270' y='150' width='110' height='140'/%3E%3Cpolyline points='270,200 320,170 380,200'/%3E%3Cline x1='290' y1='200' x2='290' y2='290'/%3E%3Cline x1='360' y1='200' x2='360' y2='290'/%3E%3Crect x='300' y='240' width='50' height='50'/%3E%3Cline x1='325' y1='240' x2='325' y2='290'/%3E%3Crect x='20' y='310' width='360' height='70'/%3E%3Cline x1='110' y1='310' x2='110' y2='380'/%3E%3Cline x1='200' y1='310' x2='200' y2='380'/%3E%3Cline x1='290' y1='310' x2='290' y2='380'/%3E%3Ctext x='60' y='350' font-family='monospace' font-size='10' fill='%239A9A9A'%3EA.01%3C/text%3E%3Ctext x='150' y='350' font-family='monospace' font-size='10' fill='%239A9A9A'%3EA.02%3C/text%3E%3Ctext x='240' y='350' font-family='monospace' font-size='10' fill='%239A9A9A'%3EA.03%3C/text%3E%3Ctext x='330' y='350' font-family='monospace' font-size='10' fill='%239A9A9A'%3EA.04%3C/text%3E%3C/g%3E%3C/svg%3E");
      background-repeat: repeat;
      background-size: 480px 480px;
      opacity: 0.2;
    }
    /* Variante plus marquée pour les page-header */
    .bg-blueprint-strong {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%23737373' stroke-width='0.9'%3E%3Crect x='20' y='20' width='160' height='110'/%3E%3Crect x='40' y='40' width='50' height='28'/%3E%3Crect x='100' y='40' width='65' height='28'/%3E%3Crect x='40' y='78' width='125' height='42'/%3E%3Cline x1='40' y1='99' x2='165' y2='99'/%3E%3Ccircle cx='65' cy='110' r='4'/%3E%3Ccircle cx='90' cy='110' r='4'/%3E%3Ccircle cx='115' cy='110' r='4'/%3E%3Crect x='200' y='20' width='180' height='110'/%3E%3Crect x='220' y='40' width='140' height='14'/%3E%3Crect x='220' y='62' width='90' height='58'/%3E%3Crect x='320' y='62' width='40' height='26'/%3E%3Crect x='320' y='94' width='40' height='26'/%3E%3Cline x1='220' y1='91' x2='310' y2='91'/%3E%3Cline x1='265' y1='62' x2='265' y2='120'/%3E%3Crect x='20' y='150' width='110' height='140'/%3E%3Crect x='40' y='170' width='35' height='30'/%3E%3Crect x='80' y='170' width='35' height='30'/%3E%3Crect x='40' y='210' width='75' height='28'/%3E%3Cline x1='40' y1='224' x2='115' y2='224'/%3E%3Crect x='40' y='250' width='75' height='30'/%3E%3Ccircle cx='55' cy='265' r='8'/%3E%3Ccircle cx='80' cy='265' r='8'/%3E%3Ccircle cx='105' cy='265' r='8'/%3E%3Crect x='150' y='150' width='100' height='140'/%3E%3Cline x1='170' y1='150' x2='170' y2='290'/%3E%3Crect x='180' y='170' width='55' height='100'/%3E%3Cline x1='180' y1='190' x2='235' y2='190'/%3E%3Cline x1='180' y1='210' x2='235' y2='210'/%3E%3Cline x1='180' y1='230' x2='235' y2='230'/%3E%3Cline x1='180' y1='250' x2='235' y2='250'/%3E%3Crect x='270' y='150' width='110' height='140'/%3E%3Cpolyline points='270,200 320,170 380,200'/%3E%3Cline x1='290' y1='200' x2='290' y2='290'/%3E%3Cline x1='360' y1='200' x2='360' y2='290'/%3E%3Crect x='300' y='240' width='50' height='50'/%3E%3Cline x1='325' y1='240' x2='325' y2='290'/%3E%3Crect x='20' y='310' width='360' height='70'/%3E%3Cline x1='110' y1='310' x2='110' y2='380'/%3E%3Cline x1='200' y1='310' x2='200' y2='380'/%3E%3Cline x1='290' y1='310' x2='290' y2='380'/%3E%3C/g%3E%3C/svg%3E");
      background-repeat: repeat;
      background-size: 520px 520px;
    }

    /* Guides verticaux d'architecte */
    .blueprint-guides { position: relative; }
    .blueprint-guides::before,
    .blueprint-guides::after {
      content: ''; position: absolute; top: 0; bottom: 0; width: 1px;
      background: rgba(212,212,212,0.5); pointer-events: none; z-index: 0;
    }
    .blueprint-guides::before { left: 25%; }
    .blueprint-guides::after  { right: 25%; }

    .blueprint-grid { position: relative; }
    .blueprint-grid > .guide {
      position: absolute; top: 0; bottom: 0; width: 1px;
      background: rgba(212,212,212,0.45); pointer-events: none; z-index: 0;
    }

    @keyframes spin-slow { to { transform: rotate(360deg); } }
    .animate-spin-slow { animation: spin-slow 1.4s linear infinite; }

/* ─── Arrière-plans design (images fournies — chemins relatifs au CSS) ─── */
.page-header {
  background-image: url("../img/newdesign/background_page_littletop.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.bg-accueil-top {
  background-image: url("../img/newdesign/background_accueil_top.jpg");
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.bg-accueil-mid {
  background-image: url("../img/newdesign/background_accueil_mid.jpg");
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.bg-accueil-mid2 {
  background-image: url("../img/newdesign/background_accueil_mid2.jpg");
  background-size: cover; background-position: center; background-repeat: no-repeat;
}

/* ─── Lightbox galerie ─── */
.etci-lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center;
  background: rgba(26,26,26,0.92); padding: 2rem;
}
.etci-lightbox.is-open { display: flex; }
.etci-lightbox-figure { margin: 0; max-width: 92vw; max-height: 86vh; }
.etci-lightbox-figure img {
  max-width: 92vw; max-height: 86vh; width: auto; height: auto;
  object-fit: contain; display: block; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.etci-lightbox-close {
  position: absolute; top: 1rem; right: 1.25rem; width: 44px; height: 44px;
  font-size: 2rem; line-height: 1; color: #fff; background: transparent;
  border: 0; cursor: pointer;
}
.etci-lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; font-size: 2.5rem; line-height: 1; color: #fff;
  background: rgba(255,255,255,0.08); border: 0; cursor: pointer; transition: background 0.2s;
}
.etci-lightbox-nav:hover { background: rgba(255,255,255,0.18); }
.etci-lightbox-prev { left: 1rem; }
.etci-lightbox-next { right: 1rem; }
.etci-lightbox-counter {
  position: absolute; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 0.875rem; letter-spacing: 0.05em;
}
@media (max-width: 640px) {
  .etci-lightbox { padding: 1rem; }
  .etci-lightbox-nav { width: 42px; height: 42px; font-size: 2rem; }
}

/* ─── Évite tout débordement horizontal sur mobile (honeypot, etc.) ─── */
body { overflow-x: clip; }

/* ─── Onglets « Réalisation d'un projet » : hover & focus en vert foncé ─── */
.tab-btn:hover,
.tab-btn:focus-visible {
  color: #517241;            /* vert foncé conservé au survol/focus */
  background-color: #ffffff;
}

/* ════════════════════════════════════════════════════════════
   Éditeur de contenu en ligne (admin) — assets/js/editor.js
   ════════════════════════════════════════════════════════════ */
.etci-edit-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: #1A1A1A; color: #fff;
  font-family: 'Inter', system-ui, sans-serif; font-size: 14px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.25);
}
.etci-edit-bar-inner {
  max-width: 1280px; margin: 0 auto; padding: 8px 16px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.etci-edit-brand { font-family: 'Outfit', sans-serif; font-weight: 700; letter-spacing: 0.08em; }
.etci-edit-brand b { color: #7A9D6B; }
.etci-btn {
  border: 0; cursor: pointer; border-radius: 4px; padding: 7px 14px;
  font-size: 13px; font-weight: 600; transition: background 0.15s, transform 0.05s;
}
.etci-btn:active { transform: translateY(1px); }
.etci-btn-toggle { background: #517241; color: #fff; }
.etci-btn-toggle:hover { background: #446035; }
.etci-btn-save { background: #2B2B2B; color: #9A9A9A; border: 1px solid #404040; }
.etci-btn-save.etci-has-changes { background: #7A9D6B; color: #fff; border-color: #7A9D6B; }
.etci-btn-save[disabled] { opacity: 0.6; cursor: default; }
.etci-edit-status { flex: 1 1 auto; font-size: 12.5px; color: #BCCFB5; min-width: 120px; }
.etci-edit-link { color: #9A9A9A; font-size: 12.5px; text-decoration: none; }
.etci-edit-link:hover { color: #fff; text-decoration: underline; }

.etci-format-bar {
  position: fixed; left: 0; right: 0; top: 0; z-index: 91;
  background: #FAFAFA; border-bottom: 1px solid #E5E5E5;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 6px 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.etci-format-bar.etci-disabled { opacity: 0.45; pointer-events: none; }
.etci-format-grp { display: flex; align-items: center; gap: 2px; padding-right: 8px; margin-right: 4px; border-right: 1px solid #E5E5E5; }
.etci-format-grp:last-child { border-right: 0; }
.etci-fbtn {
  min-width: 30px; height: 30px; padding: 0 7px; cursor: pointer;
  border: 1px solid transparent; border-radius: 3px; background: transparent;
  color: #404040; font-size: 13px; line-height: 1; transition: background 0.12s, border-color 0.12s;
}
.etci-fbtn:hover { background: #E5ECE0; border-color: #DDE8DA; color: #384F2C; }
.etci-select { height: 30px; border: 1px solid #E5E5E5; border-radius: 3px; background: #fff; font-size: 13px; color: #404040; padding: 0 4px; }
.etci-color { display: inline-flex; align-items: center; gap: 3px; height: 30px; padding: 0 6px; border: 1px solid #E5E5E5; border-radius: 3px; background: #fff; cursor: pointer; }
.etci-color span { font-weight: 700; color: #404040; font-size: 13px; }
.etci-color input { width: 22px; height: 20px; border: 0; padding: 0; background: none; cursor: pointer; }

/* Laisse la place aux barres fixes pendant l'édition */
body.etci-editing { padding-top: 44px; padding-bottom: 52px; }

/* Repères visuels des zones éditables */
.etci-editing .etci-text-editable {
  outline: 1px dashed rgba(81,114,65,0.5); outline-offset: 3px;
  cursor: text; transition: outline-color 0.15s, background 0.15s;
}
.etci-editing .etci-text-editable:hover { outline-color: #517241; background: rgba(81,114,65,0.04); }
.etci-editing .etci-text-editable:focus { outline: 2px solid #517241; outline-offset: 3px; background: rgba(81,114,65,0.05); }
.etci-editing .etci-img-editable {
  outline: 2px dashed rgba(81,114,65,0.6); outline-offset: 2px; cursor: pointer; position: relative;
}
.etci-editing .etci-img-editable:hover { outline-color: #517241; filter: brightness(0.92); }
.etci-editing .etci-dirty { outline-color: #7A9D6B !important; background: rgba(122,157,107,0.08); }
.etci-uploading { opacity: 0.5; }
.etci-img-updated { animation: etci-flash 1.1s ease; }
@keyframes etci-flash { 0% { box-shadow: 0 0 0 4px rgba(122,157,107,0.7); } 100% { box-shadow: 0 0 0 0 rgba(122,157,107,0); } }

/* ════════════════════════════════════════════════════════════
   Ajustements complémentaires
   ════════════════════════════════════════════════════════════ */

/* Cadre blanc autour de l'image du hero (section .bg-accueil-top) */
.bg-accueil-top img { border: 10px solid #fff; }

/* Barre d'édition en ligne masquée partout */
.etci-edit-bar { display: none !important; }

/* Utilitaires Tailwind absents du build statique compilé
   (générés automatiquement lors d'un futur `npm run build:css`). */
.aspect-\[5\/3\] { aspect-ratio: 5 / 3; }
@media (min-width: 1024px) {
  .lg\:text-5xl { font-size: 3rem; line-height: 1; }
}
