/*
 * PyTech.be Custom Styles
 * Bootstrap 5 based with local fonts
 */

/* ============================================
   FONT DECLARATIONS
   ============================================ */

/* Brand fonts (owner-approved design, 2026-11-17): Poppins for headings, the
   logo's typeface; Inter for body text. Both OFL, licences next to the files.
   WOFF2 subset to Latin + Latin Extended-A, punctuation and € (fonttools
   pyftsubset, 2026-11-25): ~50 KB per Inter weight instead of ~200 KB TTF.
   Inter Regular and Poppins Bold are preloaded in base_layout.html. */
@font-face { font-family: 'Poppins'; src: url("../fonts/poppins/Poppins-Regular.aafd75830625.woff2") format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url("../fonts/poppins/Poppins-Bold.b4c12bc4d1e2.woff2") format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url("../fonts/inter/Inter-Regular.64f8acdecc3b.woff2") format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url("../fonts/inter/Inter-SemiBold.dabd8c2607be.woff2") format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url("../fonts/inter/Inter-Bold.8186cd1e294b.woff2") format('woff2'); font-weight: 700; font-display: swap; }

/* ============================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================ */

:root {
    /* Brand Colors */
    --color-primary: #106C9C;  /* the logo blue */
    --color-primary-dark: #0B4F72;
    --color-primary-light: #47A3D0;  /* charter light blue */

    /* Light Mode Colors */
    --color-bg-light: #f5f6f8;
    --color-bg-white: #ffffff;
    --color-text-dark: #111418;
    --color-text-muted: #5b677a;  /* 5.3:1 on --color-bg-light (WCAG AA); was #64748b, 4.4:1 */
    --color-border-light: #e5e7eb;
    --color-card-light: #ffffff;

    /* Dark Mode Colors */
    --color-bg-dark: #101622;
    --color-bg-darker: #0b0f17;
    --color-card-dark: #192234;
    --color-border-dark: #232f48;
    --color-text-light: #ffffff;
    --color-text-muted-dark: #94a3b8;

    /* Semantic Colors */
    --color-success: #27c93f;
    --color-warning: #ffbd2e;
    --color-danger: #ff5f56;
    --color-info: #4080ff;

    /* Typography */
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Courier New', Consolas, Monaco, monospace;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 200ms ease-in-out;
    --transition-slow: 300ms ease-in-out;
}

/* ============================================
   BASE STYLES
   ============================================ */

body {
    font-family: var(--font-display);
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    transition: background-color var(--transition-base), color var(--transition-base);
    overflow-x: hidden;
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Container Max Width and Centering */
.container {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Primary Color Utilities */
.text-primary {
    color: var(--color-primary) !important;
}

.bg-primary {
    background-color: var(--color-primary) !important;
}

.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

/* Dark Mode Card */
.dark-mode .card-dark {
    background-color: var(--color-card-dark);
    border-color: var(--color-border-dark);
}

.dark-mode .bg-white {
    background-color: var(--color-bg-darker) !important;
}

/* Text Utilities */
.text-muted {
    color: var(--color-text-muted) !important;
}

.dark-mode .text-muted {
    color: var(--color-text-muted-dark) !important;
}

/* ============================================
   COMPONENT STYLES
   ============================================ */

/* Header / Navigation */
.navbar-sticky {
    position: sticky;
    top: 0;
    z-index: 1030;
    background-color: rgba(242, 242, 242, 0.95);  /* 5% gray (95% white) */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(217, 217, 217, 1);  /* 15% gray */
    transition: all var(--transition-base);
}

.dark-mode .navbar-sticky {
    background-color: rgba(16, 22, 34, 0.9);
    border-bottom-color: var(--color-border-dark);
}

/* Dark Mode Navigation Text */
.dark-mode .navbar-sticky .navbar-brand,
.dark-mode .navbar-sticky .nav-link {
    color: white !important;
}

.dark-mode .navbar-sticky .nav-link:hover {
    color: var(--color-primary) !important;
}

/* Hero Section */
.hero-section {
    padding: 5rem 0;
    min-height: 600px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.6;
    max-width: 600px;
}

/* Feature Cards */
.feature-card {
    padding: 2rem;
    border-radius: var(--radius-2xl);
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border-light);
    transition: all var(--transition-base);
}

.feature-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.dark-mode .feature-card {
    background-color: var(--color-card-dark);
    border-color: var(--color-border-dark);
}

.feature-card .icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background-color: rgba(15, 90, 240, 0.1);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: transform var(--transition-base);
}

