:root {
    --background: 0 0% 100%;
    --foreground: 215 25% 15%;
    --card: 0 0% 100%;
    --card-foreground: 215 25% 15%;
    --primary: 215 85% 25%;
    --primary-foreground: 0 0% 100%;
    --secondary: 190 85% 45%;
    --secondary-foreground: 0 0% 100%;
    --accent: 25 95% 55%;
    --accent-foreground: 0 0% 100%;
    --muted: 215 20% 95%;
    --muted-foreground: 215 15% 45%;
    --destructive: 0 84.2% 60.2%;
    --border: 215 15% 88%;
    --input: 215 15% 88%;
    --ring: 215 85% 25%;
    --radius: 0.75rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-lg: 0 20px 40px -10px hsl(215 85% 25% / 0.15);
    --shadow-xl: 0 30px 60px -15px hsl(215 85% 25% / 0.2);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    border: 0 solid hsl(var(--border));
}

html {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
}

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

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

img,
svg {
    display: block;
}

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

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

textarea {
    resize: vertical;
}

:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.site-shell {
    min-height: 100vh;
}

.site-main {
    display: block;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    position: relative;
    padding: 6rem 0;
}

.section--muted {
    background: hsl(var(--muted) / 0.3);
}

.section-heading {
    margin-bottom: 4rem;
    text-align: center;
}

.section-heading--tight {
    margin-bottom: 3rem;
}

.section-heading__title {
    margin-bottom: 1rem;
    font-size: 2.25rem;
    line-height: 1.05;
    font-weight: 700;
    color: hsl(var(--foreground));
}

.section-heading__description {
    max-width: 42rem;
    margin: 0 auto;
    font-size: 1.25rem;
    color: hsl(var(--muted-foreground));
}

.card {
    background: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card__header {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 1.5rem;
}

.card__content {
    padding: 0 1.5rem 1.5rem;
}

.card__footer {
    display: flex;
    align-items: center;
    padding: 0 1.5rem 1.5rem;
}

.card__title {
    font-size: 1.5rem;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.card__title--medium {
    font-size: 1.25rem;
}

.card__description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.card__description--base {
    font-size: 1rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.5rem;
    padding: 0 1rem;
    border: 1px solid transparent;
    border-radius: calc(var(--radius) - 2px);
    white-space: nowrap;
    font-size: 0.875rem;
    line-height: 1;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.button--small {
    min-height: 2.5rem;
}

.button--large {
    min-height: 2.75rem;
    padding: 0 2rem;
}

.button--full {
    width: 100%;
}

.button--primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.button--primary:hover {
    background: hsl(var(--primary) / 0.9);
}

.button--gradient {
    background: linear-gradient(to right, hsl(var(--primary)), hsl(var(--secondary)));
    color: hsl(var(--primary-foreground));
    box-shadow: var(--shadow-lg);
    font-weight: 600;
}

.button--gradient:hover {
    opacity: 0.9;
}

.button--accent {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
    box-shadow: var(--shadow-lg);
    font-weight: 600;
}

.button--accent:hover {
    background: hsl(var(--accent) / 0.9);
}

.button--outline {
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    border-color: hsl(var(--input));
}

.button--outline:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.button--hero-outline {
    background: hsl(var(--primary-foreground) / 0.1);
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary-foreground) / 0.3);
    backdrop-filter: blur(4px);
}

.button--hero-outline:hover {
    background: hsl(var(--primary-foreground) / 0.2);
}

.button--hero-primary {
    font-size: 1.125rem;
}

.button__icon {
    width: 1rem;
    height: 1rem;
}

.button__icon--small {
    width: 1rem;
    height: 1rem;
}

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 50;
    background: hsl(var(--background) / 0.95);
    backdrop-filter: blur(4px);
    border-bottom: 1px solid hsl(var(--border));
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0;
}

.brand__logo {
    display: block;
    width: auto;
    max-width: min(15rem, calc(100vw - 6rem));
    height: 4rem;
    object-fit: contain;
    flex-shrink: 0;
}

.desktop-nav {
    display: none;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: hsl(var(--primary));
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: hsl(var(--foreground));
}

.menu-toggle__icon {
    width: 1.5rem;
    height: 1.5rem;
}

.menu-toggle__icon--close {
    display: none;
}

.menu-toggle.is-open .menu-toggle__icon--menu {
    display: none;
}

.menu-toggle.is-open .menu-toggle__icon--close {
    display: block;
}

.mobile-nav {
    border-top: 1px solid hsl(var(--border));
}

.mobile-nav__inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.mobile-nav__link {
    display: block;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav__link:hover {
    color: hsl(var(--primary));
}

.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding-top: 5rem;
    overflow: hidden;
}

.hero-section__background {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-position: center;
    background-size: cover;
}

.hero-section__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, hsl(var(--primary) / 0.95), hsl(var(--secondary) / 0.9));
}

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

