/* ============================================
   absley.dev — Développeur Web
   Design professionnel, 100% responsive
   ============================================ */

:root {
    --color-primary: #1a365d;
    --color-primary-light: #2c5282;
    --color-accent: #2b6cb0;
    --color-text: #2d3748;
    --color-text-light: #4a5568;
    --color-bg: #ffffff;
    --color-bg-alt: #f7fafc;
    --color-bg-dark: #edf2f7;
    --color-border: #e2e8f0;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.25s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--color-text);
    background-color: var(--color-bg);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* État initial pour animations GSAP (hero) */
.gsap-hero {
    opacity: 0;
    transform: translateY(28px);
}

/* État initial pour révélations au scroll */
.reveal {
    opacity: 0;
    transform: translateY(42px);
}

/* ---- Navigation ---- */
.navbar {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: padding 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.45rem;
    letter-spacing: 0.03em;
    color: var(--color-primary) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text-light) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link:focus {
    color: var(--color-primary) !important;
    background: var(--color-bg-dark);
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        display: none;
    }
    .nav-link {
        padding: 0.6rem 0 !important;
    }
}

/* ---- Menu fullscreen staggered (style React Bits) ---- */
.staggered-menu {
    position: fixed;
    inset: 0;
    z-index: 9999;
    visibility: hidden;
    pointer-events: none;
}

.staggered-menu.is-open {
    visibility: visible;
    pointer-events: auto;
}

.staggered-menu__backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.staggered-menu.is-open .staggered-menu__backdrop {
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}

.staggered-menu__layer {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    transform: translate3d(100%, 0, 0);
    will-change: transform;
}

/* Couches du menu : palette du site (bleu marine → bleu → bleu clair) */
.staggered-menu__layer--1 {
    background: var(--color-primary);
    z-index: 1;
}

.staggered-menu__layer--2 {
    background: var(--color-primary-light);
    z-index: 2;
}

.staggered-menu__layer--3 {
    background: var(--color-accent);
    z-index: 3;
}

.staggered-menu__layer--4 {
    background: #e6f0fa;
    z-index: 4;
}

.staggered-menu__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100%;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: var(--color-bg);
    transform: translate3d(100%, 0, 0);
    will-change: transform;
    z-index: 5;
}

.staggered-menu__close {
    background: none;
    border: none;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    padding: 0.5rem 0;
    margin-bottom: 3rem;
    transition: color 0.2s ease;
}

.staggered-menu__close:hover {
    color: var(--color-accent);
}

.staggered-menu__nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.staggered-menu__link {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
    padding: 0.35rem 0;
    transition: color 0.2s ease;
    opacity: 0;
}

.staggered-menu.is-open .staggered-menu__link {
    opacity: 1;
}

.staggered-menu__link:hover {
    color: var(--color-accent);
}

/* ---- Hero ---- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, #e6f0fa 50%, var(--color-bg) 100%);
    background-image: url("../img/pic1.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* Overlay noir à faible opacité */
.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

/* Texte du hero en blanc (sur overlay noir) */
.hero-label {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.75rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.35rem, 5.5vw, 3.6rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 1.25rem;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    max-width: 520px;
    margin-bottom: 2rem;
}

/* Bouton hero : couleurs inversées (fond blanc, texte bleu) */
.hero .btn-cta {
    background: #fff;
    color: var(--color-primary);
}

.hero .btn-cta:hover {
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-primary-light);
    transform: translateY(-1px);
}

.btn-cta {
    padding: 0.85rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius);
    background: var(--color-primary);
    border: none;
    transition: background var(--transition), color var(--transition), transform 0.2s ease;
}

.btn-cta:hover {
    background: var(--color-primary-light);
    transform: translateY(-1px);
}

.btn-cta:active {
    transform: translateY(0);
}

@media (max-width: 991.98px) {
    .hero {
        padding-top: 100px;
        min-height: auto;
        padding-bottom: 4rem;
    }
    .hero-title {
        font-size: 2rem;
    }
}

