/* ==========================================================================
   FaniloU Tech : feuille de style principale
   Mobile-first. Points de rupture : 768px (tablette), 1100px (desktop)
   ========================================================================== */

/* ---------- Variables de marque (relevées sur le logo) ---------- */
:root {
  --navy: #0A1F44;
  --navy-2: #0C2550;
  --cyan: #00C8FF;
  --gold: #FFD700;
  --white: #FFFFFF;
  --grey-bg: #F4F6FA;
  --border: #E6EAF2;
  --text: #3A4760;
  --muted: #5A6782;
  --on-navy: #C9D4E8;
  --on-navy-muted: #8EA0C4;

  --font-head: 'Rajdhani', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --container: 1280px;
  --gutter: 24px;
  /*--section-y: 72px;*/
  --header-h: 64px;
}

@media (min-width: 768px) {
  :root { --gutter: 40px; --section-y: 96px; --header-h: 72px; }
}
@media (min-width: 1100px) {
  :root { --gutter: 64px; /*--section-y: 120px; */}
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

section[id] { scroll-margin-top: var(--header-h); }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section-y) 0; position: relative; }
.section--grey { background: var(--grey-bg); }
.section--navy { background: var(--navy); color: var(--white); overflow: hidden; }

.section-head { text-align: center; margin-bottom: 48px; }
.section-head p { max-width: 620px; margin: 0 auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Lien d'évitement : visible uniquement au clavier */
.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 100;
  background: var(--navy); color: var(--white);
  padding: 12px 18px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Typographie ---------- */
.h1, .h2, .h3 { font-family: var(--font-head); font-weight: 700; margin: 0; }
.h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.05; letter-spacing: -0.01em; }
.h2 { font-size: clamp(28px, 3.6vw, 48px); line-height: 1.1; margin-bottom: 16px; }
.h3 { font-size: 22px; line-height: 1.2; margin-bottom: 12px; }

.lead { font-size: clamp(15.5px, 1.4vw, 19px); line-height: 1.55; color: var(--on-navy); }
.text { font-size: clamp(15px, 1.2vw, 17px); line-height: 1.7; color: var(--text); }
.text-sm { font-size: 14.5px; line-height: 1.6; color: var(--text); }

/* Sur-titres : cyan sur navy, navy + trait cyan sur fond clair (contraste AA) */
.eyebrow {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
}
.eyebrow--light { color: var(--navy); }
.eyebrow--light::before {
  content: "";
  display: inline-block;
  width: 18px; height: 2px;
  background: var(--cyan);
  vertical-align: middle;
  margin-right: 10px;
}

/* ---------- Formes de marque (coins chanfreinés à 45°) ---------- */
.chamfer {
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px),
                     calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}
.chip {
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px),
                     calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px;
  padding: 16px 30px;
  font-family: var(--font-body); font-size: 15px; font-weight: 600; letter-spacing: 0.02em;
  border: none; cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn svg { width: 16px; height: 16px; }
.btn--gold { background: var(--gold); color: var(--navy); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--outline { background: transparent; color: var(--cyan); box-shadow: inset 0 0 0 1.5px var(--cyan); }
/* Le chanfrein couperait la bordure dans les coins : bouton contour à angles droits */
.btn--outline.chamfer { clip-path: none; }
.btn--youtube { background: #FF0000; color: var(--white); border-radius: 6px; }
.btn--youtube svg { width: 22px; height: 22px; }
.btn--small { min-height: 44px; padding: 12px 22px; font-size: 14px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-size: 14px; font-weight: 600; color: var(--navy);
  border-bottom: 1.5px solid var(--cyan); padding-bottom: 3px;
}
.link-arrow--gold { border-bottom-color: var(--gold); }
.link-arrow svg { width: 14px; height: 14px; }

/* ---------- Navigation ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.header__logo img { height: 32px; width: auto; }

.nav-toggle {
  width: 44px; height: 44px;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  background: transparent; border: none; cursor: pointer; padding: 0;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--navy); transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
  position: absolute; top: var(--header-h); left: 0; right: 0;
  display: none; flex-direction: column; gap: 4px;
  padding: 16px var(--gutter) 24px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 24px rgba(10, 31, 68, 0.08);
}
.nav.is-open { display: flex; }
.nav__link { padding: 12px 0; font-size: 16px; font-weight: 500; }
.nav__link.is-active { color: var(--navy); box-shadow: inset 0 -2px 0 var(--cyan); }
.nav .btn { margin-top: 8px; }

@media (min-width: 1100px) {
  .header__logo img { height: 40px; }
  .nav-toggle { display: none; }
  .nav {
    position: static; display: flex; flex-direction: row; align-items: center; gap: 36px;
    padding: 0; border: none; box-shadow: none; background: transparent;
  }
  .nav__link { padding: 6px 0; font-size: 15px; }
  .nav .btn { margin-top: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--white);
  padding: 56px 0 72px;
}
@media (min-width: 768px) { .hero { /*padding: 96px 0 112px;*/ min-height: 620px; } }

