/* ═══════════════════════════════════════════════════════════════
   aleph99 — custom.css
   Loaded on top of GeneratePress (child theme)
   ═══════════════════════════════════════════════════════════════ */

/* ── Design tokens ────────────────────────────────────────────── */
:root {
  --a99-blue:        #4169a9;
  --a99-blue-dark:   #2d4a7a;
  --a99-blue-light:  #5580bc;
  --a99-blue-pale:   #e8f0f9;
  --a99-teal:        #077b70;
  --a99-red:         #e14130;;
  --a99-red-dark:    #922b21;
  --a99-orange:      #af4d0d;
  --a99-text:        #1a1a2e;
  --a99-gray:        #6b7280;
  --a99-gray-bg:     #f5f7fa;
  --a99-white:       #ffffff;
  --a99-radius:      10px;
  --a99-shadow:      0 4px 24px rgba(28,81,147,.12);
}

/* ── GeneratePress global overrides ───────────────────────────── */
/* Typography (font size, line-height, colors, heading weights) is set
   via Appearance → Customize → Additional CSS to ensure correct cascade. */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--a99-gray);
  background-color: var(--a99-white);
}

/* Standard paragraphs in page/post content */
.entry-content p {
  text-align: justify;
}

/* Reduce GP's default 1.5em block spacing */
.entry-content > [class*="wp-block-"]:not(:last-child):not(.wp-block-heading) {
  margin-bottom: 0.8em !important;
}