/* ---- Sections communes ---- */
.section {
    padding: 5rem 0;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 4vw, 2.4rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.section-text {
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.section-intro {
    max-width: 600px;
    color: var(--color-text-light);
    margin-bottom: 2.5rem;
}

/* ---- Présentation ---- */
.section-presentation {
    background: var(--color-bg);
}

.section-presentation .lead {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--color-text);
}

/* ---- Formation ---- */
.section-formation {
    background: var(--color-bg-alt);
}

.card-formation {
    background: var(--color-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    height: 100%;
    transition: box-shadow var(--transition), border-color var(--transition);
    text-align: center;
}

.card-formation:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(43, 108, 176, 0.2);
}

.card-formation-icon {
    width: 48px;
    height: 48px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-diploma::after,
.icon-dev::after {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23fff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 14l9-5-9-5-9 5 9 5z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 14l6.16-3.422a12.083 12.083 0 01.665 6.479A11.952 11.952 0 0012 20.055a11.952 11.952 0 00-6.824-2.998 12.078 12.078 0 01.665-6.479L12 14z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.icon-dev::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23fff' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4'/%3E%3C/svg%3E");
}

.card-formation h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}

.card-formation-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

.card-formation-detail {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-bottom: 0;
}

/* ---- Activité / Services ---- */
.section-activite {
    background: var(--color-bg);
}

.card-service {
    background: var(--color-bg-alt);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    height: 100%;
    transition: box-shadow var(--transition), transform 0.2s ease;
    text-align: center;
}

.card-service:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-service-icon {
    width: 56px;
    height: 56px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 14px;
    opacity: 0.95;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.card-service-icon svg {
    flex-shrink: 0;
}

.card-service-icon-2 {
    background: linear-gradient(135deg, #2c5282, #3182ce);
}

.card-service-icon-3 {
    background: linear-gradient(135deg, #2b6cb0, #4299e1);
}

.card-service h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.card-service p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-bottom: 0;
}

/* ---- Contact ---- */
.section-contact {
    background: var(--color-bg-alt);
}

.contact-form {
    background: var(--color-bg);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.form-label {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.4rem;
}

.form-control {
    border-radius: 8px;
    border: 1px solid var(--color-border);
    padding: 0.65rem 1rem;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.15);
}

.contact-form .form-control.is-invalid {
    border-color: #c53030;
}

.contact-form__error {
    display: none;
    color: #c53030;
    font-size: 0.9rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
}

.contact-form__error.is-visible {
    display: block;
}

/* ---- Footer ---- */
.footer {
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.92);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    text-align: center;
}

.footer-instagram {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-instagram:hover {
    color: #fff;
    transform: scale(1.1);
}

.footer-copy {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    opacity: 0.95;
}

/* ---- Responsive mobile : textes bien dégagés des bords, centrés ---- */
@media (max-width: 767.98px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (max-width: 575.98px) {
    .container {
        padding-left: 1.75rem;
        padding-right: 1.75rem;
    }
    /* Bloc Présentation : paragraphes plus étroits et centrés, pas collés aux bords */
    .section-presentation .row > [class*="col-"] {
        max-width: 30em;
        margin-left: auto;
        margin-right: auto;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .section-presentation .section-title,
    .section-presentation .lead,
    .section-presentation .section-text {
        text-align: center;
    }
    body {
        font-size: 1.1rem;
    }
    .hero .col-lg-7 {
        text-align: center;
    }
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .section {
        padding: 3.5rem 0;
    }
    .section-title {
        font-size: 1.75rem;
    }
    .section-text,
    .section-intro,
    .section-presentation .lead {
        font-size: 1.05rem;
        line-height: 1.7;
    }
    .card-formation,
    .card-service {
        padding: 1.5rem;
    }
    .contact-form {
        padding: 1.5rem;
    }
    /* Bouton « Me contacter » : largeur adaptée, centré */
    .btn-cta {
        width: auto;
        min-width: 200px;
        max-width: 100%;
        display: inline-block;
        padding-left: 1.75rem;
        padding-right: 1.75rem;
    }
    .hero .btn-cta {
        margin: 0 auto;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .section {
        padding: 4rem 0;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-subtitle {
        max-width: 100%;
    }
    /* Menu tablette : zone de clic plus douce */
    .navbar-toggler {
        padding: 0.5rem 0.65rem;
        border-radius: 8px;
    }
}

/* Accessibilité : focus visible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Réduction des animations si préférence utilisateur */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .card-service:hover,
    .btn-cta:hover {
        transform: none;
    }
    .gsap-hero,
    .reveal {
        opacity: 1;
        transform: none;
    }
}