.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.5; pointer-events: none; }
.hero__content { position: relative; max-width: 760px; }
.hero .h1 { margin-bottom: 24px; }
.hero .lead { margin: 0 0 40px; max-width: 620px; }
.hero__actions { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 600px) { .hero__actions { flex-direction: row; flex-wrap: wrap; gap: 16px; } }

/* ---------- À propos ---------- */
.about { display: grid; gap: 40px; }
@media (min-width: 900px) { .about { grid-template-columns: 340px 1fr; gap: 80px; align-items: start; } }

.about__visual { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.avatar {
  position: relative;
  width: 160px; height: 160px; border-radius: 50%;
  background: var(--grey-bg); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.avatar svg { width: 56%; height: 56%; }
.avatar__badge {
  position: absolute; bottom: 6px; right: 6px;
  width: 32px; height: 32px; background: var(--cyan);
  display: flex; align-items: center; justify-content: center;
}
.about__logo { width: 140px; display: none; }
@media (min-width: 900px) {
  .avatar { width: 260px; height: 260px; }
  .about__logo { display: block; }
}

.about__text .text { margin: 0 0 20px; max-width: 720px; }
.about__text .h2 { max-width: 720px; margin-bottom: 28px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.chips span {
  background: var(--navy); color: var(--white);
  padding: 10px 18px; font-size: 13px; font-weight: 500; letter-spacing: 0.04em;
}

/* ---------- Offres ---------- */
.offers { display: grid; gap: 24px; }
@media (min-width: 768px) { .offers { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .offers { grid-template-columns: repeat(4, 1fr); } }

.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--border);
  padding: 36px 28px 28px;
}
.card .text-sm { flex: 1; margin: 0 0 20px; }
.card--featured { border: 2px solid var(--gold); box-shadow: 0 10px 30px rgba(10, 31, 68, 0.08); }
/* Le badge dépasse de la carte : on retire le chanfrein de la carte mise en avant */
.card--featured.chamfer { clip-path: none; }
.card__badge {
  position: absolute; top: -14px; left: 28px;
  background: var(--gold); color: var(--navy);
  padding: 6px 14px; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
}
.hex-icon { width: 64px; height: 64px; margin-bottom: 24px; }

/* ---------- Domaines ---------- */
.domains { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 1100px) { .domains { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.domain {
  display: flex; align-items: center; gap: 14px;
  background: var(--grey-bg); padding: 16px 14px;
  font-weight: 600; font-size: 13px; line-height: 1.2;
}
.domain svg { width: 34px; height: 34px; flex-shrink: 0; }
@media (min-width: 768px) {
  .domain { padding: 28px 24px; font-size: 15px; gap: 18px; }
  .domain svg { width: 48px; height: 48px; }
}

/* ---------- Livres ---------- */
.books {
  display: flex; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  margin: 0 calc(-1 * var(--gutter)) 40px;
  padding: 14px var(--gutter) 20px;
}
.books > * { scroll-snap-align: start; flex: 0 0 180px; }
@media (min-width: 1100px) {
  .books { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; overflow: visible; margin: 0 0 48px; padding: 0; }
}
.books__hint { font-size: 14px; color: var(--text); margin: 8px 0 0; }
@media (min-width: 1100px) { .books__hint { display: none; } }

.book {
  position: relative; overflow: hidden;
  aspect-ratio: 2 / 3;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--navy); color: var(--white);
  padding: 22px 18px; border-radius: 4px;
}
.book__lines { position: absolute; top: 38%; right: -10px; width: 140px; height: 140px; opacity: 0.18; }
.book__badge {
  align-self: flex-start;
  background: rgba(0, 200, 255, 0.14); color: var(--cyan);
  padding: 4px 10px; font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
}
.book__title { font-family: var(--font-head); font-weight: 700; font-size: 20px; line-height: 1.1; }
.book__title small { display: block; font-weight: 500; font-size: 13px; color: var(--on-navy); }
.book__rule { width: 40px; height: 1px; background: var(--cyan); margin: 12px 0 8px; }
.book__brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 500; font-size: 11px;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--cyan);
}
.book__brand img { width: 14px; height: 22px; }

.newsletter {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 720px; margin: 0 auto;
  background: var(--white); border: 1px solid var(--border);
  padding: 24px;
}
.newsletter__label { font-family: var(--font-head); font-weight: 600; font-size: 18px; }
.newsletter__note { font-size: 13px; color: var(--muted); margin-top: 4px; }
@media (min-width: 768px) {
  .newsletter { flex-direction: row; align-items: center; gap: 16px; padding: 28px 32px; }
  .newsletter > div { flex: 1; }
  .newsletter .input { flex: 1; }
}

/* ---------- YouTube ---------- */
.section--navy .h2 { color: var(--white); }
.section--navy .section-head p { color: var(--on-navy); font-size: 17px; line-height: 1.6; }
.youtube__lines { position: absolute; top: 40px; right: 40px; width: 180px; height: 180px; opacity: 0.12; }

.videos { display: grid; gap: 28px; margin-bottom: 48px; }
@media (min-width: 768px) { .videos { grid-template-columns: repeat(3, 1fr); } }

.video { display: block; color: var(--white); }
.video__thumb {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy); border: 1px solid rgba(0, 200, 255, 0.2); border-radius: 8px;
}
.video__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.video:hover .video__thumb img { transform: scale(1.04); }
.video__play {
  position: relative; z-index: 2;
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: flex; align-items: center; justify-content: center;
}
.video__duration {
  position: absolute; bottom: 12px; right: 12px; z-index: 2;
  background: rgba(10, 31, 68, 0.9); color: var(--white);
  padding: 4px 8px; font-size: 12px; font-weight: 600; border-radius: 3px;
}
.video__title { font-family: var(--font-head); font-weight: 600; font-size: 19px; line-height: 1.3; margin-top: 16px; }
.video__meta { font-size: 13px; color: var(--on-navy-muted); margin-top: 6px; }
.youtube__cta { text-align: center; }

