/*
 * Template TWOD.FR — reprise de la mise en page Helix Ultimate + SP Page Builder
 * Couleurs : variables --tw-* (modifiables dans le style du template).
 * Vos ajouts personnels : css/user.css (jamais écrasé par ce fichier).
 */

/* ---------- Polices embarquées (Poppins) ---------- */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/poppins-300.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-400.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-500.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-700.woff") format("woff"); }

:root {
  --tw-accent: #ff6f00;
  --tw-accent-2: #e79100;
  --tw-text: #252525;
  --tw-link: #0345bf;
  --tw-dark: #2d2d2d;
  --tw-footer: #1a1a1a;
  --tw-grey: #525252;
  --tw-light: #ececec;
  --tw-font: "Poppins", "Segoe UI", Roboto, Arial, sans-serif;
  --tw-font-alt: "Heebo", "Poppins", "Segoe UI", Arial, sans-serif;
  --tw-font-round: "Quicksand", "Poppins", "Segoe UI", Arial, sans-serif;
  --tw-container: 1320px;
  --tw-gutter: 15px;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body.site {
  margin: 0;
  background: #fff;
  color: var(--tw-text);
  font-family: var(--tw-font);
  font-size: 20px;
  font-weight: 200;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--tw-font); color: inherit; margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: 44px; font-weight: 700; }
h2 { font-size: 35px; font-weight: 300; }
h3 { font-size: 25px; font-weight: 300; }
h4 { font-size: 20px; font-weight: 400; }
h5 { font-size: 16px; font-weight: 400; }
h6 { font-size: 13px; font-weight: 200; font-family: Arial, sans-serif; }

a { color: var(--tw-link); text-decoration: none; }
a:hover, a:focus { color: var(--tw-link); text-decoration: underline; }
img { max-width: 100%; height: auto; }
strong, b { font-weight: 600; }

.tw-container { width: 100%; max-width: var(--tw-container); margin: 0 auto; padding: 0 var(--tw-gutter); box-sizing: border-box; }
.tw-skip { position: absolute; left: 1rem; top: 1rem; z-index: 2000; background: #fff; padding: .5rem 1rem; }
.tw-accent { color: var(--tw-accent); }
.tw-accent-2 { color: var(--tw-accent-2); }
.tw-center { text-align: center; }

/* ---------- En-tête (affiché uniquement si un module est en position "menu") ---------- */
.tw-header { background: #fff; box-shadow: 0 0 4px rgba(0, 0, 0, .1); position: relative; z-index: 50; }
.tw-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 85px; gap: 2rem; }
.tw-has-burger .tw-header__inner { padding-right: 80px; }
.tw-has-header .tw-burger { top: 20px; }
.tw-brand { display: inline-flex; align-items: center; }
.tw-logo { height: 36px; width: auto; }
.tw-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.tw-nav li { position: relative; }
.tw-nav a { color: var(--tw-text); font-size: 21px; font-weight: 400; text-decoration: none; }
.tw-nav a:hover, .tw-nav .active > a, .tw-nav .current > a { color: var(--tw-link); }
.tw-nav ul ul { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); padding: .75rem 1rem; flex-direction: column; }
.tw-nav li:hover > ul, .tw-nav li:focus-within > ul { display: flex; }
.tw-nav ul ul a { font-size: 16px; }
@media (max-width: 991.98px) {
  .tw-header__inner { min-height: 50px; }
  .tw-has-header .tw-nav { display: none; }
}