/* ── Front page: remove the white article card & its padding ──── */
.home .inside-article,
.home .separate-containers .inside-article {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Remove top margin/padding between nav and first block */
.home .entry-content {
  margin: 0 !important;
  padding: 0 !important;
}

/* alignfull blocks: break out of any remaining container constraints */
.home .entry-content .alignfull,
.home .entry-content .wp-block-group.alignfull {
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  max-width: 100vw !important;
  width: 100vw !important;
}

/* ── Remove "Construit avec GeneratePress" footer credit ─────── */
/* Handled via generate_credits filter in functions.php */
.copyright-bar {
    display: none;
}


/* ── Navigation ───────────────────────────────────────────────── */
/* Header bg set to #4169a9 via GP Customizer — nav text must be white */
.main-navigation {
  background-color: #4169a9 !important;
}

.main-navigation .main-nav ul li a,
.main-navigation .menu > li > a,
.main-navigation .menu-toggle,
.main-navigation .menu-bar-items {
  color: rgba(255,255,255,.88) !important;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li:focus > a,
.main-navigation .main-nav ul li[class*="current-menu-"] > a,
.main-navigation .menu > li > a:hover {
  color: #fff !important;
  background-color: rgba(0,0,0,.12) !important;
}
/* Dropdown sub-menus */
.main-navigation ul ul {
  background-color: var(--a99-blue-dark) !important;
}
.main-navigation .main-nav ul ul li a {
  color: rgba(255,255,255,.85) !important;
}
.main-navigation .main-nav ul ul li:hover > a {
  color: #fff !important;
  background-color: rgba(0,0,0,.15) !important;
}
.site-header {
  background: #4169a9;
  padding: 0;
}
.site-branding .site-title a,
.site-branding .site-title a:hover {
  color: #fff !important;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -.02em;
}

/* ── Hero block (.aleph99-hero) ────────────────────────────────── */
/* Starts darker than the #4169a9 header so the two sections are visually distinct */
.aleph99-hero {
  background: linear-gradient(160deg, #2d4a7a 0%, #1a2f52 100%);
  color: #fff;
  padding: 20px 24px 20px;
  text-align: center;
  border-top: 3px solid rgba(255,255,255,.15);
}
.aleph99-hero h1,
.aleph99-hero .wp-block-heading {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -.025em;
  color: #fff;
  margin-bottom: 18px;
  line-height: 1.2;
}
.aleph99-hero p {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  opacity: .88;
  max-width: 680px;
  margin: 0 auto 36px;
  color: #fff;
}
.aleph99-hero .wp-block-buttons {
  justify-content: center;
}
.aleph99-hero .wp-block-button__link {
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 28px;
  transition: transform .2s, box-shadow .2s;
}
.aleph99-hero .wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
}
.aleph99-hero .is-style-outline .wp-block-button__link {
  color: #fff;
  border-color: rgba(255,255,255,.6);
  background: transparent;
}
.aleph99-hero .is-style-outline .wp-block-button__link:hover {
  background: rgba(255,255,255,.1);
}

/* ── Stat bar (.aleph99-stat-bar) ─────────────────────────────── */
.aleph99-stat-bar {
  background: var(--a99-blue);
  padding: 28px 24px;
}
.aleph99-stat-bar .wp-block-columns {
  gap: 0;
  margin: 0;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
.aleph99-stat-bar .wp-block-column {
  text-align: center;
  color: #fff;
  border-right: 1px solid rgba(255,255,255,.15);
  padding: 8px 12px;
}
.aleph99-stat-bar .wp-block-column:last-child {
  border-right: none;
}
.aleph99-stat-bar strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
}
.aleph99-stat-bar p {
  font-size: 12px;
  opacity: .8;
  color: #fff;
  margin: 4px 0 0;
}

/* ── Section label + title pattern ───────────────────────────── */
.aleph99-section {
  padding: 20px 20px;
}
.aleph99-section-alt {
  padding: 72px 24px;
  background: var(--a99-gray-bg);
}
.aleph99-section h2,
.aleph99-section-alt h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 12px;
}

/* ── Product cards wrapper ───────────────────────────────────── */
.aleph99-cards-section {
  padding: 20px;
  box-sizing: border-box;
}
.aleph99-cards-row {
  display: flex;
  flex-direction: row;
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
  align-items: stretch;
}
@media (max-width: 768px) {
  .aleph99-cards-row { flex-direction: column; }
}

/* ── Product cards (.aleph99-card-red / .aleph99-card-blue) ──── */
.aleph99-card-red,
.aleph99-card-blue {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-radius: var(--a99-radius);
  padding: 32px 28px;
  color: #fff;
}
.aleph99-card-red  { background: var(--a99-red); }
.aleph99-card-blue { background: var(--a99-blue); }

.aleph99-card-red h3,
.aleph99-card-blue h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.25);
}
.aleph99-card-red ul,
.aleph99-card-blue ul {
  padding-left: 18px;
  margin-bottom: 24px;
  color: rgba(255,255,255,.9);
  line-height: 1.8;
  font-size: 1.1rem;
  margin-left: 1rem;
}
.aleph99-card-red  .aleph99-btn,
.aleph99-card-blue .aleph99-btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s, background .2s;
  margin-top: auto;       /* pushes button to bottom of card */
  align-self: flex-start; /* don't stretch full width */
}
.aleph99-card-red  .aleph99-btn { background: #fff; color: var(--a99-red); }
.aleph99-card-blue .aleph99-btn { background: #fff; color: var(--a99-blue); }
.aleph99-card-red  .aleph99-btn:hover,
.aleph99-card-blue .aleph99-btn:hover { transform: translateY(-2px); }

/* ── ENT / GAR strip ──────────────────────────────────────────── */
.aleph99-gar {
  background: var(--a99-blue-pale);
  padding: 32px 40px;
}
.aleph99-gar-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}
.aleph99-gar p {
  flex: 1;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--a99-text);
  text-align: left;
}
.aleph99-gar-logo {
  flex-shrink: 0;
  width: 200px;
  height: auto;
  display: block;
}
@media (max-width: 600px) {
  .aleph99-gar-inner { flex-direction: column; align-items: center; gap: 20px; }
  .aleph99-gar p { text-align: center; }
  .aleph99-gar-logo { width: 130px; }
}