/* ---------- Pourquoi ---------- */
.why { display: grid; gap: 32px; }
@media (min-width: 768px) { .why { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .why { grid-template-columns: repeat(4, 1fr); } }
.why__icon {
  width: 56px; height: 56px; background: var(--grey-bg);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.why__icon svg { width: 28px; height: 28px; }
.why__title { font-family: var(--font-head); font-weight: 600; font-size: 20px; margin-bottom: 8px; }

/* ---------- Contact ---------- */
.contact { display: grid; gap: 40px; max-width: 1200px; margin: 0 auto; }
@media (min-width: 1000px) { .contact { grid-template-columns: 380px 1fr; gap: 80px; } }

.contact__infos { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
.contact__info { display: flex; align-items: center; gap: 14px; font-size: 14.5px; color: var(--text); }
.contact__info strong { color: var(--navy); }
.contact__info-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--white); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.contact__info-icon svg { width: 18px; height: 18px; }

.form-card { background: var(--white); border: 1px solid var(--border); padding: 28px 20px; }
@media (min-width: 768px) { .form-card { padding: 40px; } }

.form { display: grid; gap: 18px; }
@media (min-width: 768px) {
  .form { grid-template-columns: 1fr 1fr; gap: 20px; }
  .form .field--full { grid-column: 1 / -1; }
}
.field label { display: block; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 8px; }

.input, .select, .textarea {
  width: 100%; min-height: 48px;
  padding: 13px 16px;
  font-family: inherit; font-size: 14.5px; color: var(--navy);
  background: var(--white); border: 1px solid #C8CFDC; border-radius: 4px;
}
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--cyan); outline-offset: 0; border-color: var(--cyan); }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%230A1F44' stroke-width='2' fill='none'/></svg>");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 40px;
}
.textarea { resize: vertical; min-height: 130px; }
.newsletter .input { background: var(--grey-bg); }

.consent { display: flex; align-items: flex-start; gap: 12px; font-size: 13px; line-height: 1.5; color: var(--text); }
.consent input { margin-top: 2px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--navy); }
.consent a { text-decoration: underline; }

.form__footer { display: flex; flex-direction: column-reverse; gap: 14px; align-items: stretch; text-align: center; }
.form__note { font-size: 13px; color: var(--muted); }
@media (min-width: 768px) {
  .form__footer { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
}

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: var(--on-navy); padding: 56px 0 32px; }
.footer__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 24px; margin-bottom: 40px; }
.footer__brand { grid-column: 1 / -1; }
@media (min-width: 1000px) {
  .footer { padding: 72px 0 40px; }
  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 60px; }
  .footer__brand { grid-column: auto; }
}
.footer__logo { height: 40px; width: auto; margin-bottom: 18px; }
.footer__tagline { font-size: 14.5px; line-height: 1.6; color: var(--on-navy-muted); margin: 0 0 24px; max-width: 360px; }
.footer__col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer__col .eyebrow { margin-bottom: 6px; }
.footer__col a:hover { color: var(--white); }

.socials { display: flex; gap: 12px; }
.socials a {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 200, 255, 0.08); border: 1px solid rgba(0, 200, 255, 0.25);
}
.socials a:hover { background: rgba(0, 200, 255, 0.18); }
.socials svg { width: 17px; height: 17px; }

.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px;
  border-top: 1px solid rgba(0, 200, 255, 0.15); padding-top: 24px;
  font-size: 13px; color: var(--on-navy-muted);
}

/* ---------- Pages simples (merci, mentions légales, confidentialité) ---------- */
.page { padding: var(--section-y) 0; min-height: 60vh; }
.page .container { max-width: 860px; }
.page h2 { font-family: var(--font-head); font-size: 24px; margin: 36px 0 12px; }
.page p, .page li { font-size: 15.5px; line-height: 1.7; color: var(--text); }

/* ---------- Réduction du padding-top sur les sections principales ---------- */
#apropos, #offres, #livres, #youtube, #contact { padding-top: 20px; }
@media (min-width: 768px) {
  #apropos, #offres, #livres, #youtube, #contact { padding-top: 26px; }
}

/* ---------- Apparition au défilement (activée seulement si JS est présent) ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .video__thumb img, .nav-toggle span { transition: none; }
}