/* ---------- Menu latéral (offcanvas) ---------- */
.tw-burger { position: fixed; top: 18px; right: 18px; z-index: 1001; width: 44px; height: 44px; border: 0; border-radius: 4px; background: rgba(0, 0, 0, .55); cursor: pointer; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.tw-burger span { display: block; width: 22px; height: 2px; background: #fff; }
.tw-offcanvas { position: fixed; inset: 0; z-index: 1002; background: rgba(0, 0, 0, .5); }
.tw-offcanvas__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(320px, 85vw); background: #fff; padding: 70px 30px 30px; overflow-y: auto; transform: translateX(100%); transition: transform .3s ease; }
.tw-offcanvas.is-open .tw-offcanvas__panel { transform: none; }
.tw-offcanvas__close { position: absolute; top: 14px; right: 18px; font-size: 34px; line-height: 1; background: none; border: 0; cursor: pointer; color: #000; }
.tw-offcanvas ul { list-style: none; margin: 0; padding: 0; display: block; }
.tw-offcanvas li { display: block; }
.tw-offcanvas li a { display: block; padding: .5rem 0; color: var(--tw-text); font-size: 18px; font-weight: 400; }
.tw-offcanvas li.active > a, .tw-offcanvas li a:hover { color: var(--tw-link); text-decoration: none; }
.tw-offcanvas ul ul { padding-left: 1rem; }
body.tw-offcanvas-open { overflow: hidden; }

/* ---------- Sections (chrome twodsection) ---------- */
.tw-section { position: relative; padding: 50px 0; }
.tw-section__title { text-align: center; }
.tw-row { display: flex; flex-wrap: wrap; align-items: center; margin: 0 calc(var(--tw-gutter) * -1); }
.tw-row > * { padding: 0 var(--tw-gutter); box-sizing: border-box; }
.tw-col-2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
.tw-col-3 { flex: 0 0 25%; max-width: 25%; }
.tw-col-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
.tw-col-5 { flex: 0 0 41.6667%; max-width: 41.6667%; }
.tw-col-6 { flex: 0 0 50%; max-width: 50%; }
.tw-col-7 { flex: 0 0 58.3333%; max-width: 58.3333%; }
.tw-col-9 { flex: 0 0 75%; max-width: 75%; }
.tw-col-12 { flex: 0 0 100%; max-width: 100%; }
@media (max-width: 767.98px) {
  .tw-row > [class*="tw-col-"] { flex: 0 0 100%; max-width: 100%; }
}

/* 1. Bandeau d'accueil : ampoule + logo */
.tw-hero {
  padding: 300px 0 320px;
  background: #251d19 url("../images/hero-bg.jpg") center center / cover no-repeat;
  background-attachment: fixed;
  color: #fff;
  text-align: center;
}
.tw-hero img { display: block; margin: 0 auto; }
@media (max-width: 991.98px) { .tw-hero { padding: 160px 0; } }
@media (max-width: 767.98px) { .tw-hero { padding: 80px 0; } }

/* 2. Bande orange */
.tw-band { background: var(--tw-accent); color: #fff; text-align: center; padding: 50px 0; }
.tw-band p, .tw-band h2 { margin: 0; color: #fff; font-family: var(--tw-font-alt); font-size: 63px; font-weight: 200; line-height: 1.2; }
@media (max-width: 767.98px) { .tw-band { padding: 30px 0; } .tw-band p, .tw-band h2 { font-size: 27px; } }

/* 3. Compétences (HTML, CSS, Joomla, Responsive) */
.tw-features { padding: 100px 0; background: #fff url("../images/dot-map.png") center center repeat; color: #2d2d2d; }
.tw-features .tw-feature { display: flex; align-items: flex-start; gap: 0; margin: 0 0 50px; }
.tw-features .tw-feature__icon { flex: 0 0 33.3333%; max-width: 33.3333%; text-align: center; padding: 0 var(--tw-gutter); box-sizing: border-box; }
.tw-features .tw-feature__body { flex: 1 1 auto; padding: 0 var(--tw-gutter); }
.tw-features h3 { font-size: 25px; font-weight: 600; margin-bottom: 10px; text-transform: uppercase; }
.tw-features h3.tw-alt { font-family: var(--tw-font-alt); }
.tw-features p { font-size: 20px; font-weight: 400; margin: 0; line-height: 1.2; }
@media (max-width: 767.98px) {
  .tw-features { padding: 40px 0; }
  .tw-features .tw-feature { flex-direction: column; align-items: center; text-align: center; border-bottom: 1px solid #ccc; padding-bottom: 30px; margin-bottom: 30px; }
  .tw-features .tw-feature__icon { max-width: none; margin-bottom: 20px; }
  .tw-features .tw-col-6:last-child .tw-feature:last-child { border-bottom: 0; }
  .tw-features h3 { font-family: var(--tw-font-alt); font-weight: 400; font-size: 30px; }
}

/* 4. Bloc gris : "Parce que chaque projet est unique" */
.tw-split-grey { background: var(--tw-light); padding: 0; color: var(--tw-grey); }
.tw-split-grey .tw-row { margin: 0; }
.tw-split-grey .tw-row > * { padding: 0; }
.tw-split-grey h2 { font-family: var(--tw-font-round); font-size: 44px; font-weight: 700; text-align: center; color: var(--tw-grey); margin: 0 0 .4em; line-height: 1.25; }
.tw-split-grey h2 span { color: var(--tw-accent); display: block; }
@media (max-width: 767.98px) {
  .tw-split-grey .tw-col-7 { order: 2; padding: 30px 15px; }
  .tw-split-grey h2 { font-size: 30px; font-weight: 400; }
}

/* 5. Open source */
.tw-opensource { padding: 50px 0; color: var(--tw-grey); }
.tw-opensource .tw-opensource__img { padding: 30px; }
.tw-opensource .tw-opensource__text { padding-top: 100px; padding-bottom: 100px; padding-left: 45px; }
.tw-opensource h2 { font-family: var(--tw-font-alt); font-size: 25px; font-weight: 400; color: var(--tw-grey); }
.tw-opensource p { font-size: 25px; font-weight: 300; text-align: justify; line-height: 1.2; }
@media (max-width: 767.98px) {
  .tw-opensource .tw-opensource__text { padding: 20px 15px; }
  .tw-opensource h2 { font-size: 33px; font-weight: 200; }
}

/* 6. Titre "Réalisations" sur fond sombre */
.tw-title-dark { padding: 50px 0; background: var(--tw-dark) url("../images/realisations-bg.jpg") center center / cover no-repeat; background-attachment: fixed; color: #fff; text-align: center; }
.tw-title-dark hr { border: 0; border-top: 1px solid #fff; opacity: 1; margin: 30px 0; }
.tw-title-dark h2 { font-size: 100px; font-weight: 200; letter-spacing: 1px; text-transform: uppercase; margin: 0; color: #fff; line-height: 1.1; }
.tw-title-dark p { font-size: 39px; font-weight: 300; letter-spacing: 1px; text-transform: uppercase; margin: 10px 0 0; }
@media (max-width: 767.98px) { .tw-title-dark h2 { font-size: clamp(32px, 11vw, 50px); letter-spacing: 0; } .tw-title-dark p { font-size: 17px; } }

/* 7. Grille des réalisations (cartes qui se retournent au survol) */
.tw-portfolio { padding: 0; background: var(--tw-dark); }
.tw-cards { display: grid; grid-template-columns: repeat(3, 1fr); }
.tw-card { position: relative; height: 350px; overflow: hidden; background: #000 center center / cover no-repeat; color: #fff; text-align: center; }
.tw-card > img:first-child { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tw-card__back { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 20px; background: rgba(33, 33, 33, .7); opacity: 0; transition: opacity .4s ease; }
.tw-card:hover .tw-card__back, .tw-card:focus-within .tw-card__back, .tw-card.is-flipped .tw-card__back { opacity: 1; }
.tw-card__back h3 { font-size: 25px; font-weight: 400; margin: 0 0 10px; color: #fff; }
.tw-card__back p { font-size: 16px; font-weight: 400; margin: 0 0 1em; line-height: 1.4; }
.tw-card__back img { max-width: 90%; margin-top: 10px; }
@media (max-width: 991.98px) { .tw-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767.98px) { .tw-cards { grid-template-columns: 1fr; } .tw-card { margin-bottom: 10px; } .tw-card.tw-hide-mobile { display: none; } }

/* 8. Joomla */
.tw-joomla { padding: 100px 0 50px; background: #000 url("../images/joomla-bg.jpg") center center / cover no-repeat; background-attachment: fixed; color: #fff; text-align: center; }
.tw-joomla p.tw-joomla__lead { font-family: var(--tw-font-alt); font-size: 40px; font-weight: 300; color: #fff; margin: 0 0 40px; line-height: 1.25; }
.tw-joomla img { display: block; margin: 0 auto; }
@media (max-width: 767.98px) { .tw-joomla { padding: 50px 0; } .tw-joomla p.tw-joomla__lead { font-size: 28px; } }

/* Les mobiles ne gèrent pas bien background-attachment: fixed */
@media (max-width: 1024px), (hover: none) {
  .tw-hero, .tw-title-dark, .tw-joomla { background-attachment: scroll; }
}

/* ---------- Contenu des pages intérieures ---------- */
.tw-main { padding: 50px 0; }
.tw-main__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; }
.tw-main__grid.has-left { grid-template-columns: 280px minmax(0, 1fr); }
.tw-main__grid.has-right { grid-template-columns: minmax(0, 1fr) 280px; }
.tw-main__grid.has-left.has-right { grid-template-columns: 240px minmax(0, 1fr) 240px; }
@media (max-width: 991.98px) {
  .tw-main__grid, .tw-main__grid.has-left, .tw-main__grid.has-right, .tw-main__grid.has-left.has-right { grid-template-columns: minmax(0, 1fr); }
}
.tw-main__content { font-size: 18px; font-weight: 300; }
.tw-card-module { background: #f7f7f7; padding: 20px; margin-bottom: 30px; font-size: 16px; font-weight: 300; }
.tw-card-module__title { font-size: 20px; font-weight: 500; margin-bottom: 15px; }
.mod-breadcrumbs, .breadcrumb { font-size: 14px; font-weight: 300; }
.tw-main .btn-primary { background: var(--tw-accent); border-color: var(--tw-accent); }
.tw-main .btn-primary:hover { filter: brightness(.92); }

/* ---------- Pied de page ---------- */
.tw-footer { background: var(--tw-footer); color: #fff; padding: 25px 0; }
.tw-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.tw-footer p, .tw-footer h6 { margin: 0; font-family: var(--tw-font); font-size: 15px; font-weight: 200; letter-spacing: 1px; color: #fff; }
.tw-footer a { color: #a2a2a2; }
.tw-footer a:hover { color: #fff; }
.tw-footer__right { text-align: right; }
.tw-footer__right img { display: inline-block; }
@media (min-width: 768px) { .tw-footer__right { padding-right: 50px; } }
@media (max-width: 767.98px) {
  .tw-footer__inner { flex-direction: column; text-align: center; }
  .tw-footer__right { text-align: center; }
}

/* ---------- Retour en haut ---------- */
.tw-backtop { position: fixed; right: 20px; bottom: 20px; z-index: 900; width: 42px; height: 42px; border-radius: 50%; background: var(--tw-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.tw-backtop:hover { color: #fff; text-decoration: none; filter: brightness(.92); }

/* ---------- Apparition au défilement ---------- */
.tw-reveal-on .tw-reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s ease, transform .9s ease; }
.tw-reveal-on .tw-reveal.tw-from-left { transform: translateX(-40px); }
.tw-reveal-on .tw-reveal.tw-from-right { transform: translateX(40px); }
.tw-reveal-on .tw-reveal.tw-zoom { transform: scale(.85); }
.tw-reveal-on .tw-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .tw-reveal-on .tw-reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Page d'erreur ---------- */
.tw-error { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; background: var(--tw-dark) url("../images/realisations-bg.jpg") center / cover; color: #fff; padding: 40px 15px; }
.tw-error__code { font-size: 120px; font-weight: 200; line-height: 1; margin: 0; }
.tw-error a.tw-btn { display: inline-block; margin-top: 30px; padding: 12px 30px; background: var(--tw-accent); color: #fff; font-weight: 400; text-decoration: none; }