.hero-copy {
    max-width: 56rem;
    margin: 0 auto;
    text-align: center;
}

.hero-copy__title {
    margin-bottom: 1.5rem;
    font-size: 3rem;
    line-height: 1;
    font-weight: 700;
    color: hsl(var(--primary-foreground));
    animation: hero-fade-in 0.6s ease-out both;
}

.hero-copy__description {
    max-width: 42rem;
    margin: 0 auto 2rem;
    font-size: 1.25rem;
    line-height: 1.75rem;
    color: hsl(var(--primary-foreground) / 0.9);
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    max-width: 48rem;
    margin: 4rem auto 0;
}

.hero-stat__value {
    margin-bottom: 0.5rem;
    font-size: 2.25rem;
    line-height: 1;
    font-weight: 700;
    color: hsl(var(--accent));
}

.hero-stat__label {
    color: hsl(var(--primary-foreground) / 0.8);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.service-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: var(--shadow-xl);
}

.service-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    background: linear-gradient(to bottom right, hsl(var(--primary)), hsl(var(--secondary)));
    color: hsl(var(--primary-foreground));
}

.service-card__icon-svg {
    width: 2rem;
    height: 2rem;
}

.service-callout {
    display: grid;
    gap: 2rem;
    align-items: center;
    margin-top: 4rem;
    padding: 2rem;
    border: 1px solid hsl(var(--border));
    border-radius: 1rem;
    background: hsl(var(--card));
}

.service-callout__title {
    margin-bottom: 1rem;
    font-size: 1.875rem;
    line-height: 1.15;
    font-weight: 700;
}

.service-callout__description {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
    color: hsl(var(--muted-foreground));
}

.service-callout__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service-callout__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.service-callout__bullet {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: hsl(var(--accent));
    flex-shrink: 0;
}

.service-callout__emergency {
    padding: 2rem;
    border-radius: 0.75rem;
    background: linear-gradient(to bottom right, hsl(var(--primary)), hsl(var(--secondary)));
    text-align: center;
}

.service-callout__phone {
    margin-bottom: 0.5rem;
    font-size: 3.75rem;
    line-height: 1;
    font-weight: 700;
    color: hsl(var(--primary-foreground));
    word-break: break-word;
}