/* ── CTA banner (.aleph99-cta) ────────────────────────────────── */
.aleph99-cta {
  background: linear-gradient(135deg, var(--a99-blue) 0%, var(--a99-blue-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 72px 24px;
}
.aleph99-cta h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}
.aleph99-cta p { color: rgba(255,255,255,.88); max-width: 560px; margin: 0 auto 28px; }
.aleph99-cta .wp-block-buttons { justify-content: center; }
.aleph99-cta .wp-block-button__link {
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 11px 24px;
  transition: transform .2s;
}
.aleph99-cta .wp-block-button__link:hover { transform: translateY(-2px); }
.aleph99-cta .is-style-outline .wp-block-button__link {
  color: #fff;
  border-color: rgba(255,255,255,.5);
  background: transparent;
}

/* ── Demo/brochure strip ──────────────────────────────────────── */
.aleph99-strip {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 22px 24px;
  text-align: left;
  font-size: 1.1rem;
  color: var(--a99-text);
}
.aleph99-strip a {
  color: var(--a99-blue-light);
  font-weight: 600;
  text-decoration: none;
}
.aleph99-strip a:hover { text-decoration: underline; }

/* ── Hide page title on front page ───────────────────────────── */
.home .entry-header,
.home .page-header,
.home .entry-title,
.front-page .entry-header,
.page-id-home .entry-header {
  display: none;
}

/* ── Footer ───────────────────────────────────────────────────── */
.footer-widgets,
.site-footer {
  background-color: var(--a99-blue-dark) !important;
}
.site-info,
.copyright-bar {
  display: none !important;
}
.footer-widget-1 .widget.inner-padding,
.footer-widget-2 .widget.inner-padding {
  padding: 20px 24px !important;
}

/* Widget 1 — copyright + legal */
.aleph99-footer-copy {
  display: block;
  color: rgba(255,255,255,.9);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.aleph99-footer-legal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.aleph99-footer-legal a {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: 1rem;
}
.aleph99-footer-legal a:hover { color: #fff; text-decoration: underline; }
.aleph99-footer-sep {
  color: rgba(255,255,255,.3);
}

/* Widget 2 — email + social */
.aleph99-footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  text-align: right;
}
.aleph99-footer-right .aleph99-footer-social {
  justify-content: flex-end;
}
.aleph99-footer-mail {
  color: rgba(255,255,255,.8) !important;
  text-decoration: none !important;
  font-size: 1.1rem;
}
.aleph99-footer-mail:hover { color: #fff !important; }
.aleph99-footer-social {
  display: flex;
  align-items: center;
  gap: 14px;
}
.aleph99-footer-social a img {
  display: block !important;
  width: auto !important;
  height: 26px !important;
  max-width: none !important;
  object-fit: contain !important;
  opacity: .75;
  transition: opacity .2s;
}
.aleph99-footer-social a:hover img { opacity: 1 !important; }

/* ── Cartothèque page ─────────────────────────────────────────── */

/* Section wrappers — add class in Gutenberg Group block Inspector */
.a99-carto-section {
  padding: 10px 10px;
}
.a99-carto-section-alt {
  padding: 10px 10px;
  background-color: var(--a99-gray-bg);
}
/* Constrain inner content width */
.a99-carto-section > *,
.a99-carto-section-alt > * {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
/* Heading spacing inside sections */
.a99-carto-section h2,
.a99-carto-section-alt h2 {
  margin-top: 0;
  margin-bottom: 16px;
}
.a99-carto-section h3,
.a99-carto-section-alt h3 {
  margin-top: 40px;
  margin-bottom: 10px;
}
/* Separator inside sections — hide the HRs that were section dividers */
.a99-carto-section + .a99-carto-section-alt > .wp-block-separator,
.a99-carto-section-alt + .a99-carto-section > .wp-block-separator {
  display: none;
}

/* Images — rounded corners + shadow */
.entry-content .wp-block-image img {
  border-radius: 10px;
  box-shadow: 0 6px 28px rgba(28, 81, 147, .13);
  transition: transform .25s ease, box-shadow .25s ease;
}
.entry-content .wp-block-image:hover img {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(28, 81, 147, .2);
}
/* Float images get a small margin clearance so text doesn't crowd */
.entry-content .wp-block-image.alignright {
  margin-left: 32px;
  margin-bottom: 24px;
}
.entry-content .wp-block-image.alignleft {
  margin-right: 32px;
  margin-bottom: 24px;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .aleph99-hero { padding: 64px 20px 56px; }
  .aleph99-stat-bar .wp-block-column { border-right: none; border-bottom: 1px solid rgba(255,255,255,.15); }
  .aleph99-section, .aleph99-section-alt { padding: 52px 20px; }
  .aleph99-cards-row .wp-block-columns { flex-direction: column; }
  .a99-carto-section,
  .a99-carto-section-alt { padding: 48px 20px; }
  .entry-content .wp-block-image.alignright,
  .entry-content .wp-block-image.alignleft {
    float: none;
    margin: 0 auto 24px;
    text-align: center;
  }
}