.feature-card:hover .icon-wrapper {
    transform: scale(1.1);
}

/* Code Display */
.code-display {
    border-radius: var(--radius-xl);
    overflow: hidden;
    background-color: #0d1117;
    border: 1px solid #30363d;
    box-shadow: var(--shadow-2xl);
}

.code-display-header {
    background-color: #161b22;
    border-bottom: 1px solid #30363d;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-display-dots {
    display: flex;
    gap: 0.5rem;
}

.code-display-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-display-content {
    padding: 1.5rem;
    overflow-x: auto;
}

.code-display pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    color: #c9d1d9;
}

/* Testimonial Cards */
.testimonial-card {
    padding: 2rem;
    text-align: center;
}

.testimonial-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-quote {
    font-style: italic;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.dark-mode .testimonial-quote {
    color: var(--color-text-muted-dark);
}

/* CTA Section */
.cta-section {
    background-color: var(--color-primary);
    position: relative;
    overflow: hidden;
    padding: 5rem 0;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.1;
    background-image: radial-gradient(circle at 2px 2px, white 1px, transparent 0);
    background-size: 32px 32px;
}

.cta-section .container {
    position: relative;
    z-index: 10;
}

/* Footer */
.site-footer {
    background-color: var(--color-bg-darker);
    color: white;
    padding-top: 4rem;
    padding-bottom: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.site-footer a {
    color: var(--color-text-muted-dark);
    text-decoration: none;
    transition: color var(--transition-base);
}

.site-footer a:hover {
    color: white;
}

/* Badge */
.badge-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
    background-color: rgba(15, 90, 240, 0.1);
    border: 1px solid rgba(15, 90, 240, 0.2);
    border-radius: var(--radius-full);
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
        text-align: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth Transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-duration: var(--transition-base);
    transition-timing-function: ease-in-out;
}

button, a, .btn {
    transition-property: all;
    transition-duration: var(--transition-base);
}

/* Brand (2026-11-17): headings in Poppins, logo sizes, footer in deep logo blue. */
h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--font-heading);
}
.brand-logo { width: 48px; height: 48px; }
.site-footer .brand-logo { width: 64px; height: 64px; }
.site-footer { background-color: var(--color-primary-dark); }
.site-footer .text-muted { color: #d4e8f2 !important; }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--color-primary); }

/* French home (frame 01): hero, badge, icon tiles, eyebrow, CTA band. */
.brand-hero { background: linear-gradient(180deg, var(--color-bg-white) 0%, #EDEDED 100%); }
[data-bs-theme="dark"] .brand-hero { background: linear-gradient(180deg, var(--color-bg-dark) 0%, var(--color-bg-darker) 100%); }
.brand-badge { padding: .35rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
    color: var(--color-primary); background: rgba(71, 163, 208, .15); border: 1px solid rgba(16, 108, 156, .25); }
.brand-icon-tile { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; font-size: 1.4rem;
    color: var(--color-primary); background: rgba(71, 163, 208, .15); }
.brand-eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--color-primary); }  /* light blue #47A3D0 was 2.6:1 on the light background */
.dark-mode .brand-eyebrow { color: var(--color-primary-light); }
.brand-cta { background-color: var(--color-primary); }
.brand-cta .lead { color: rgba(255, 255, 255, .88) !important; }
.brand-cta .btn-light { color: var(--color-primary); }


/* Breadcrumbs (menus/breadcrumb.html and the app pages' own): small, muted, brand-blue links */
.breadcrumb {
    --bs-breadcrumb-divider: "›";
    --bs-breadcrumb-divider-color: var(--color-text-muted);
    --bs-breadcrumb-item-active-color: var(--color-text-dark);
    --bs-breadcrumb-margin-bottom: var(--spacing-lg);
    font-size: 0.875rem;
}
.breadcrumb-item a { color: var(--color-primary); text-decoration: none; }
.breadcrumb-item a:hover, .breadcrumb-item a:focus-visible { color: var(--color-primary-dark); text-decoration: underline; }
.breadcrumb-item.active { font-weight: 500; }
.dark-mode .breadcrumb {
    --bs-breadcrumb-divider-color: var(--color-text-muted-dark);
    --bs-breadcrumb-item-active-color: var(--color-text-light);
}
.dark-mode .breadcrumb-item a { color: var(--color-primary-light); }

/* Réalisations (djangocms-stories list): category filter and cards */
.pt-story-filter .nav-link { color: var(--color-primary); border: 1px solid var(--color-border-light); }
.pt-story-filter .nav-link.active { background-color: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.pt-story-card { transition: border-color .2s, box-shadow .2s, transform .2s; }
.pt-story-card:hover { border-color: var(--color-primary-light) !important; box-shadow: 0 .5rem 1.5rem rgba(16, 108, 156, .12); transform: translateY(-2px); }
.pt-story-badge { background-color: rgba(16, 108, 156, .1); color: var(--color-primary); font-weight: 500; }
.pt-story-more { color: var(--color-primary); font-weight: 500; }
.dark-mode .pt-story-card { background-color: var(--color-card-dark); border-color: var(--color-border-dark) !important; }
.dark-mode .pt-story-badge, .dark-mode .pt-story-more, .dark-mode .pt-story-filter .nav-link:not(.active) { color: var(--color-primary-light); }

/* Outlined buttons in the logo blue (Bootstrap's default outline is its own blue) */
.btn-outline-primary {
    --bs-btn-color: var(--color-primary);
    --bs-btn-border-color: var(--color-primary);
    --bs-btn-hover-bg: var(--color-primary);
    --bs-btn-hover-border-color: var(--color-primary);
    --bs-btn-active-bg: var(--color-primary-dark);
    --bs-btn-active-border-color: var(--color-primary-dark);
}
.dark-mode .btn-outline-primary { --bs-btn-color: var(--color-primary-light); --bs-btn-border-color: var(--color-primary-light); }

/* Footer newsletter form (form builder, alias "footer-newsletter"): footer-sized text */
.site-footer .djangocms-form-builder-ajax-form .form-label { font-size: .875rem; margin-bottom: .25rem; }
.site-footer .djangocms-form-builder-ajax-form .form-control { font-size: .875rem; padding: .375rem .75rem; }
.site-footer .djangocms-form-builder-ajax-form .form-check-label { font-size: .8125rem; opacity: .85; }
.site-footer .djangocms-form-builder-ajax-form .btn { font-size: .875rem; padding: .375rem 1rem; }

/* Header logo: larger on desktop, on the bar's centre line with the menu (no brand padding) */
.navbar-sticky .navbar-brand { padding-block: 0; margin-block: 0; line-height: 0; }
.navbar-sticky .brand-logo { width: 60px; height: 60px; }
@media (max-width: 991.98px) { .navbar-sticky .brand-logo { width: 48px; height: 48px; } }
.navbar-sticky .navbar { padding-block: .75rem; }

/* Screenshot zoom (static/js/pytech-zoom.js) */
.pt-zoomable { cursor: zoom-in; }
.pt-zoom-open { overflow: hidden; }
.pt-zoom {
    position: fixed; inset: 0; z-index: 2000; cursor: zoom-out;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
    padding: 3rem 1.5rem; background: rgba(11, 15, 23, .94);
}
.pt-zoom img { max-width: min(96vw, 1800px); max-height: 82vh; border-radius: .5rem; box-shadow: 0 1rem 3rem rgba(0, 0, 0, .5); background: #fff; }
.pt-zoom-caption { color: #e5e7eb; font-size: .95rem; margin: 0; text-align: center; max-width: 60rem; }
.pt-zoom-close {
    position: absolute; top: 1rem; right: 1.25rem; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .12); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer;
}
.pt-zoom-close:hover, .pt-zoom-close:focus-visible { background: rgba(255, 255, 255, .25); }

/* Screenshot carousel (djangocms-frontend Carousel, class pt-carousel): caption and dots under the
   picture, so nothing covers the screen; dark round arrows that show on light screenshots. */
.pt-carousel { display: flex; flex-direction: column; }
.pt-carousel .carousel-inner { order: 1; border: 1px solid var(--color-border-light); border-radius: .75rem; background: #fff; }
.pt-carousel .carousel-item img { display: block; width: 100%; height: auto; }
.pt-carousel .carousel-caption {
    position: static; display: block !important; padding: .75rem 1rem 0; color: var(--color-text-muted);
    text-align: center; font-size: .95rem;
}
.pt-carousel .carousel-caption p { margin: 0; }
.pt-carousel .carousel-indicators { order: 2; position: static; margin: .75rem 0 0; }
.pt-carousel .carousel-indicators [data-bs-target] { background-color: var(--color-primary); width: 10px; height: 10px; border-radius: 50%; border: 0; }
.pt-carousel .carousel-control-prev, .pt-carousel .carousel-control-next { width: 3.5rem; height: 3.5rem; top: 40%; opacity: .9; }
.pt-carousel .carousel-control-prev-icon, .pt-carousel .carousel-control-next-icon {
    background-color: var(--color-primary); border-radius: 50%; background-size: 55%; width: 2.75rem; height: 2.75rem;
}
.dark-mode .pt-carousel .carousel-inner { border-color: var(--color-border-dark); }
.dark-mode .pt-carousel .carousel-caption { color: #4b5869; }  /* the caption sits on the white carousel box in both modes */

/* Home technology line (build_fr_home.stack_html): logos in their own colours, name below,
   each links to its Technologies article. Dark mode: a light tile keeps the dark marks visible. */
.brand-stack { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 1.25rem 2rem; font-size: .875rem; }
.brand-stack-item { display: inline-flex; flex-direction: column; align-items: center; gap: .5rem; min-width: 4.5rem; color: var(--color-text-muted); text-decoration: none; }
.brand-stack-item img { height: 40px; width: auto; max-width: 88px; transition: transform .2s; }
.brand-stack-item:hover, .brand-stack-item:focus-visible { color: var(--color-primary); }
.brand-stack-item:hover img, .brand-stack-item:focus-visible img { transform: translateY(-2px) scale(1.06); }
.dark-mode .brand-stack-item { color: var(--color-text-muted-dark); }
.brand-stack-item img.brand-stack-wide { height: 28px; max-width: none; margin-block: 6px; }
.dark-mode .brand-stack-item img { background: #fff; border-radius: .5rem; padding: 4px; height: 48px; }
.dark-mode .brand-stack-item img.brand-stack-wide { height: 36px; }
@media (prefers-reduced-motion: reduce) { .brand-stack-item img { transition: none; } .brand-stack-item:hover img { transform: none; } }

/* ============================================
   TEXT CONTRAST (WCAG AA, 4.5:1), checked with axe-core on every page, light and dark (2026-11-18)
   ============================================ */
/* Links: the logo blue instead of Bootstrap's #0d6efd (4.2:1 on the page background) */
:root, [data-bs-theme=light] {
    --bs-link-color: #106C9C; --bs-link-color-rgb: 16, 108, 156;
    --bs-link-hover-color: #0B4F72; --bs-link-hover-color-rgb: 11, 79, 114;
}
[data-bs-theme=dark], html.dark-mode {
    --bs-link-color: #7fc1e6; --bs-link-color-rgb: 127, 193, 230;
    --bs-link-hover-color: #a9d6f0; --bs-link-hover-color-rgb: 169, 214, 240;
}
/* Booking calendar (django-appointment, FullCalendar): it stays light in both modes */
body .fc .fc-daygrid-day-number { color: #5c5668; }
/* Past or unavailable days: a grey cell instead of opacity .5 (which made the number 2.2:1) */
body .fc .disabled-day { opacity: 1; background-color: #eceaef; }
body .fc .disabled-day .fc-daygrid-day-number { color: #625c70; }
body .djangoAppt_no-availability-text { color: #b00020; }

/* Image container (djangocms-frontend Container with a background image; was
   css/background_image.css, a separate render-blocking request) */

div.imagecontainer {
    position: relative;
    min-height: 112px;
}

div.imagecontainer > div.cover,
div.imagecontainer > div.image {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
}

div.imagecontainer > div.content {
    position: relative;
}