.service-callout__phone a {
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-callout__phone a:hover {
    opacity: 0.9;
}

.service-callout__phone-caption {
    font-size: 1.125rem;
    color: hsl(var(--primary-foreground) / 0.9);
}

.formations-section {
    overflow: hidden;
}

.formations-section__background {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.05;
    background-position: center;
    background-size: cover;
}

.formations-section__content {
    position: relative;
    z-index: 1;
}

.formations-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.formation-card {
    position: relative;
}

.formation-card:hover {
    box-shadow: var(--shadow-xl);
}

.formation-card--popular {
    border-width: 2px;
    border-color: hsl(var(--accent));
    box-shadow: var(--shadow-xl);
    transform: scale(1.05);
}

.formation-card__flag {
    position: absolute;
    top: -1rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 9999px;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge--outline {
    border-color: hsl(var(--primary));
    color: hsl(var(--primary));
}

.badge--secondary {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.badge--fit {
    width: fit-content;
    margin-bottom: 0.5rem;
}

.formation-card__header {
    padding-bottom: 1rem;
}

.formation-card__duration {
    font-size: 1.125rem;
}

.formation-card__content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.formation-card__price {
    margin-bottom: 1rem;
    font-size: 2.25rem;
    line-height: 1;
    font-weight: 700;
}

.formation-card__price span {
    font-size: 1.125rem;
    font-weight: 400;
    color: hsl(var(--muted-foreground));
}

.formation-card__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.formation-card__item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: hsl(var(--muted-foreground));
}

.formation-card__check {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    color: hsl(var(--secondary));
    flex-shrink: 0;
}

.formations-cta {
    padding: 2rem;
    border: 1px solid hsl(var(--border));
    border-radius: 1rem;
    background: hsl(var(--card));
    text-align: center;
}

.formations-cta__title {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 700;
}

.formations-cta__description {
    max-width: 42rem;
    margin: 0 auto 1.5rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
    color: hsl(var(--muted-foreground));
}

.devis-layout {
    max-width: 56rem;
    margin: 0 auto;
}

.devis-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-feedback {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    background: hsl(var(--background));
}

.form-feedback--success {
    border-color: hsl(var(--secondary) / 0.35);
    background: hsl(var(--secondary) / 0.08);
}

.form-feedback--error {
    border-color: hsl(var(--destructive) / 0.35);
    background: hsl(var(--destructive) / 0.08);
}

.form-feedback__title {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.form-feedback--success .form-feedback__title {
    color: hsl(var(--secondary));
}

.form-feedback--error .form-feedback__title {
    color: hsl(var(--destructive));
}

.form-feedback__message {
    font-size: 0.875rem;
    line-height: 1.4;
    color: hsl(var(--muted-foreground));
}

.devis-form__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    border: 1px solid hsl(var(--input));
    border-radius: calc(var(--radius) - 2px);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    padding: 0.5rem 0.75rem;
    transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input,
.form-select {
    min-height: 2.5rem;
    font-size: 0.875rem;
}

.form-textarea {
    min-height: 80px;
    font-size: 0.875rem;
    resize: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #9ca3af;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.15);
}

.form-select-wrap {
    position: relative;
}

.form-select-wrap::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 0.75rem;
    height: 0.75rem;
    border-right: 2px solid hsl(var(--muted-foreground));
    border-bottom: 2px solid hsl(var(--muted-foreground));
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.form-select {
    appearance: none;
    padding-right: 2.5rem;
}

.form-select:invalid {
    color: hsl(var(--muted-foreground));
}

.catalogue-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.product-card {
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: var(--shadow-xl);
}

.product-card__header {
    background: linear-gradient(to bottom right, hsl(var(--primary) / 0.05), hsl(var(--secondary) / 0.05));
}

.product-card__meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.product-card__emoji {
    font-size: 3.75rem;
    line-height: 1;
}

.product-card__content {
    padding-top: 1.5rem;
}

.product-card__description {
    margin-bottom: 1rem;
    color: hsl(var(--muted-foreground));
}

.product-card__price {
    font-size: 1.875rem;
    line-height: 1;
    font-weight: 700;
}

.product-card__price span {
    font-size: 0.875rem;
    font-weight: 400;
    color: hsl(var(--muted-foreground));
}

.catalogue-cta {
    margin-top: 4rem;
    padding: 2rem;
    border-radius: 1rem;
    background: linear-gradient(to right, hsl(var(--primary)), hsl(var(--secondary)));
    text-align: center;
}

.catalogue-cta__title {
    margin-bottom: 1rem;
    font-size: 1.875rem;
    line-height: 1.15;
    font-weight: 700;
    color: hsl(var(--primary-foreground));
}

.catalogue-cta__description {
    max-width: 42rem;
    margin: 0 auto 1.5rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
    color: hsl(var(--primary-foreground) / 0.9);
}

.site-footer {
    padding: 3rem 0;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-brand__header {
    display: flex;
    align-items: center;
    gap: 0;
}

.footer-brand__logo {
    display: block;
    width: auto;
    max-width: min(16rem, 100%);
    height: 4.5rem;
    object-fit: contain;
    flex-shrink: 0;
}

.footer-brand__description,
.footer-link,
.footer-list,
.footer-contact span {
    color: hsl(var(--primary-foreground) / 0.8);
}

.footer-brand__description,
.footer-links,
.footer-list,
.footer-contact {
    font-size: 0.875rem;
}

.footer-column__title {
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-links,
.footer-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-link:hover {
    color: hsl(var(--primary-foreground));
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.footer-contact__icon {
    width: 1rem;
    height: 1rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid hsl(var(--primary-foreground) / 0.2);
    text-align: center;
    font-size: 0.875rem;
    color: hsl(var(--primary-foreground) / 0.8);
}

.toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 100;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    max-width: 26rem;
    padding: 1rem 1rem 1rem 1.25rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--card));
    box-shadow: var(--shadow-xl);
    opacity: 0;
    transform: translateY(1rem);
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast--error {
    border-color: hsl(var(--destructive) / 0.5);
}

.toast--error .toast__title {
    color: hsl(var(--destructive));
}

.toast__body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.toast__title {
    font-size: 0.95rem;
    font-weight: 700;
}

.toast__description {
    font-size: 0.875rem;
    line-height: 1.4;
    color: hsl(var(--muted-foreground));
}

.toast__close {
    margin-left: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: hsl(var(--muted-foreground));
    font-size: 1.25rem;
    line-height: 1;
}

@keyframes hero-fade-in {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 640px) {
    .hero-actions {
        flex-direction: row;
    }

    .toast {
        right: 1.5rem;
        bottom: 1.5rem;
    }
}

@media (min-width: 768px) {
    .brand__logo {
        height: 4rem;
        max-width: 16rem;
    }

    .desktop-nav {
        display: flex;
    }

    .menu-toggle {
        display: none;
    }

    .section-heading__title {
        font-size: 3rem;
    }

    .hero-copy__title {
        font-size: 4.5rem;
    }

    .hero-copy__description {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    .hero-stat__value {
        font-size: 3rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-callout,
    .formations-cta,
    .catalogue-cta {
        padding: 3rem;
    }

    .service-callout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .formations-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .devis-form__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalogue-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .brand__logo {
        height: 3.25rem;
        max-width: calc(100vw - 7rem);
    }

    .footer-brand__logo {
        height: 4rem;
        max-width: min(14rem, 100%);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .catalogue-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
